note 15226 deleted from function.fsockopen by jimw
| From: | jimw@php.net | Date: | Sat, 08 Dec 2001 21:57:41 +0000 |
| Subject: | note 15226 deleted from function.fsockopen by jimw | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-22257@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