PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Autres forums > Forum Programmation & Conception > alt.php > Re: maximum length for $_GET
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
Re: maximum length for $_GET

Réponse
 
LinkBack Outils de la discussion
Vieux 29/08/2007, 10h24   #1
rf
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: maximum length for $_GET


"Gernot Frisch" <Me@Privacy.net> wrote in message
news:5jklf7F149hU1@mid.individual.net...
>
> Hi,
>
> what is the maximum lengths for a $_GET string?


A couple of hundred bytes or so.

> I have to upload a text file, but it's quite awkard to use $_POST if $_GET
> would work.


Why is it awkard to use post?

--
Richard.


  Réponse avec citation
Vieux 29/08/2007, 10h35   #2
Rik Wasmus
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: maximum length for $_GET

On Wed, 29 Aug 2007 11:24:28 +0200, rf <rf@invalid.com> wrote:

>
> "Gernot Frisch" <Me@Privacy.net> wrote in message
> news:5jklf7F149hU1@mid.individual.net...
>>
>> Hi,
>>
>> what is the maximum lengths for a $_GET string?

>
> A couple of hundred bytes or so.


Virtually limitless. The bottleneck in using very long urls seem to be the
ua's & http servers themselves, especially MSIE.

<http://www.boutell.com/newfaq/misc/urllength.html>

>> I have to upload a text file, but it's quite awkard to use $_POST if
>> $_GET
>> would work.

>
> Why is it awkard to use post?
>


Because one cannot link to it directly?
--
Rik Wasmus

My new ISP's newsserver sucks. Anyone recommend a good one? Paying for
quality is certainly an option.
  Réponse avec citation
Vieux 29/08/2007, 10h43   #3
Gernot Frisch
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: maximum length for $_GET


> Virtually limitless. The bottleneck in using very long urls seem to
> be the
> ua's & http servers themselves, especially MSIE.
> <http://www.boutell.com/newfaq/misc/urllength.html>


Oh! Much too short for me.
Now, is there any way of using wget or some command line tool to write
post data? If all fails, I could write a html file with a "submit"
button, but that's no good idea.

The background: I've written a game, where the users should be able to
upload their created levels (ini file, about <2MB) from within the
program. My programming language allows HTTP getting, but not with
post data.

thanks for any ideas.



  Réponse avec citation
Vieux 29/08/2007, 10h47   #4
Rik Wasmus
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: maximum length for $_GET

On Wed, 29 Aug 2007 11:43:04 +0200, Gernot Frisch <Me@Privacy.net> wrote:
>> Virtually limitless. The bottleneck in using very long urls seem to
>> be the
>> ua's & http servers themselves, especially MSIE.
>> <http://www.boutell.com/newfaq/misc/urllength.html>

>
> Oh! Much too short for me.
> Now, is there any way of using wget or some command line tool to write
> post data?


Writing post data is fairly easy, just write to the body of the request.
Even simply done in telnet and the like.

> If all fails, I could write a html file with a "submit"
> button, but that's no good idea.
>
> The background: I've written a game, where the users should be able to
> upload their created levels (ini file, about <2MB) from within the
> program. My programming language allows HTTP getting, but not with
> post data.


Which is weird...
--
Rik Wasmus

My new ISP's newsserver sucks. Anyone recommend a good one? Paying for
quality is certainly an option.
  Réponse avec citation
Vieux 29/08/2007, 11h59   #5
rf
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: maximum length for $_GET


"Rik Wasmus" <luiheidsgoeroe@hotmail.com> wrote in message
newsp.txtd9j2p5bnjuv@metallium.lan...
> On Wed, 29 Aug 2007 11:24:28 +0200, rf <rf@invalid.com> wrote:
>
>>
>> "Gernot Frisch" <Me@Privacy.net> wrote in message
>> news:5jklf7F149hU1@mid.individual.net...
>>>
>>> Hi,
>>>
>>> what is the maximum lengths for a $_GET string?

