PHP Classes

PHP HTTP Status Code Constants: Get messages and descriptions of HTTP status codes

Recommend this page to a friend!
     
  Info   View files Files   Install with Composer Install with Composer   Download Download   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
Not enough user ratingsTotal: 203 All time: 8,454 This week: 673Up
Version License PHP version Categories
http-status-codes 1.0.0MIT/X Consortium ...5HTTP, PHP 5
Description 

Author

This class can be used to get messages and descriptions of HTTP status codes.

It contains definitions of constants all common HTTP response status codes including the respective message to be returned with the code in a HTTP response and the respective description.

The class can return the message or the description for a given HTTP status code.

Innovation Award
PHP Programming Innovation award nominee
September 2019
Number 12
HTTP status codes are important to return to the browser or the HTTP client that sends a request to a Web server. They return a code and and message that tell if the request succeeded or not.

This class can return the message and and description associated to many known HTTP status codes, so applications can generate HTTP status response headers without having to know how to format them correctly.

Manuel Lemos
Picture of Kacper Rowinski
  Performance   Level  
Name: Kacper Rowinski <contact>
Classes: 14 packages by
Country: Poland Poland
Age: 40
All time rank: 91426 in Poland Poland
Week rank: 195 Up2 in Poland Poland Up
Innovation award
Innovation award
Nominee: 8x

Details

http-status-codes

PHP List of HTTP status codes, messages and description for them.

Why?

Almost every framework got one but none external as external package to use in your own project. Hope this will help others.


  Files folder image Files (7)  
File Role Description
Files folder imagesrc (1 directory)
Files folder imagetests (1 directory)
Accessible without login Plain text file .travis.yml Data Auxiliary data
Accessible without login Plain text file composer.json Data Auxiliary data
Accessible without login Plain text file LICENSE Lic. License text
Accessible without login Plain text file phpunit.xml Data Auxiliary data
Accessible without login Plain text file README.md Doc. Documentation

  Files folder image Files (7)  /  src  
File Role Description
Files folder imageHttpStatusCodes (1 file)

  Files folder image Files (7)  /  src  /  HttpStatusCodes  
File Role Description
  Plain text file HttpStatusCodes.php Class Class source

  Files folder image Files (7)  /  tests  
File Role Description
Files folder imageUnit (1 file)

  Files folder image Files (7)  /  tests  /  Unit  
File Role Description
  Plain text file HttpStatusCodesTest.php Class Class source

The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page.
Install with Composer Install with Composer
 Version Control Unique User Downloads Download Rankings  
 100%
Total:203
This week:0
All time:8,454
This week:673Up