![]() |
|
#1
|
|||
|
|||
|
I'm using NMHTTP (Get method) to post some parameters and info to a script on the internet. When I try it with the length of the parameters bigger than 255 characters, it doesn't work. It just posts the first 255 chars and no further. Can I do anything about this?
|
|
#2
|
|||
|
|||
|
normally delphi has a limit that it cannot accept any string assignment whose length is more than 255 characters but than it can be overcome in most of the cases.
you can try it with your procedure as i have not ttried it with any fastnet component but instead of using fastnet components which have too many bugs go for indy components which are available at www.nevrona.com/Indy as for delphi's limit of string being less than 256 characters that could be bypassed easilly like for example you want to assign a string with 300 characters to variable script then if you directly assign it then delphi compiler will raise error and inform you that it cannot accept more than 255 characters in one line so just break it somewhere and assign it in two parts like var script : string ; begin script := '...................................' //first part consisting of less than 255 characters script := script + '___________________________' // second part conisting of left over characters but not more than 255. in case you have more than 510 characters you can repeat the above appending procedure and go on doing it untill your whole value has been assigned to the variable |
|
#3
|
|||
|
|||
|
well I already have more than one string! it are about 80 edit boxes which are HTTPencoded into 80 strings and then are posted to my CGI script online. it's like NMHTTP1.Get('http://www.server.com/script.cgi?name='+name+'&email='+email+'&icq='+icq etc...
so after about 255 chars he just cuts it off and posts everything to my script...I do not suppose there is a way to post this in seperate cases...or maybe I can use the NMHTTP.Post method? |
![]() |
| Thread Tools | |
| Display Modes | |
|
|