Function __global->_cms_http_request
Definitions
sources/http.php
- Return the file in the URL by downloading it over HTTP. If a byte limit is given, it will only download that many bytes. It outputs warnings, returning null, on error.
- Visibility: public
- Is abstract?: No
- Is static?: No
- Is final?: No
- Returns: object
Parameters
| Name | Type | Passed by reference? | Variadic? | Default | Set | Range | Description |
|---|---|---|---|---|---|---|---|
| $url | URLPATH | No | No | required parameter | N/A | N/A | The URL to download |
| $options | array | No | No | [] | N/A | N/A | Map of options (see the properties of the HttpDownloader class for what you may set) |
Returns
- HttpDownloader object, which can be checked for return data
- Type: object
- Set: N/A
- Range: N/A
Preview
Code (PHP)
/**
* Return the file in the URL by downloading it over HTTP. If a byte limit is given, it will only download that many bytes. It outputs warnings, returning null, on error.
*
* @param URLPATH $url The URL to download
* @param array $options Map of options (see the properties of the HttpDownloader class for what you may set)
* @return object HttpDownloader object, which can be checked for return data
*/
function _cms_http_request(string $url, array $options = []) : object
* Return the file in the URL by downloading it over HTTP. If a byte limit is given, it will only download that many bytes. It outputs warnings, returning null, on error.
*
* @param URLPATH $url The URL to download
* @param array $options Map of options (see the properties of the HttpDownloader class for what you may set)
* @return object HttpDownloader object, which can be checked for return data
*/
function _cms_http_request(string $url, array $options = []) : object

