7 $client = new http\Client;
8 if (!$client->enableEvents())
9 throw new Exception("need events support");
10 } catch (Exception $e) {
11 die("skip ".$e->getMessage());
19 $client1 = new http\Client;
20 $client2 = new http\Client;
22 $client1->enableEvents();
23 $client2->enableEvents();
25 $client1->enqueue(new http\Client\Request("GET", "http://www.google.ca/"));
26 $client2->enqueue(new http\Client\Request("GET", "http://www.google.co.uk/"));
30 if (($r = $client1->getResponse())) {
31 var_dump($r->getTransferInfo("response_code"));
33 if (($r = $client2->getResponse())) {
34 var_dump($r->getTransferInfo("response_code"));