HTTP request method uses fsockopen function to retrieve the url.

This would be the preferred method, but the fsockopen implementation has the most overhead of all the HTTP transport implementations.

package WordPress
subpackage HTTP
since 2.7.0

 Methods

Send a HTTP request to a URI using fsockopen().

request(string $url, \str|array $args = array()) : array

Does not support non-blocking mode.

see For default options descriptions.
since 2.7
access public

Parameters

$url

string

URI resource.

$args

\strarray

Optional. Override the defaults.

Returns

array'headers', 'body', 'cookies' and 'response' keys.

Whether this class can be used for retrieving an URL.

test($args = array()) : boolean
Static
since 2.7.0
static

Parameters

$args

Returns

booleanFalse means this class can not be used, true means it can.