X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=docs%2Fexamples%2FParallel_Requests.php;h=d9b05f0fe8b9e09163585aeede0b0dbe9958598f;hb=c07ee6eaef449abb292bb84d5ba61c19a467e184;hp=962ea0527463a72457416f27c0fb1875edc1a0ec;hpb=b562e34cf4f8c8fae7b8fe773e0eed71592b09c2;p=m6w6%2Fext-http diff --git a/docs/examples/Parallel_Requests.php b/docs/examples/Parallel_Requests.php index 962ea05..d9b05f0 100644 --- a/docs/examples/Parallel_Requests.php +++ b/docs/examples/Parallel_Requests.php @@ -3,8 +3,8 @@ try { $p = new HttpRequestPool; // if you want to set _any_ options of the HttpRequest object, // you need to do so *prior attaching* to the request pool! - $p->attach(new HttpRequest('http://pear.php.net', HTTP_HEAD)); - $p->attach(new HttpRequest('http://pecl.php.net', HTTP_HEAD)); + $p->attach(new HttpRequest('http://pear.php.net', HTTP_METH_HEAD)); + $p->attach(new HttpRequest('http://pecl.php.net', HTTP_METH_HEAD)); } catch (HttpException $e) { print $e; exit; @@ -14,7 +14,7 @@ try { $p->send(); // HttpRequestPool implements an iterator over attached HttpRequest objects foreach ($p as $r) { - print "Checking ", $r->getUrl(), " reported ", $r->getResponseCode(), "\n"; + echo "Checking ", $r->getUrl(), " reported ", $r->getResponseCode(), "\n"; } } catch (HttpException $e) { print $e;