PHP Manual
Prev |  | Next

# LV. HTTP

# Introduction

This HTTP extension aims to provide a convenient and powerful set of functionality for one of PHPs major applications.

It eases handling of HTTP URLs, dates, redirects, headers and messages, provides means for negotiation of clients preferred language and charset, as well as a convenient way to send any arbitrary data with caching and resuming capabilities.

It provides powerful request functionality, if built with CURL support. Parallel requests are available for PHP 5 and greater.

Additionally to the API reference in this manual you can find information about how to install and configure as well as which global constants are predefined in the following sections:

Installation
Configuration
Global Constants
Resource Types

# Classes

The classes below are defined by this extension, and will only be available when the extension has either been compiled into PHP or dynamically loaded at runtime.

The HttpResponse class requires at least PHP v5.1. Any other class is available as of PHP v5.0.

> Note: Be aware though, that some methods are not available with PHP v5.0.

HttpMessage
HttpQueryString
HttpDeflateStream
HttpInflateStream
HttpRequest
HttpRequestPool
HttpResponse

# Functions

## Built-in Functions

Built-in HTTP related functions previously listed on this page can be found in the networking category.

The following functions do not need the HTTP module to be present: header(), headers_list(), headers_sent(), setcookie() and setrawcookie().

## Caching

http_cache_etag()
http_cache_last_modified()

## Encodings

http_chunked_decode()
http_deflate()
http_inflate()

## Miscellaneous

http_build_cookie()
http_date()
http_get_request_body_stream()
http_get_request_body()
http_get_request_headers()
http_match_etag()
http_match_modified()
http_match_request_header()
http_support()

## Negotiation

http_negotiate_charset()
http_negotiate_content_type()
http_negotiate_language()

## Outputhandlers

ob_deflatehandler()
ob_etaghandler()
ob_inflatehandler()

## Parsers

http_parse_cookie()
http_parse_headers()
http_parse_message()
http_parse_params()

## Requests

http_get()
http_head()
http_post_data()
http_post_fields()
http_put_data()
http_put_file()
http_put_stream()
http_request_body_encode()
http_request_method_exists()
http_request_method_name()
http_request_method_register()
http_request_method_unregister()
http_request()

## Responses

http_redirect()
http_send_content_disposition()
http_send_content_type()
http_send_data()
http_send_file()
http_send_last_modified()
http_send_status()
http_send_stream()
http_throttle()

## URLs

http_build_str()
http_build_url()

## Persistent Handles

http_persistent_handles_count()
http_persistent_handles_ident()
http_persistent_handles_clean()

Prev | Home | Next
hash | Up | Installation