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. | |
Definition at line 12 of file HttpBrowser.class.php.
| static spunQ_HttpBrowser::createRequest | ( | $ | uri | ) | [static] |
Creates a request object, ready to be sent.
| $uri | The uri to create the request for. |
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.
| $uri | Uri to download. | |
| $file | File to write to. | |
| $append | Whether the file shall be appended to. | |
| $followRedirects | See parameter description in sendRequest(). |
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.
| $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. |
Definition at line 28 of file HttpBrowser.class.php.
1.5.9