PHP Classes

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

Recommend this page to a friend!
  Info   View files View files (7)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
Not enough user ratingsTotal: 203 This week: 1All time: 8,449 This week: 560Up
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: 91726 in Poland Poland
Week rank: 27 Up1 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  
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  /  src  
File Role Description
Files folder imageHttpStatusCodes (1 file)

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

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

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

 Version Control Unique User Downloads Download Rankings  
 100%
Total:203
This week:1
All time:8,449
This week:560Up