fsockopen HTTP transport
package | Requests |
---|---|
subpackage | Transport |
connect_error_handler(integer $errno, string $errstr)
integer
Error number (e.g. E_WARNING)
string
Error message
request(string $url, array $headers= array()
, string|array $data= array()
, array $options= array()
) : string
inherited_from | \Requests_Transport::request() |
---|
string
URL to request
array
Associative array of request headers
string
array
Data to send either as the POST body, or as parameters in the URL for a GET/HEAD
array
Request options, see {@see Requests::response()} for documentation
\Requests_Exception |
On failure to connect to socket (`fsockopenerror`) |
---|---|
\Requests_Exception |
On socket timeout (`timeout`) |
string
Raw HTTP resultrequest_multiple(array $requests, array $options) : array
inherited_from | \Requests_Transport::request_multiple() |
---|
array
Request data (array of 'url', 'headers', 'data', 'options') as per {@see Requests_Transport::request}
array
Global options, see {@see Requests::response()} for documentation
array
Array of Requests_Response objects (may contain Requests_Exception or string responses as well)test($capabilities = array()
) : boolean
codeCoverageIgnore | |
---|---|
inherited_from | \Requests_Transport::test() |
boolean
True 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 |
---|
string
Host name to verify against
resource
Stream 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`) |
boolean
accept_encoding() : string
string
Accept-Encoding header valueformat_get(array $url_parts, array|object $data) : string
array
string
URL with data$headers : string
''
$info : array
$connect_error
''
$max_bytes : integer | boolean
false
SECOND_IN_MICROSECONDS = 1000000 : integer