Skip to content

Instantly share code, notes, and snippets.

@daharon
daharon / http_stream_test.php
Created September 15, 2011 20:39
Trying to get the output using HttpRequest's 'onprogress'.
#!/usr/bin/php
<?php
$request = new \HttpRequest(
'http://10.1.1.150:8888/watch',
HTTP_METH_GET,
array(
'timeout' => 60,
'onprogress' => function ($input) {
echo print_r($input, true);