Rainbow_Spike

HTTP Error Codes List

Apr 10th, 2014
176
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.37 KB | None | 0 0
  1. function http_status($code = 200, $text = '') {
  2.     static $stati = array(
  3.         200 => 'OK',
  4.         201 => 'Created',
  5.         202 => 'Accepted',
  6.         203 => 'Non-Authoritative Information',
  7.         204 => 'No Content',
  8.         205 => 'Reset Content',
  9.         206 => 'Partial Content',
  10.  
  11.         300 => 'Multiple Choices',
  12.         301 => 'Moved Permanently',
  13.         302 => 'Found',
  14.         304 => 'Not Modified',
  15.         305 => 'Use Proxy',
  16.         307 => 'Temporary Redirect',
  17.  
  18.         400 => 'Bad Request',
  19.         401 => 'Unauthorized',
  20.         403 => 'Forbidden',
  21.         404 => 'Not Found',
  22.         405 => 'Method Not Allowed',
  23.         406 => 'Not Acceptable',
  24.         407 => 'Proxy Authentication Required',
  25.         408 => 'Request Timeout',
  26.         409 => 'Conflict',
  27.         410 => 'Gone',
  28.         411 => 'Length Required',
  29.         412 => 'Precondition Failed',
  30.         413 => 'Request Entity Too Large',
  31.         414 => 'Request-URI Too Long',
  32.         415 => 'Unsupported Media Type',
  33.         416 => 'Requested Range Not Satisfiable',
  34.         417 => 'Expectation Failed',
  35.         499 => 'Client Closed Request',
  36.  
  37.         500 => 'Internal Server Error',
  38.         501 => 'Not Implemented',
  39.         502 => 'Bad Gateway',
  40.         503 => 'Service Unavailable',
  41.         504 => 'Gateway Timeout',
  42.         505 => 'HTTP Version Not Supported'
  43.     );
  44. }
Advertisement
Add Comment
Please, Sign In to add comment