phorum_api_http_get (line 58)
This function can be used to retrieve data from a URL using an HTTP GET request.
The way in which data can be retrieved for URLs, depends a lot on the features and the configuration for PHP on the system. This function will try to autodetect a way that will work for the running system automatically.
string
phorum_api_http_get
(mixed $url, [mixed $method = NULL], string $url
, string $method
)
-
string
$url
: The URL to retrieve.
-
string
$method
: The method to use for retrieving the data. By default, this function will try to autodetect a working method. Providing a $method parameter is mostly useful for debugging purposes. Available methods (in the order in which they are probed in the code) are:
- curl: using the curl library (requires extension "curl")
- socket: using PHP socket programming (requires extension "sockets")
- file: using fopen() (requires option "allow_url_fopen" to be enabled)
phorum_api_http_get_analyze (line 399)
A helper function for phorum_api_http_get() to determine what to do with a no "200 OK" response from the web server.
array
phorum_api_http_get_analyze
(string $requested_url, string $code, mixed $header, string $header
)
-
string
$requested_url
-
string
$code
-
string
$header