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 ?? 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"; } ?> 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
Archived
This topic is now archived and is closed to further replies.