Свойство | Type | Description | |
---|---|---|---|
$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 |
Méthode | Description | |
---|---|---|
__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. |
Méthode | Description | |
---|---|---|
parseHeaders ( ) : void | Parse headers | |
showError ( ) : void | Throw an exception upon a cURL error. |
public __construct ( string $url, array $opts = null ) : |
||
$url | string | |
$opts | array | |
Résultat |
public getHttpVersion ( ) : string | ||
Résultat | string |
public getMessage ( ) : string | ||
Résultat | string |
public getRawHeader ( ) : string | ||
Résultat | string |
public getResponse ( ) : string | ||
Résultat | string |
public isReturnHeader ( ) : boolean | ||
Résultat | boolean |
public isReturnTransfer ( ) : boolean | ||
Résultat | boolean |
public setReturnHeader ( boolean $header = false ) : |
||
$header | boolean | |
Résultat |
public setReturnTransfer ( boolean $transfer = false ) : |
||
$transfer | boolean | |
Résultat |
protected int $headerSize | ||
Résultat | integer |