Method | Description | |
---|---|---|
__construct ( $base_url = null ) | Construct | |
__destruct ( ) | Destruct | |
__get ( $name ) | ||
array_flatten_multidim ( $array, $prefix = false ) : array | Array Flatten Multidim | |
beforeSend ( $callback ) | Before Send | |
buildPostData ( $data ) : array | string | Build Post Data | |
call ( ) | Call | |
close ( ) | Close | |
complete ( $callback ) | Complete | |
delete ( $url, $query_parameters = [], $data = [] ) : string | Delete | |
download ( $url, $mixed_filename ) : boolean | Download | |
error ( $callback ) | Error | |
exec ( $ch = null ) : mixed | Exec | |
get ( $url, $data = [] ) : mixed | Get | |
getCookie ( $key ) : mixed | Get Cookie | |
getInfo ( $opt = null ) : mixed | Get Info | |
getOpt ( $option ) : mixed | Get Opt | |
getResponseCookie ( $key ) : mixed | Get Response Cookie | |
head ( $url, $data = [] ) : string | Head | |
headerCallback ( $ch, $header ) : integer | Header Callback | |
is_array_assoc ( $array ) : boolean | Is Array Assoc | |
is_array_multidim ( $array ) : boolean | Is Array Multidim | |
options ( $url, $data = [] ) : string | Options | |
patch ( $url, $data = [] ) : string | Patch | |
post ( $url, $data = [], $follow_303_with_post = false ) : string | Post | |
progress ( $callback ) | Progress | |
put ( $url, $data = [] ) : string | Put | |
removeHeader ( $key ) | Remove Header | |
search ( $url, $data = [] ) : string | Search | |
setBasicAuthentication ( $username, $password = '' ) | Set Basic Authentication | |
setConnectTimeout ( $seconds ) | Set Connect Timeout | |
setCookie ( $key, $value ) | Set Cookie | |
setCookieFile ( $cookie_file ) | Set Cookie File | |
setCookieJar ( $cookie_jar ) | Set Cookie Jar | |
setCookieString ( $string ) : boolean | Set Cookie String | |
setDefaultDecoder ( $decoder = 'json' ) | Set Default Decoder | |
setDefaultJsonDecoder ( ) | Set Default JSON Decoder | |
setDefaultTimeout ( ) | Set Default Timeout | |
setDefaultUserAgent ( ) | Set Default User Agent | |
setDefaultXmlDecoder ( ) | Set Default XML Decoder | |
setDigestAuthentication ( $username, $password = '' ) | Set Digest Authentication | |
setHeader ( $key, $value ) | Set Header | |
setHeaders ( $headers ) | Set Headers | |
setJsonDecoder ( $function ) | Set JSON Decoder | |
setMaxFilesize ( $bytes ) | Set Max Filesize | |
setOpt ( $option, $value ) : boolean | Set Opt | |
setOpts ( $options ) : boolean | Set Opts | |
setPort ( $port ) | Set Port | |
setReferer ( $referer ) | Set Referer | |
setReferrer ( $referrer ) | Set Referrer | |
setTimeout ( $seconds ) | Set Timeout | |
setUrl ( $url, $data = [] ) | Set Url | |
setUserAgent ( $user_agent ) | Set User Agent | |
setXmlDecoder ( $function ) | Set XML Decoder | |
success ( $callback ) | Success | |
unsetHeader ( $key ) | Unset Header | |
verbose ( boolean $on = true, resource $output = STDERR ) | Verbose |
Method | Description | |
---|---|---|
__get_effectiveUrl ( ) | Get Effective Url | |
__get_rfc2616 ( ) | Get RFC 2616 | |
__get_rfc6265 ( ) | Get RFC 6265 | |
__get_totalTime ( ) | Get Total Time | |
buildURL ( $url, $data = [] ) : string | Build Url | |
downloadComplete ( $fh ) | Download Complete | |
parseHeaders ( $raw_headers ) : array | Parse Headers | |
parseRequestHeaders ( $raw_headers ) : array | Parse Request Headers | |
parseResponse ( $response_headers, $raw_response ) : mixed | Parse Response | |
parseResponseHeaders ( $raw_response_headers ) : array | Parse Response Headers |
public static array_flatten_multidim ( $array, $prefix = false ) : array | ||
$array | ||
$prefix | ||
return | array |
public buildPostData ( $data ) : array | string | ||
$data | ||
return | array | string |
public getResponseCookie ( $key ) : mixed | ||
$key | ||
return | mixed |
public headerCallback ( $ch, $header ) : integer | ||
$ch | ||
$header | ||
return | integer |
public static is_array_assoc ( $array ) : boolean | ||
$array | ||
return | boolean |
public static is_array_multidim ( $array ) : boolean | ||
$array | ||
return | boolean |
public post ( $url, $data = [], $follow_303_with_post = false ) : string | ||
$url | ||
$data | ||
$follow_303_with_post | If true, will cause 303 redirections to be followed using a POST request (default: false). Notes: - Redirections are only followed if the CURLOPT_FOLLOWLOCATION option is set to true. - According to the HTTP specs (see [1]), a 303 redirection should be followed using the GET method. 301 and 302 must not. - In order to force a 303 redirection to be performed using the same method, the underlying cURL object must be set in a special state (the CURLOPT_CURSTOMREQUEST option must be set to the method to use after the redirection). Due to a limitation of the cURL extension of PHP < 5.5.11 ([2], [3]) and of HHVM, it is not possible to reset this option. Using these PHP engines, it is therefore impossible to restore this behavior on an existing php-curl-class Curl object. | |
return | string | [1] https://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.3.2 [2] https://github.com/php/php-src/pull/531 [3] http://php.net/ChangeLog-5.php#5.5.11 |
public removeHeader ( $key ) | ||
$key |
public setBasicAuthentication ( $username, $password = '' ) | ||
$username | ||
$password |
public setConnectTimeout ( $seconds ) | ||
$seconds |
public setCookieString ( $string ) : boolean | ||
$string | ||
return | boolean |
public setDefaultDecoder ( $decoder = 'json' ) | ||
$decoder | string|callable |
public setDigestAuthentication ( $username, $password = '' ) | ||
$username | ||
$password |
public setHeader ( $key, $value ) | ||
$key | ||
$value |
public setHeaders ( $headers ) | ||
$headers |
public unsetHeader ( $key ) | ||
$key |