>>
>> A couple of hundred bytes or so.

>
> Virtually limitless.


True. In theory.

> The bottleneck in using very long urls seem to be the ua's & http servers
> themselves, especially MSIE.


So, as I said, the limit is a couple of hundred of bytes or so.

--
Richard.


  Réponse avec citation
Vieux 29/08/2007, 12h05   #6
Rik Wasmus
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: maximum length for $_GET

On Wed, 29 Aug 2007 12:59:37 +0200, rf <rf@invalid.com> wrote:

>
> "Rik Wasmus" <luiheidsgoeroe@hotmail.com> wrote in message
> newsp.txtd9j2p5bnjuv@metallium.lan...
>> On Wed, 29 Aug 2007 11:24:28 +0200, rf <rf@invalid.com> wrote:
>>
>>>
>>> "Gernot Frisch" <Me@Privacy.net> wrote in message
>>> news:5jklf7F149hU1@mid.individual.net...
>>>>
>>>> Hi,
>>>>
>>>> what is the maximum lengths for a $_GET string?
>>>
>>> A couple of hundred bytes or so.

>>
>> Virtually limitless.

>
> True. In theory.
>
>> The bottleneck in using very long urls seem to be the ua's & http
>> servers
>> themselves, especially MSIE.

>
> So, as I said, the limit is a couple of hundred of bytes or so.


Call me picky, but '2,048 characters' does not equal 'a couple of hundred
of bytes'.
--
Rik Wasmus

My new ISP's newsserver sucks. Anyone recommend a good one? Paying for
quality is certainly an option.
  Réponse avec citation
Vieux 29/08/2007, 12h24   #7
rf
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: maximum length for $_GET


"Rik Wasmus" <luiheidsgoeroe@hotmail.com> wrote in message
newsp.txtif1vr5bnjuv@metallium.lan...
> On Wed, 29 Aug 2007 12:59:37 +0200, rf <rf@invalid.com> wrote:
>
>>
>> "Rik Wasmus" <luiheidsgoeroe@hotmail.com> wrote in message
>> newsp.txtd9j2p5bnjuv@metallium.lan...
>>> On Wed, 29 Aug 2007 11:24:28 +0200, rf <rf@invalid.com> wrote:
>>>
>>>>
>>>> "Gernot Frisch" <Me@Privacy.net> wrote in message
>>>> news:5jklf7F149hU1@mid.individual.net...
>>>>>
>>>>> Hi,
>>>>>
>>>>> what is the maximum lengths for a $_GET string?
>>>>
>>>> A couple of hundred bytes or so.
>>>
>>> Virtually limitless.

>>
>> True. In theory.
>>
>>> The bottleneck in using very long urls seem to be the ua's & http
>>> servers
>>> themselves, especially MSIE.

>>
>> So, as I said, the limit is a couple of hundred of bytes or so.

>
> Call me picky, but '2,048 characters' does not equal 'a couple of hundred
> of bytes'.


2048 bytes exactly? :-)

Please cite a reference to this figure. I have heard figures as low as 256.
It is after all up to the UA whereas post is not.

"a couple of hundred bytes" means exactly what it says. Enough for a few
short gets and if it breaks then it's time to use post. And even 2048 is not
nearly enouth for a "text file" which the OP specified, especially when
later in the thread the OP admits to 2MB.

--
Richard.


  Réponse avec citation
Vieux 29/08/2007, 13h01   #8
Rik Wasmus
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: maximum length for $_GET

