Kevin Locke's Homepage



HTTP_Accept is a PHP script for dealing with both parsing and constructing of HTTP 1.1 Accept headers according to RFC 2616. It is primarily designed to make it easy for web developers to determine what content to send to clients while following the behavior detailed in the RFC.


Development Status

Idle. HTTP_Accept currently supports all of the features that I need. I have considered attempting to get it into PEAR, and I believe it meets all of the requirements (with the exception of exceptions, which are not supported in PHP 4), but I have not been able to muster enough courage to do it. If you have places to take the software or features to add, please do! I will also happily accept bug reports and feature requests.



Supported Systems

Should work on any system with PHP 4 or 5. It has not yet been tested with PHP 6.



  1. Download it
  2. Extract it and put HTTP_Accept.php into an accessible directory, then include it from the client scripts


The documentation is generated using phpDocumentor, and is available online.

Known Bugs