Свойство | Тип | Описание | |
---|---|---|---|
$body | string | Response body | |
$code | integer | Response code | |
$curl | cURL resource | ||
$fields | array | Fields | |
$header | string | Raw response header | |
$headerSize | integer | Raw response header size | |
$headers | array | Response headers | |
$message | string | Response message | |
$options | array | cURL options | |
$response | string | Response string | |
$version | string | HTTP version from response |
Метод | Описание | |
---|---|---|
__construct ( string $url, array $opts = null ) : |
Constructor | |
__destruct ( ) : void | Close the cURL session. | |
execute ( ) : mixed | Execute the cURL session. | |
getBody ( ) : string | Get the cURL response body | |
getCode ( ) : string | Get the cURL response code | |
getField ( string $name ) : mixed | Get a field | |
getFields ( ) : array | Get all field | |
getHeader ( string $name ) : mixed | Get a response header | |
getHeaders ( ) : array | Get all response headers | |
getHttpVersion ( ) : string | Get the cURL response HTTP version | |
getInfo ( integer $opt = null ) : array | string | Return the cURL session last info. | |
getMessage ( ) : string | Get the cURL response HTTP message | |
getOption ( integer $opt ) : string | Get a cURL session option. | |
getRawHeader ( ) : string | Get raw response header | |
getResponse ( ) : string | Get the full cURL response | |
isPost ( ) : boolean | Check if cURL is set to POST | |
isReturnHeader ( ) : boolean | Check if cURL is set to return header | |
isReturnTransfer ( ) : boolean | Check if cURL is set to return transfer | |
setField ( string $name, mixed $value ) : |
Set a field | |
setFields ( array $fields ) : |
Set all fields | |
setOption ( array | integer $opt, string $val = null ) : |
Set cURL session option(s). | |
setPost ( boolean $post = false ) : |
Set cURL option for POST | |
setReturnHeader ( boolean $header = false ) : |
Set cURL option to return the header | |
setReturnTransfer ( boolean $transfer = false ) : |
Set cURL option to return the transfer | |
version ( ) : array | Return the cURL version. |
Метод | Описание | |
---|---|---|
parseHeaders ( ) : void | Parse headers | |
showError ( ) : void | Throw an exception upon a cURL error. |
public __construct ( string $url, array $opts = null ) : |
||
$url | string | |
$opts | array | |
Результат |
public getHttpVersion ( ) : string | ||
Результат | string |
public getMessage ( ) : string | ||
Результат | string |
public getRawHeader ( ) : string | ||
Результат | string |
public getResponse ( ) : string | ||
Результат | string |
public isReturnHeader ( ) : boolean | ||
Результат | boolean |
public isReturnTransfer ( ) : boolean | ||
Результат | boolean |
public setReturnHeader ( boolean $header = false ) : |
||
$header | boolean | |
Результат |
public setReturnTransfer ( boolean $transfer = false ) : |
||
$transfer | boolean | |
Результат |
protected int $headerSize | ||
Результат | integer |