On Wed, 29 Aug 2007 13:24:27 +0200, rf <rf@invalid.com> wrote:
> "Rik Wasmus" <luiheidsgoeroe@hotmail.com> wrote in message
> newsp.txtif1vr5bnjuv@metallium.lan...
>> On Wed, 29 Aug 2007 12:59:37 +0200, rf <rf@invalid.com> wrote:
>>
>>>
>>> "Rik Wasmus" <luiheidsgoeroe@hotmail.com> wrote in message
>>> newsp.txtd9j2p5bnjuv@metallium.lan...
>>>> On Wed, 29 Aug 2007 11:24:28 +0200, rf <rf@invalid.com> wrote:
>>>>
>>>>>
>>>>> "Gernot Frisch" <Me@Privacy.net> wrote in message
>>>>> news:5jklf7F149hU1@mid.individual.net...
>>>>>>
>>>>>> Hi,
>>>>>>
>>>>>> what is the maximum lengths for a $_GET string?
>>>>>
>>>>> A couple of hundred bytes or so.
>>>>
>>>> Virtually limitless.
>>>
>>> True. In theory.
>>>
>>>> The bottleneck in using very long urls seem to be the ua's & http
>>>> servers
>>>> themselves, especially MSIE.
>>>
>>> So, as I said, the limit is a couple of hundred of bytes or so.

>>
>> Call me picky, but '2,048 characters' does not equal 'a couple of
>> hundred
>> of bytes'.

>
> 2048 bytes exactly? :-)


Nope, it depends. 1 character is not neccessarily 1 byte offcourse.

> Please cite a reference to this figure. I have heard figures as low as
> 256.


It's Microsofts own limitation on MSIE, you can find it on their site. MS
seems to be the lowest of the bunch (UA's, servers). Possibly there are
UA's with an even lower limitation, I haven't found them yet.

> It is after all up to the UA whereas post is not.


As far as I gather, there is in this case no real UA involved but rather
just a piece of code that can do HTTP requests. Wether or not his code can
handle larger of smaller URL's depends.

> "a couple of hundred bytes" means exactly what it says. Enough for a few
> short gets and if it breaks then it's time to use post.


Aside from the fact that the URL is only limited by software using it,
indeed, it shouldn't be that large, but it could. If you mean to say
'don't make it that large' (and for very good reason) say that, don't
claim it's 'a couple of hundred bytes': That's simply not true, and may
confuse the OP if he checks up on it

> And even 2048 is not
> nearly enouth for a "text file" which the OP specified, especially when
> later in the thread the OP admits to 2MB.


Indeed, file upload by GET is something to run away from immediately. The
OP really should POST (or PUT, or use another protocol (FTP comes to
mind))..
--
Rik Wasmus

My new ISP's newsserver sucks. Anyone recommend a good one? Paying for
quality is certainly an option.
  Réponse avec citation
Vieux 29/08/2007, 15h58   #9
Jerry Stuckle
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: maximum length for $_GET

Rik Wasmus wrote:
> On Wed, 29 Aug 2007 13:24:27 +0200, rf <rf@invalid.com> wrote:
>> "Rik Wasmus" <luiheidsgoeroe@hotmail.com> wrote in message
>> newsp.txtif1vr5bnjuv@metallium.lan...
>>> On Wed, 29 Aug 2007 12:59:37 +0200, rf <rf@invalid.com> wrote:
>>>
>>>>
>>>> "Rik Wasmus" <luiheidsgoeroe@hotmail.com> wrote in message
>>>> newsp.txtd9j2p5bnjuv@metallium.lan...
>>>>> On Wed, 29 Aug 2007 11:24:28 +0200, rf <rf@invalid.com> wrote:
>>>>>
>>>>>>
>>>>>> "Gernot Frisch" <Me@Privacy.net> wrote in message
>>>>>> news:5jklf7F149hU1@mid.individual.net...
>>>>>>>
>>>>>>> Hi,
>>>>>>>
>>>>>>> what is the maximum lengths for a $_GET string?
>>>>>>
>>>>>> A couple of hundred bytes or so.
>>>>>
>>>>> Virtually limitless.
>>>>
>>>> True. In theory.
>>>>
>>>>> The bottleneck in using very long urls seem to be the ua's & http
>>>>> servers
>>>>> themselves, especially MSIE.
>>>>
>>>> So, as I said, the limit is a couple of hundred of bytes or so.
>>>
>>> Call me picky, but '2,048 characters' does not equal 'a couple of
>>> hundred
>>> of bytes'.

>>
>> 2048 bytes exactly? :-)

>
> Nope, it depends. 1 character is not neccessarily 1 byte offcourse.
>
>> Please cite a reference to this figure. I have heard figures as low as
>> 256.

>
> It's Microsofts own limitation on MSIE, you can find it on their site.
> MS seems to be the lowest of the bunch (UA's, servers). Possibly there
> are UA's with an even lower limitation, I haven't found them yet.
>
>> It is after all up to the UA whereas post is not.

>
> As far as I gather, there is in this case no real UA involved but rather
> just a piece of code that can do HTTP requests. Wether or not his code
> can handle larger of smaller URL's depends.
>
>> "a couple of hundred bytes" means exactly what it says. Enough for a few
>> short gets and if it breaks then it's time to use post.

>
> Aside from the fact that the URL is only limited by software using it,
> indeed, it shouldn't be that large, but it could. If you mean to say
> 'don't make it that large' (and for very good reason) say that, don't
> claim it's 'a couple of hundred bytes': That's simply not true, and may
> confuse the OP if he checks up on it
>
>> And even 2048 is not
>> nearly enouth for a "text file" which the OP specified, especially when
>> later in the thread the OP admits to 2MB.

>
> Indeed, file upload by GET is something to run away from immediately.
> The OP really should POST (or PUT, or use another protocol (FTP comes to
> mind))..


The bottom line is, it isn't documented in the specs. Each browser has
it's own limitations.

And I agree with rf in this part. Maybe not "a couple of hundred
bytes", but not a huge amount. It's much easier to just post the larger
stuff.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================
  Réponse avec citation
Vieux 31/08/2007, 18h52   #10
Tom
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: maximum length for $_GET

On Wed, 29 Aug 2007 11:43:04 +0200, Gernot Frisch wrote...
>
>
>> Virtually limitless. The bottleneck in using very long urls seem to
>> be the
>> ua's & http servers themselves, especially MSIE.
>> <http://www.boutell.com/newfaq/misc/urllength.html>

>
>Oh! Much too short for me.
>Now, is there any way of using wget or some command line tool to write
>post data? If all fails, I could write a html file with a "submit"
>button, but that's no good idea.
>
>The background: I've written a game, where the users should be able to
>upload their created levels (ini file, about <2MB) from within the
>program. My programming language allows HTTP getting, but not with
>post data.
>
>thanks for any ideas.
>
>
>


Since you are restricting yourself to only the GET method, you don't have a
reasonable upload method through your form. In order to get a file from you
user's PC, I think you would need to use the POST method, so that they can
select the file they want to upload.

If you try it from the server end, I don't believe there is a way to identify,
locate and retrieve the information on a remote PC. Maybe have most of your
forms use the GET method and limit the POST method to just one form that uploads
a file. I've tried wget for pulling files from a server, but don't believe it
works well going the other direction.

Tom
--
Newsguy.com
Unlimited Accounts
Now with 32 concurrent connections

  Réponse avec citation
Vieux 31/08/2007, 20h00   #11
J.O. Aho
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: maximum length for $_GET

Gernot Frisch wrote:
>> Virtually limitless. The bottleneck in using very long urls seem to
>> be the
>> ua's & http servers themselves, especially MSIE.
>> <http://www.boutell.com/newfaq/misc/urllength.html>

>
> Oh! Much too short for me.
> Now, is there any way of using wget or some command line tool to write
> post data?


Read the man page or the info page for wget (if you are using a system that
hasn't any of these excellent documentation systems, then google for the man
page), you can post data, use and a lot of other stuff.


--

//Aho
  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 18h43.


Édité par : vBulletin® version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières ©2000-2008
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,18925 seconds with 19 queries