Delphi Pages Forums  

Go Back   Delphi Pages Forums > Delphi Forum > General

Lost Password?

Reply
 
Thread Tools Display Modes
  #1  
Old 02-11-2001, 12:21 AM
jonathan jonathan is offline
Junior Member
 
Join Date: Feb 2001
Posts: 2
Default How to get/post a site/script with more than 255 characters?

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?
Reply With Quote
  #2  
Old 02-11-2001, 12:48 AM
digitiger digitiger is offline
Senior Member
 
Join Date: Jan 2001
Posts: 716
Default RE: How to get/post a site/script with more than 255 characters?

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
Reply With Quote
  #3  
Old 02-11-2001, 12:58 AM
jonathan jonathan is offline
Junior Member
 
Join Date: Feb 2001
Posts: 2
Default RE: RE: How to get/post a site/script with more than 255 characters?

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?
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On

Forum Jump


All times are GMT. The time now is 11:46 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.