note 15226 added to function.fsockopen

From: Date: Sun, 02 Sep 2001 06:40:36 +0000
Subject: note 15226 added to function.fsockopen
Groups: php.notes 
Request: Send a blank email to php-notes+get-17529@lists.php.net to get a copy of this message
I tried the code for 'chunked' transfer encodings posted above by Jay and had to change one line of code: $page[count($page)-1]=chop($page[count($page)-1]); will chop off trailing spaces as white space, even if the chunk you receive happens to end with a space character that's not white space (i.e. a space between words of text). So this is what I used instead: $lastPage = $page[count($page)-1]; $page[count($page)-1] = substr($lastPage, 0, strlen($lastPage) -1); Basically, it just trims the last character, which worked in my case, which was a specific case. This has not been tested against multiple http servers, only Apache running on a Cobalt Raq4i. Thom Hickey thom@kar120.com http://www.php.net/manual/en/function.fsockopen.php

« previous php.notes (#17529) next »