Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
HTTP status codes array
<?php
$code = array();
$code['0'] = 'Connection Failed. Please configure Varnish to accept HTTP purge requests.';
$code['100'] = 'Continue';
$code['101'] = 'Switching Protocols';
$code['102'] = 'Processing';
$code['200'] = 'OK';
$code['201'] = 'Created';
$code['202'] = 'Accepted';
$code['203'] = 'Non-Authoritative Information';
$code['204'] = 'No Content';
$code['205'] = 'Reset Content';
$code['206'] = 'Partial Content';
$code['207'] = 'Multi-Status';
$code['300'] = 'Multiple Choices';
$code['301'] = 'Moved Permanently';
$code['302'] = 'Found';
$code['303'] = 'See Other';
$code['304'] = 'Not Modified';
$code['305'] = 'Use Proxy';
$code['306'] = 'Switch Proxy';
$code['307'] = 'Temporary Redirect';
$code['400'] = 'Bad Request';
$code['401'] = 'Unauthorized';
$code['402'] = 'Payment Required';
$code['403'] = 'Forbidden';
$code['404'] = 'Not Found';
$code['405'] = 'Method Not Allowed';
$code['406'] = 'Not Acceptable';
$code['407'] = 'Proxy Authentication Required';
$code['408'] = 'Request Timeout';
$code['409'] = 'Conflict';
$code['410'] = 'Gone';
$code['411'] = 'Length Required';
$code['412'] = 'Precondition Failed';
$code['413'] = 'Request Entity Too Large';
$code['414'] = 'Request-URI Too Long';
$code['415'] = 'Unsupported Media Type';
$code['416'] = 'Requested Range Not Satisfiable';
$code['417'] = 'Expectation Failed';
$code['418'] = 'I\'m a teapot';
$code['422'] = 'Unprocessable Entity';
$code['423'] = 'Locked';
$code['424'] = 'Failed Dependency';
$code['425'] = 'Unordered Collection';
$code['426'] = 'Upgrade Required';
$code['449'] = 'Retry With';
$code['450'] = 'Blocked by Windows Parental Controls';
$code['500'] = 'Internal Server Error';
$code['501'] = 'Not Implemented';
$code['502'] = 'Bad Gateway';
$code['503'] = 'Service Unavailable';
$code['504'] = 'Gateway Timeout';
$code['505'] = 'HTTP Version Not Supported';
$code['506'] = 'Variant Also Negotiates';
$code['507'] = 'Insufficient Storage';
$code['509'] = 'Bandwidth Limit Exceeded';
$code['510'] = 'Not Extended';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.