phpf / httputil
Dependency-free HTTP Utilities
dev-master
2014-05-18 23:50 UTC
Requires
- php: >=5.3
This package is not auto-updated.
Last update: 2025-02-01 17:58:12 UTC
README
Utilities for working with HTTP requests and responses.
- PHP 5.3+
- No dependencies
- Cross-platform
####Primary features
- Full set of functions for retrieving request headers
- Utilities similar to those found in the pecl_http extension (v1), such as
http_get_request_headers()
andhttp_negotiate_content_type()
. - some general-use classes and functions for negotiating request header values based on
q
- a fallback for
http_response_code()
(PHP < 5.4) - Mimetype helpers and some other stuff
###Function list
The following functions are based on, and largely consistent with, their pecl_http
extension (v1) counterparts:
http_build_url()
http_date()
http_redirect()
http_send_status()
http_send_content_type()
http_send_content_disposition()
http_send_file()
http_get_request_body()
http_get_request_body_stream()
http_get_request_headers()
http_match_request_header()
http_negotiate_content_type()
http_negotiate_language()
The following functions are also available:
http_get_request_header()
http_negotiate_request_header()
http_in_request_header()
http_build_cache_headers()
http_response_code()
http_response_code_desc()
http_env()
mimetype()
mime2filetype()