Freelance Jobs
Marketplace
Forums
Login
Join
Return 3 digit HTTP status code function
Home
\
Forums
\
Programming & Development Forums
\
PHP Forums
\ Return 3 digit HTTP status code function
Share
Tweet
MrPhear
1 years, 5 months ago
In order to get 3 digit HTTP status code of any URL, below php function is a very simple one:)
function get_response($url)
{
$url_head = get_headers($url);
return substr($url_head[0], 9, 3);
}
Guest