phpf / httputil
Dependency-free HTTP Utilities
Installs: 31
Dependents: 2
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
pkg:composer/phpf/httputil
Requires
- php: >=5.3
This package is not auto-updated.
Last update: 2025-10-25 21:38:27 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()