spunQ_HttpBrowser Class Reference

Common functions for browsing the world wide web. More...

List of all members.

Static Public Member Functions

static sendRequest ($uri, $followRedirects=5, $verifyResponse=true)
 Fast fetching of a web page.
static createRequest ($uri)
 Creates a request object, ready to be sent.
static download ($uri, $file, $append=false, $followRedirects=5)
 Fetches a page and writes the body into specified file.


Detailed Description

Common functions for browsing the world wide web.

Definition at line 12 of file HttpBrowser.class.php.


Member Function Documentation

static spunQ_HttpBrowser::createRequest ( uri  )  [static]

Creates a request object, ready to be sent.

Parameters:
$uri The uri to create the request for.
Returns:
spunQ_HttpBrowserRequest

Definition at line 40 of file HttpBrowser.class.php.

static spunQ_HttpBrowser::download ( uri,
file,
append = false,
followRedirects = 5 
) [static]

Fetches a page and writes the body into specified file.

Parameters:
$uri Uri to download.
$file File to write to.
$append Whether the file shall be appended to.
$followRedirects See parameter description in sendRequest().
Returns:
spunQ_File The second parameter.

Definition at line 52 of file HttpBrowser.class.php.

static spunQ_HttpBrowser::sendRequest ( uri,
followRedirects = 5,
verifyResponse = true 
) [static]

Fast fetching of a web page.

Parameters:
$uri The uri to retrieve the response for.
$followRedirects Consecutive requests will be sent if the response header suggests that the requested resource can be found somewhere else. This defines the maximum number of redirects to follow. The default value was recommended by the HTTP protocol specification: http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.3
$throwException Whether an exception should be thrown in case of an error. The function will return NULL in case of an error if this value evaluates to false.
Returns:
spunQ_HttpBrowserResponse

Definition at line 28 of file HttpBrowser.class.php.


The documentation for this class was generated from the following file:

Generated on Fri Jul 1 11:12:40 2011 for spunQ3 by  doxygen 1.5.9