note 103194 deleted from book.curl by danbrown
| From: | danbrown@php.net | Date: | Thu, 31 Mar 2011 14:09:23 +0000 |
| Subject: | note 103194 deleted from book.curl by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-178380@lists.php.net to get a copy of this message | ||
Note Submitter: frank at interactinet dot com
----
two small mistakes in the header checker.
Replace this:
<?php
function http_response($url, $status = null, $wait = null)
{
if(is_numeric($wait))
{
$time = microtime(true);
$expire = $time + $wait;
}
?>
with this:
<?php
function http_response($url, $status = null, $wait = 3)
{
$time = microtime(true);
$expire = $time + $wait;
?>
Also near the bottom, the following
<?php
// we are the child
if(
while(microtime(true) < $expire)
?>
should actually be
<?php
// we are the child
while(microtime(true) < $expire)
?>