/**
* Returns description of an HTML code.
* @param string $HTMLCode.
* @return string.
*/
function net_get_HTMLDescriptionFromCode($HTMLCode){
$HTMLCodeDescrs = array('100'=>'Continue','200'=>'OK','201'=>'Created','202'=>'Accepted',
'203'=>'Non-Authoritive Information','202'=>'No Content', '205'=>'Reset Content',
'206'=>'Partial Content','301'=>'Moved Permanently','302'=>'Found','303'=>'See Other',
'304'=>'Not Modified','305'=>'Use Proxy','307'=>'Temporary Redirect','401'=>'Unauthorized',
'402'=>'Payment Required', '403'=>'Forbidden', '404'=>'Not Found', '405'=>'Method Not Allowed',
'406'=>'Not Acceptable', '407'=>'Proxy Authentication Required', '408'=>'Request Timeout',
'409'=>'Conflict', '410'=>'Gone', '411'=>'Length Required', '412'=>'Precondition Failed',
'413'=>'Request Entity Too Large','414'=>'Request-URI Too Long', '415'=>'Unsupported Media Type',
'416'=>'Requested Range Not Satisfiable', '417'=>'Expectation Failed',
'500'=>'Internal Server Error', '501'=>'Not Implemented', '502'=>'Bad Gateway',
'503'=>'Service Unavailable', '504'=>'Gateway Timeout', '505'=>'HTTP Version Not Supported');
return isset($HTMLCodeDescrs[$HTMLCode])?$HTMLCodeDescrs[$HTMLCode]:'Unknown network error';
}
PHP and javascript snippets you can copy and paste.
Subscribe to:
Post Comments (Atom)
Blog Archive
-
▼
2007
(71)
-
▼
March
(25)
- net_get_HTMLDescriptionFromCode($HTMLCode)
- net_increment_ipAddress($iPAddress)
- sec_remove_emailInjectionChars($str)
- str_get_textBetween($start,$end,$str)
- str_remove_doubleQuotes($str)
- str_remove_Quotes($str)
- ajax request
- str_remove_singleQuotes($str)
- str_explode_strAssoc($separator,$assignSeparator,$...
- str_get_strlenmb($s)
- str_get_substrmb($s,$start,$len)
- ajx_print_r
- str_remove_strFromStart($needle,$haystack)
- file_write($fileName, $data, $mode)
- net_get_remoteFile($path,$method='GET',$timeout=30)
- str_get_pointsBetween($start,$end,$s,$n=0)
- dir_do_dirIteratorCallback($dir,$fn,$params)
- fnc_conv_argsToArray()
- net_conv_urlStringToArray($urlStr)
- net_conv_arrayToURLStr($arr,$prefix,$arg_separator)
- xml_get_isXML($xml)
- str_get_strMatchesEnd($needle,$haystack)
- str_conv_strToLowerCaseArray($separator,$s)
- fnc_wrap($fnc)
- net-get-randomIP()
-
▼
March
(25)
No comments:
Post a Comment