X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=docs%2Fexamples%2FParallel_Requests_.php;fp=docs%2Fexamples%2FParallel_Requests_.php;h=e1eb88f52c6f3f27c519954cd084e5f4122431ad;hb=b562e34cf4f8c8fae7b8fe773e0eed71592b09c2;hp=0000000000000000000000000000000000000000;hpb=b1d7d87f91b5cdcf321cb103e1a315f639885d61;p=m6w6%2Fext-http diff --git a/docs/examples/Parallel_Requests_.php b/docs/examples/Parallel_Requests_.php new file mode 100644 index 0000000..e1eb88f --- /dev/null +++ b/docs/examples/Parallel_Requests_.php @@ -0,0 +1,32 @@ +socketPerform(); $i++) { + $i % 3 or print "."; + if (!$this->socketSelect()) { + throw new HttpException("Socket error!"); + } + } + print "\nDone!\n"; + } +} + +try { + foreach (new Pool as $r) { + print "Checking ", $r->getUrl(), " reported ", $r->getResponseCode(), "\n"; + } +} catch (HttpException $ex) { + print $e; +} +?>