Re: [PHP] HTTP Content-length...

2001-02-20 Thread Simon Garner
From: "Hrishi" <[EMAIL PROTECTED]> > > $string ="foo=bar&food=apple"; > > $contentlength=$string.size; > > $uuencodestring=uuencode($string); > > uuencode ? are you looking at urlencode ? > > use > $contentlength=strlen($string); > > also remember according to the HTTP protocol, you have to show

Re: [PHP] HTTP Content-length...

2001-02-20 Thread Hrishi
> $string ="foo=bar&food=apple"; > $contentlength=$string.size; > $uuencodestring=uuencode($string); uuencode ? are you looking at urlencode ? use $contentlength=strlen($string); also remember according to the HTTP protocol, you have to show the length of the encoded string, not the original;

Re: [PHP] HTTP Content-length...

2001-02-20 Thread Ben Peter
Evan, I have no good answer to your problem, but probably you should have a look at Snoopy (snoopy.sourceforce.net), which implements HTTP posts, along with some other nifty functions and is very easy to use. Cheers, Ben "Montgomery-Recht, Evan" wrote: > > I'm working through geting the raw so

[PHP] HTTP Content-length...

2001-02-20 Thread Montgomery-Recht, Evan
I'm working through geting the raw sockets implementation to send a http post command to a cgi-script. But there's one thing I'm trying to figure out. How do I create the content-length? I don't see a obvious way but my expection would be the following code. $string ="foo=bar&food=apple"; $con