fsockopen HTTP transport
| package | Requests |
|---|---|
| subpackage | Transport |
connect_error_handler(integer $errno, string $errstr)
integerError number (e.g. E_WARNING)
stringError message
request(string $url, array $headers= array(), string|array $data= array(), array $options= array()) : string
| inherited_from | \Requests_Transport::request() |
|---|
stringURL to request
arrayAssociative array of request headers
stringarrayData to send either as the POST body, or as parameters in the URL for a GET/HEAD
arrayRequest options, see {@see Requests::response()} for documentation
\Requests_Exception |
On failure to connect to socket (`fsockopenerror`) |
|---|---|
\Requests_Exception |
On socket timeout (`timeout`) |
stringRaw HTTP resultrequest_multiple(array $requests, array $options) : array
| inherited_from | \Requests_Transport::request_multiple() |
|---|
arrayRequest data (array of 'url', 'headers', 'data', 'options') as per {@see Requests_Transport::request}
arrayGlobal options, see {@see Requests::response()} for documentation
arrayArray of Requests_Response objects (may contain Requests_Exception or string responses as well)test($capabilities = array()) : boolean
| codeCoverageIgnore | |
|---|---|
| inherited_from | \Requests_Transport::test() |
booleanTrue if the transport is valid, false otherwise.verify_certificate_from_context(string $host, resource $context) : boolean
Unfortunately, PHP doesn't check the certificate against the alternative names, leading things like 'https://www.github.com/' to be invalid. Instead
| see | RFC2818, Section 3.1 |
|---|
stringHost name to verify against
resourceStream context
\Requests_Exception |
On failure to connect via TLS (`fsockopen.ssl.connect_error`) |
|---|---|
\Requests_Exception |
On not obtaining a match for the host (`fsockopen.ssl.no_match`) |
booleanaccept_encoding() : string
stringAccept-Encoding header valueformat_get(array $url_parts, array|object $data) : string
array
stringURL with data$headers : string
''$info : array
$connect_error
''$max_bytes : integer | boolean
falseSECOND_IN_MICROSECONDS = 1000000 : integer