Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $url = 'http://google.com';
- list($status) = get_headers($url);
- if (strpos($status, '404') !== FALSE) {
- // URL is 404ing
- }
- //checking if the site exists by fopen, instead of file_get_contents to speed it up
- $url = "URL"; //your url goes in this place instead of nabtron.com
- if (@fopen($url,"r")) {
- echo "<b>".$url."</b> is accessible<br />";
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement