Simple Web Presenter
An extremely basic CMS
 All Classes Files Functions Variables Pages
Static Public Member Functions | List of all members
Http Class Reference

Static Public Member Functions

static get_uri_contents ($uri)
 
static headersToArray ($response)
 
static getHeaders ($url, $timeout=1)
 
static postHeaders ($uri, $params, $timeout=1)
 

Detailed Description

Http contains a set of functions for retrieving http information

Member Function Documentation

static Http::get_uri_contents (   $uri)
static

Gets the content of a page

This mimics the file_content with a uri parameter which is often disabled due to security reasons

Parameters
$uriThe uri to fetch
static Http::getHeaders (   $url,
  $timeout = 1 
)
static

Queries a URL for headers

Parameters
$urlthe url to query
$timeoutfloat number of seconds to wait before timeout
Returns
an associative array of all headers returned
static Http::headersToArray (   $response)
static

Splits an http header response into an associative array

Parameters
$responseThe headers to parse
Returns
an Associative array, the key '' refers to the HTTP status header
static Http::postHeaders (   $uri,
  $params,
  $timeout = 1 
)
static

Performs a post to an URI for headers

Parameters
$urithe uri to query
$paramsan associative array of params to post
$timeoutfloat number of seconds to wait before timeout
Returns
an associative array of all headers returned

The documentation for this class was generated from the following file: