$requestedUrl = “http://www.example.com/abc.php”;
$tags = get_headers($requestedUrl);
if(preg_match(“/Not Found/i”,$tags[0]) || preg_match(“/Service Unavailable/i”,$tags[0]))
{
echo “Requested Url does not exists”;
}
else
{
echo “Requested Url exists”;
}

Leave your comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.