whisperstream wrote:
> I have a server running that receives xml formatted events from other
> services I have no control over. For certain events the transfer-encoding
> is chunked.
>
> I was just doing
>
> $input = file_get_contents('php://stdin');
>
> and this works well until there is chunked input. Then I tried
>
> $handle = fopen('php://input', "rb");
> $input = '';
> while (!feof($handle)) {
> $input .= fread($handle, 8192);
> }
> fclose($handle);
>
> And that gives about the same result, has anyone else come across this and
> how did they solve it?
>
> Thanks in advance
>
There aren't really many examples around, but check
http_chunked_decode() from PECL.
--
Thanks!
-Shawn
http://www.spidean.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php