constructor PEAR_REST::PEAR_REST | PEAR_REST::getCache |
PEAR_REST | |
PEAR Manual | |
require_once '/REST.php'; |
string|array
PEAR_REST::downloadHttp
(
string
$url
,
false|string|array
$lastmodified = null
,
false|array
$accept = false
,
string
$save_dir
)
If an HTTP proxy has been configured (http_proxy PEAR_Config setting), the proxy will be used.
the URL to download
header values to check against for caching use FALSE to return the header values from this download
Accept headers to send. This should be a list of MIME types like text/xml, frog/legs, etc.
directory to save file in
returns Returns the contents of the downloaded file or a PEAR error on failure. If the error is caused by socket-related errors, the error object will have the fsockopen error code available through getCode(). If caching is requested, then return the header values.
throws no exceptions thrown
This function can not be called statically.
constructor PEAR_REST::PEAR_REST | PEAR_REST::getCache |
PEAR_REST | |
PEAR Manual | |