
- You are not logged in. | Login
February 22, 2007 12:30 pm
- IBdaMac
- Member


Transmitting great data amount with GET method?
Hallo!
There is a goods’ catalogue, a parameter filter which transmits data with GET-method.
GET-method has got some restrictions for the data amount (I don’t know exactly what they are). Parameters filter form may contain big data amount and correspondingly it can transmit great data amount.
Now data from a form are transmitted directly to the current catalogue’s page with GET-method
/catalog/?option[]=1&option[]=2&option[]=3
I suggest following: data from the form are first transmitted to the page template /catalog/filter.php with POST-method then data are handled in a string and are transmitted with redirect to the catalogue’s page /catalog/?option=1,2,3 and then, for instance, explode() and so on.
On one hand a spare operation (redirect) appears but as far as data amount reduces it becomes possible to fit into the GET-method restrictions.
Maybe you have some other variants. Could you give some advice taking into account that the final result should be an URL-string containing necessary parameters for filtration?
February 22, 2007 12:34 pm
- mambojim
- Member


Re: Transmitting great data amount with GET method?
I can imagine what difficulties you had! But what for? Why do you need to transmit such great data amounts with GET-method? 
February 22, 2007 12:45 pm
- jjjlc1983
- Member


Re: Transmitting great data amount with GET method?
mambojim, maybe he wanted to show a link to someone.
February 22, 2007 12:48 pm
- PilgrimFarAway
- Member


Re: Transmitting great data amount with GET method?
If by substitution of any ‘options’ with any ‘o’ problem persists, you are to use either post+conversion+redirect or javascript forgetting about people who don’t have it or don’t switch it on.
February 22, 2007 1:02 pm
- mambojim
- Member


Re: Transmitting great data amount with GET method?
As a variant you can save POST-massive values in a table or redirect to?o=md5(print_r($_POST),true). The table should be saved forever.
jjjlc1983, won’t you be afraid if you get a page-length string as a mail?
As for me, I will be afraid and won’t follow it…
IBdaMac, I’d like to define application area of such long links.
February 22, 2007 1:05 pm
- IBdaMac
- Member


Re: Transmitting great data amount with GET method?
Thanks to everyone for your answers.
I use GET-method to enable a user saving a link.
If my friend sends me a link of any length I will click it. Links from the unknown are quite a different thing.
For example, there are 100 goods but a user applied filter and only 20 of them remained. But only 10 goods are displayed on one page and to view them all a user needs to proceed to the second page.
It’s impossible to do this with GET-method.
As a variant now we may use abbreviation ‘o’ for ‘option’.
I dislike a variant with creation of an optional table for saving POST-data.
February 22, 2007 1:10 pm
- jjjlc1983
- Member


Re: Transmitting great data amount with GET method?
mambojim, as for me I will be afraid but follow
You may include parameters’ combination into the base and transmit ID-entries only.
February 22, 2007 1:14 pm
- biopd42
- Member


Re: Transmitting great data amount with GET method?
As to the restrictions:
The HTTP protocol does not place any a priori limit on the length of a URI. Servers MUST be able to handle the URI of any resource they serve, and SHOULD be able to handle URIs of unbounded length if they provide GET-based forms that could generate such URIs.
Browsers can cut. Explorer doesn’t accept more than 2027.
The basic recipe is already known: you are to apply short (one- or two-symbol) names for variables and optimize their possible meanings. And combine GET with caching of the same kind and repeated request parts. But you are to do it rationally as the charm of parameters transmission through GET is their readability.
February 22, 2007 1:19 pm
- sam43inwood
- Member


Re: Transmitting great data amount with GET method?
Knock-knock! Anybody home?
POST + hidden fields. We hide search conditions and transmit a page through GET.
February 22, 2007 1:25 pm
- PilgrimFarAway
- Member


Re: Transmitting great data amount with GET method?
What is it? Explain it to me, please.
February 22, 2007 1:32 pm
- IBdaMac
- Member


Re: Transmitting great data amount with GET method?
Thanks for everyone for your answers.
By now I’ve shortened variables’ names. When selecting maximum parameters’ number + manufacturers + sorting I get no more than 300 symbols in the URL-string. I don’t intend to make huge parameter filters but everything is possible and so I’d like to determine everything beforehand.
February 22, 2007 1:37 pm
- sam43inwood
- Member


Re: Transmitting great data amount with GET method?
PilgrimFarAway, you are to replace <a href=...> links with form submit containing hidden fields within which current search criteria are indicated and page number will be set.
February 22, 2007 1:43 pm
- PilgrimFarAway
- Member


Re: Transmitting great data amount with GET method?
I’m afraid (although it sounds very strange) you don’t realize what is GET and what is POST and when they should be used.
February 22, 2007 1:48 pm
- sam43inwood
- Member


Re: Transmitting great data amount with GET method?
Maybe I really was wrong…
<form action=...... method=POST> <input type=hidden .........> <input type=hidden .........> <input type=hidden .........> <input type=hidden name=page id=page> </form> onclick=setPage(12);someForm.submit();return false
That’s what I’m talking about.
February 22, 2007 1:51 pm
- PilgrimFarAway
- Member


Re: Transmitting great data amount with GET method?
sam43inwood wrote:
PilgrimFarAway, you are to replace <a href=...> links with form submit containing hidden fields within which current search criteria are indicated and page number will be set.
Well. But why none except for you hasn’t offered this wonderful variant yet? It cannot be without purpose. By any possibility data displaying and search are always done with GET. Maybe possibility to save a link is really needed?
Nothing personal, it’s just your ‘knock-knock’ which is completely out of place.
February 22, 2007 2:00 pm
- sam43inwood
- Member


Re: Transmitting great data amount with GET method?
I was killed with the phrase
Or maybe it’s because of users who curse by attempt to press ‘back’ button?
Curse is really about to start here…
July 13, 2007 5:58 am
- prisharma
- Member


Re: Transmitting great data amount with GET method?
If you want to use $_GET Method then post data in url as ASCII Format for special character


