skwap Posted August 23, 2011 Share Posted August 23, 2011 Hello friends, i want to check if a website url is working or not. Anyone can share the idea to do this ?? Quote Link to comment https://forums.phpfreaks.com/topic/245497-how-to-check-if-a-webiste-url-is-working-not/ Share on other sites More sharing options...
voip03 Posted August 23, 2011 Share Posted August 23, 2011 <? $file = 'http://www.phpfreaks.com/forums/index.php?topic=342214.0'; $file_headers = @get_headers($file); if($file_headers[0] == 'HTTP/1.1 404 Not Found') { $exists = false; echo "not found"; } else { $exists = true; echo " found"; } ?> Quote Link to comment https://forums.phpfreaks.com/topic/245497-how-to-check-if-a-webiste-url-is-working-not/#findComment-1260914 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.