\http

This class is designed to provide a simplified interface to cURL which maintains cookies.

Summary

Methods
Properties
Constants
http_code()
data_encode()
__construct()
post()
get()
setHTTPcreds()
__destruct()
$cookie_jar
$postfollowredirs
$getfollowredirs
$quiet
$userAgent
$httpHeader
$defaultHttpHeader
$ch
$uid
$cookie_jar
$postfollowredirs
$getfollowredirs
$quiet
$userAgent
$httpHeader
$defaultHttpHeader
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
$ch
$uid
N/A

Properties

$cookie_jar

$cookie_jar : 

Type

$postfollowredirs

$postfollowredirs : 

Type

$getfollowredirs

$getfollowredirs : 

Type

$quiet

$quiet : 

Type

$userAgent

$userAgent : 

Type

$httpHeader

$httpHeader : 

Type

$defaultHttpHeader

$defaultHttpHeader : 

Type

$ch

$ch : 

The cURL class reference

Type

$uid

$uid : 

The cURL UID object

Type

$cookie_jar

$cookie_jar : 

The cURL cookie_jar object

Type

$postfollowredirs

$postfollowredirs : 

Type

$getfollowredirs

$getfollowredirs : 

Type

$quiet

$quiet : 

Type

$userAgent

$userAgent : 

The default User agent

Type

$httpHeader

$httpHeader : 

Type

$defaultHttpHeader

$defaultHttpHeader : 

Type

$ch

$ch : 

Type

$uid

$uid : 

Type

Methods

http_code()

http_code() : array

Get the HTTP code from cURL.

Returns

array

data_encode()

data_encode(  $data,   $keyprefix = "",   $keypostfix = "") : array

Encode the HTTP data.

Parameters

$data
$keyprefix
$keypostfix

Returns

array

__construct()

__construct() : void

This is the Construct.

post()

post(  $url,   $data) : mixed

Send data through HTTP POST.

Parameters

$url

The target URL.

$data

The POST data.

Returns

mixed —

The response from Server.

get()

get(  $url) : mixed

Send data through HTTP GET.

Parameters

$url

The target URL.

Returns

mixed —

The response from Server.

setHTTPcreds()

setHTTPcreds(  $uname,   $pwd) : void

Set the HTTP credentials.

Parameters

$uname
$pwd

__destruct()

__destruct() : void

This is the destruct.