getRemoteName (), "\n"; }); $Pool = new qcEvents_Client_HTTP ($Base); $Pool->addHook ('httpRequestRediect', function (qcEvents_Client_HTTP $Pool, qcEvents_Stream_HTTP_Request $Request, $Location) { echo '[HTTP ] Redirecting HTTP-Request for ', $Request->getURL (), ' to ', $Location, "\n"; }); $Pool->addHook ('httpRequestResult', function (qcEvents_Client_HTTP $Pool, qcEvents_Stream_HTTP_Request $Request, qcEvents_Stream_HTTP_Header $Header = null, $Body = null) use ($s) { echo '[HTTP ] Received HTTP-Response for ', $Request->getURL (), ': '; if ($Header) echo "\n", $Header; else echo 'FAILED', "\n"; $e = microtime (true); echo '[HTTP ] Result after ', number_format (($e - $s) * 1000, 2), " ms\n"; }); if ($argc > 1) for ($i = 1; $i < $argc; $i++) $Pool->addNewRequest ($argv [$i]); else $Request = $Pool->addNewRequest ('https://www.tiggerswelt.net/hosting'); // Enter main-loop $Base->loop (); echo 'Finished at ', $e = microtime (true), "\n"; echo 'Test took ', number_format (($e - $s) * 1000, 2), " ms\n"; ?>