PHP HTTP Functions

EditRocket provides the following information on HTTP functions in the PHP source code builder.

string http_build_cookie ( array $cookie ) -

string http_build_str ( array $query [, string $prefix [, string $arg_separator ]] ) - Opponent to parse_str().

string http_build_url ([ mixed $url [, mixed $parts [, int $flags = HTTP_URL_REPLACE [, array &$new_url ]]]] ) - Build an URL.

bool http_cache_etag ([ string $etag ] ) -

bool http_cache_last_modified ([ int $timestamp_or_expires ] ) - Attempts to cache the sent entity by its last modification date.

string http_chunked_decode ( string $encoded ) - Decodes a string which is HTTP-chunked encoded.

string http_date ([ int $timestamp ] ) - Compose a valid HTTP date regarding RFC 1123 looking like: Wed, 22 Dec 2004 11:34:47 GMT.

string http_deflate ( string $data [, int $flags = 0 ] ) - Compress data with gzip, zlib AKA deflate or raw deflate encoding.

string http_get ( string $url [, array $options [, array &$info ]] ) - Performs an HTTP GET request on the supplied url.

string http_get_request_body ( void ) - Get the raw request body (e.g. POST or PUT data).

resource http_get_request_body_stream ( void ) - Create a stream to read the raw request body (e.g. POST or PUT data).

array http_get_request_headers ( void ) - Get a list of incoming HTTP headers.

string http_head ([ string $url [, array $options [, array &$info ]]] ) - Performs an HTTP HEAD request on the supplied url.

string http_inflate ( string $data ) - Decompress data compressed with either gzip, deflate AKA zlib or raw deflate encoding.

bool http_match_etag ( string $etag [, bool $for_range = FALSE ] ) - Matches the given ETag against the clients If-Match resp. If-None-Match HTTP headers.

bool http_match_modified ([ int $timestamp [, bool $for_range = FALSE ]] ) - Matches the given Unix timestamp against the clients If-Modified-Since resp. If-Unmodified-Since HTTP headers.

bool http_match_request_header ( string $header , string $value [, bool $match_case = FALSE ] ) - Match an incoming HTTP header.

string http_negotiate_charset ( array $supported [, array &$result ] ) - This function negotiates the clients preferred charset based on its Accept-Charset HTTP header. The qualifier is recognized and charsets without qualifier are rated highest.

string http_negotiate_content_type ( array $supported [, array &$result ] ) - This function negotiates the clients preferred content type based on its Accept HTTP header. The qualifier is recognized and content types without qualifier are rated highest.

string http_negotiate_language ( array $supported [, array &$result ] ) - This function negotiates the clients preferred language based on its Accept-Language HTTP header. The qualifier is recognized and languages without qualifier are rated highest. The qualifier will be decreased by 10% for partial matches (i.e. matching primary language).

object http_parse_cookie ( string $cookie [, int $flags [, array $allowed_extras ]] ) - Parses HTTP cookies like sent in a response into a struct.

array http_parse_headers ( string $header ) - Parses HTTP headers into an associative array.

object http_parse_message ( string $message ) -

object http_parse_params ( string $param [, int $flags = HTTP_PARAMS_DEFAULT ] ) - Parse parameter list.

string http_persistent_handles_clean ([ string $ident ] ) - Clean up (close) persistent handles, optionally identified with ident.

object http_persistent_handles_count ( void ) - List statistics about persistent handles usage.

string http_persistent_handles_ident ( string $ident ) - Query or define the ident of persistent handles.

string http_post_data ( string $url [, string $data [, array $options [, array &$info ]]] ) - Performs an HTTP POST request on the supplied url.

string http_post_fields ( string $url [, array $data [, array $files [, array $options [, array &$info ]]]] ) - Performs an HTTP POST request on the supplied url.

string http_put_data ( string $url [, string $data [, array $options [, array &$info ]]] ) - Performs an HTTP PUT request on the supplied url.

string http_put_file ( string $url [, string $file [, array $options [, array &$info ]]] ) - Performs an HTTP PUT request on the supplied url.

string http_put_stream ( string $url [, resource $stream [, array $options [, array &$info ]]] ) - Performs an HTTP PUT request on the supplied url.

void http_redirect ([ string $url [, array $params [, bool $session = FALSE [, int $status ]]]] ) - Redirect to the given url.

string http_request ( int $method [, string $url [, string $body [, array $options [, array &$info ]]]] ) - Performs a custom HTTP request on the supplied url.

string http_request_body_encode ( array $fields , array $files ) - Generate x-www-form-urlencoded resp. form-data encoded request body.

int http_request_method_exists ( mixed $method ) - Check if a request method is registered (or available by default).

string http_request_method_name ( int $method ) - Get the literal string representation of a standard or registered request method.

int http_request_method_register ( string $method ) - Register a custom request method.

bool http_request_method_unregister ( mixed $method ) - Unregister a previously registered custom request method.

bool http_send_content_disposition ( string $filename [, bool $inline = FALSE ] ) - Send the Content-Disposition. The Content-Disposition header is very useful if the data actually sent came from a file or something similar, that should be saved by the client/user (i.e. by browsers Save as... popup window).

bool http_send_content_type ([ string $content_type = 'application/x-octetstream' ] ) - Send the Content-Type of the sent entity.

bool http_send_data ( string $data ) - Sends raw data with support for (multiple) range requests.

bool http_send_file ( string $file ) - Sends a file with support for (multiple) range requests.

bool http_send_last_modified ([ int $timestamp ] ) - Send a Last-Modified header with a valid HTTP date.

bool http_send_status ( int $status ) - Send HTTP status code.

bool http_send_stream ( resource $stream ) - Sends an already opened stream with support for (multiple) range requests.

int http_support ([ int $feature = 0 ] ) - Check for features that require external libraries.

void http_throttle ([ float $sec [, int $bytes = 40960 ]] ) - Sets the throttle delay and send buffer size.

string ob_deflatehandler ( string $data , int $mode ) -

string ob_etaghandler ( string $data , int $mode ) -

string ob_inflatehandler ( string $data , int $mode ) -