|
|
|
#1 |
|
Messages: n/a
Hébergeur: |
"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. |
|
|
|
#2 |
|
Messages: n/a
Hébergeur: |
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. |
|
|
|
#3 |
|
Messages: n/a
Hébergeur: |
> 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. |
|
|
|
#4 |
|
Messages: n/a
Hébergeur: |
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. |
|
|
|
#5 |
|
Messages: n/a
Hébergeur: |
"Rik Wasmus" <luiheidsgoeroe@hotmail.com> wrote in message news p.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. |
|
|
|
#6 |
|
Messages: n/a
Hébergeur: |
On Wed, 29 Aug 2007 12:59:37 +0200, rf <rf@invalid.com> wrote:
> > "Rik Wasmus" <luiheidsgoeroe@hotmail.com> wrote in message > news p.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. |
|
|
|
#7 |
|
Messages: n/a
Hébergeur: |
"Rik Wasmus" <luiheidsgoeroe@hotmail.com> wrote in message news p.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 >> news p.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. |
|
|
|
#8 |
|
Messages: n/a
Hébergeur: |
On Wed, 29 Aug 2007 13:24:27 +0200, rf <rf@invalid.com> wrote:
> "Rik Wasmus" <luiheidsgoeroe@hotmail.com> wrote in message > news p.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 >>> news p.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. |
|
|
|
#9 |
|
Messages: n/a
Hébergeur: |
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 >> news p.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 >>>> news p.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 ================== |
|
|
|
#10 |
|
Messages: n/a
Hébergeur: |
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 |
|
|
|
#11 |
|
Messages: n/a
Hébergeur: |
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 |
|
![]() |
| Outils de la discussion | |
|
|