Advertisement
Guest User

Untitled

a guest
Apr 20th, 2014
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.35 KB | None | 0 0
  1. $url = 'http://google.com';
  2. list($status) = get_headers($url);
  3. if (strpos($status, '404') !== FALSE) {
  4. // URL is 404ing
  5. }
  6.  
  7. //checking if the site exists by fopen, instead of file_get_contents to speed it up
  8.  
  9. $url = "URL"; //your url goes in this place instead of nabtron.com
  10.  
  11. if (@fopen($url,"r")) {
  12. echo "<b>".$url."</b> is accessible<br />";
  13. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement