class vB_vURL

deprecated . Use vB_Utility_Url (acessed via vB::getUrlLoader());

vBulletin remote url class

This class handles sending and returning data to remote urls via cURL

Traits

Properties

int $error Error code
integer $bitoptions Options bitfield
array $options Options Array
array $classnames Transport Object Array
array $transports Transport Object Array
string $tmpfile Temporary filename for storing result

Methods

__sleep()

No description

__wakeup()

No description

reset()

Resets the class to initial settings

__construct()

Constructor

__destruct()

Destructor for PHP 5+, this deals with the case that people forget to either unlink or move the file.

set_option(integer $option, mixed $extra)

On/Off options

mixed
exec()

The do it all function

mixed
format_response(array $response)

The function which formats the response array, removing what isn't required

mixed
exec2()

new vURL method which stores items in a file if it can until needed

array
build_headers(string $data)

Build the headers array

set_error(integer $errorcode)

Set Error

integer
fetch_error()

Return Error

mixed
fetch_head(string $url)

Does a HTTP HEAD Request

mixed
fetch_body(string $url, integer $maxsize, boolean $dieonmaxsize, boolean $returnheaders)

Does a HTTP Request, returning the body of the document

Details

in vB_Trait_NoSerialize at line 15
__sleep()

in vB_Trait_NoSerialize at line 20
__wakeup()

at line 105
reset()

Resets the class to initial settings

at line 134
__construct()

Constructor

at line 151
__destruct()

Destructor for PHP 5+, this deals with the case that people forget to either unlink or move the file.

at line 166
set_option(integer $option, mixed $extra)

On/Off options

Parameters

integer $option one of the VURL_* defines
mixed $extra option to set

at line 235
mixed exec()

The do it all function

Return Value

mixed false on failure, array or string on success

at line 262
mixed format_response(array $response)

The function which formats the response array, removing what isn't required

Parameters

array $response response containing headers and body / body_file

Return Value

mixed true or array depending on response requested

at line 302
mixed exec2()

new vURL method which stores items in a file if it can until needed

Return Value

mixed false on failure, true or array depending on response requested

at line 347
array build_headers(string $data)

Build the headers array

Parameters

string $data string of headers split by "\r\n"

Return Value

array

at line 375
set_error(integer $errorcode)

Set Error

Parameters

integer $errorcode Error Code

at line 385
integer fetch_error()

Return Error

Return Value

integer

at line 398
mixed fetch_head(string $url)

Does a HTTP HEAD Request

Parameters

string $url The URL to do the head request on

Return Value

mixed False on Failure, Array or String on Success

at line 421
mixed fetch_body(string $url, integer $maxsize, boolean $dieonmaxsize, boolean $returnheaders)

Does a HTTP Request, returning the body of the document

Parameters

string $url The URL
integer $maxsize The Maximum Size to get
boolean $dieonmaxsize Die when we reach the maximum Size?
boolean $returnheaders Also Get headers?

Return Value

mixed False on Failure, Array or String on Success