SproutCMS

This is the code documentation for the SproutCMS project

Page options:

Inherited members

class MyHttpReq

Variables

NameVisibilityDescription
$http_headers (static) 
$http_info (static) 
$http_status (static) 

Functions

NameVisibilityDescription
buildHeadersStringpublic (static) 
getpublic (static)Make a simple GET request.
getLastreqHeaderspublic (static)Return headers of the last request
getLastreqInfopublic (static)Return info of the last request
getLastreqStatuspublic (static)Return the http status code ofthe last request
postpublic (static)Make a simple POST request, with optional data
reqpublic (static)Make a HTTP request. Returns the response content.
reqAdvancedpublic (static)Performs a request while permitting advanced cURL options to be specified.
reqCurlprivate (static)Sends a HTTP request using cURL.
reqFopenprivate (static)Sends a HTTP request using fopen (i.e. file_get_contents)

public buildHeadersString

unknown MyHttpReq::buildHeadersString ( mixed $headers );

This function does not have a description

public get (from HttpReq)

string HttpReq::get ( string $url );

Make a simple GET request.
If you need more control, use @see HttpReq::req

public getLastreqHeaders (from HttpReq)

array HttpReq::getLastreqHeaders ( );

Return headers of the last request

public getLastreqInfo (from HttpReq)

array HttpReq::getLastreqInfo ( );

Return info of the last request

public getLastreqStatus (from HttpReq)

int HttpReq::getLastreqStatus ( );

Return the http status code ofthe last request

public post (from HttpReq)

string HttpReq::post ( string $url [, array $data ] );

Make a simple POST request, with optional data
If you need more control, use @see HttpReq::req

public req (from HttpReq)

Reponse HttpReq::req ( string $url , array $opts [, string/array $data ] );

Make a HTTP request. Returns the response content.

The request options array accepts the following keys:
  method     The HTTP method to use ('GET', 'POST')
  headers    An array of headers; see ::buildHeadersString
             for format information

public reqAdvanced (from HttpReq)

string HttpReq::reqAdvanced ( string $url , string $method [, string|array $post_data , array $curl_options ] );

Performs a request while permitting advanced cURL options to be specified.
Essentially just a wrapper around cURL that has some sane options set by default;
e.g. return transfer, no return headers, SSL configured, proxy settings.

private reqCurl (from HttpReq)

unknown HttpReq::reqCurl ( mixed $url , array $opts [, mixed $data ] );

Sends a HTTP request using cURL.

private reqFopen (from HttpReq)

unknown HttpReq::reqFopen ( mixed $url , array $opts [, mixed $data ] );

Sends a HTTP request using fopen (i.e. file_get_contents)