X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-http;a=blobdiff_plain;f=docs%2Ffunctions.html;h=100e1f3d500032e619e0b349a7d736e065d9bc6c;hp=d00adae33987548fd6e00520bc1cbc6cc66439dd;hb=c4d95e923b40160d814c7e4e0a822332bbd65bdb;hpb=f2d1bcbb220370bc25bcd3a7272dd20da57b3058 diff --git a/docs/functions.html b/docs/functions.html index d00adae..100e1f3 100644 --- a/docs/functions.html +++ b/docs/functions.html @@ -430,7 +430,7 @@ GET example:


able to send several HttpRequests in parallel.

Example:


-<?php
    $urls
= array('www.php.net', 'pecl.php.net', 'pear.php.net')
    
$pool = new HttpRequestPool;
    foreach (
$urls as $url) {
        
$req[$url] = new HttpRequest("http://$url", HTTP_HEAD);
        
$pool->attach($req[$url]);
    }
    
$pool->send();
    foreach (
$urls as $url) {
        
printf("%s (%s) is %s\n",
            
$url, $req[$url]->getResponseInfo('effective_url'),
            
$r->getResponseCode() == 200 ? 'alive' : 'not alive'
        
);
    }
?>
+<?php
try {
    
$pool = new HttpRequestPool(
        new
HttpRequest('http://www.google.com/', HTTP_HEAD),
        new
HttpRequest('http://www.php.net/', HTTP_HEAD)
    );
    
$pool->send();
    foreach(
$pool as $request) {
        
printf("%s is %s (%d)\n",
            
$request->getUrl(),
            
$request->getResponseCode() ? 'alive' : 'not alive',
            
$request->getResponseCode()
        );
    }
} catch (
HttpException $e) {
    echo
$e;
}
?>



@@ -457,6 +457,16 @@ NOTE: set all options prior attaching!

See HttpRequestPool::socketSend().

protected void HttpRequestPool::socketRead()

See HttpRequestPool::socketSend().

+

bool HttpRequestPool::valid()

+

Implements Iterator::valid().

+

HttpRequest HttpRequestPool::current()

+

Implements Iterator::current().

+

long HttpRequestPool::key()

+

Implements Iterator::key().

+

void HttpRequestPool::next()

+

Implements Iterator::next().

+

void HttpRequestPool::rewind()

+

Implements Iterator::rewind().


http_response_object.c

static bool HttpResponse::setCache(bool cache)

@@ -531,7 +541,7 @@ Example:




-

Generated at: Fri, 22 Jul 2005 17:44:59 +0200

+

Generated at: Mon, 25 Jul 2005 14:47:50 +0200