2 class Pool
extends HttpRequestPool
4 public function __construct()
7 new HttpRequest('http://pear.php.net', HTTP_METH_HEAD
),
8 new HttpRequest('http://pecl.php.net', HTTP_METH_HEAD
)
11 // HttpRequestPool methods socketPerform() and socketSelect() are
12 // protected; one could use this approach to do something else
13 // while the requests are being executed
14 print "Executing requests";
15 for ($i = 0; $this->socketPerform(); $i++
) {
17 if (!$this->socketSelect()) {
18 throw new HttpException("Socket error!");
26 foreach (new Pool
as $r) {
27 echo "Checking ", $r->getUrl(), " reported ", $r->getResponseCode(), "\n";
29 } catch (HttpException
$ex) {