This is not duplicate because I made curl follow redirects and the output is 302 http status code
I have this code
<?php
$url="http://www.facebook.com/thisfburldoesnotexist";
$handle = curl_init($url);
curl_setopt($handle, CURLOPT_RETURNTRANSFER, TRUE);
curl_exec($handle);
$httpCode = curl_getinfo($handle, CURLINFO_HTTP_CODE);
echo $httpCode;
curl_close($handle);
?>
to grab the status code of some pages, but when I try to get the status of this http://www.facebook.com/thisfburldoesnotexist
the response is 302, but Chrome report http 404 when debugging
how can I get the actual 404 reported in Chrome?
If I check the url with this tool http://www.websitepulse.com/help/tools.php it reports what I want: 404 - Not Found