PHP Classes
elePHPant
Icontem

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    
Last Updated Ratings Unique User Downloads Download Rankings
2019-09-24 (2 months ago) RSS 2.0 feedNot yet rated by the usersTotal: 187 All time: 8,375 This week: 314Up
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
  Performance   Level  
Name: Kacper Rowinski <contact>
Classes: 13 packages by
Country: Poland Poland
Age: 35
All time rank: 100628 in Poland Poland
Week rank: 93 Up4 in Poland Poland Up
Innovation award
Innovation award
Nominee: 7x

 

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:187
This week:0
All time:8,375
This week:314Up