Guest User

Untitled

a guest
Apr 22nd, 2018
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.64 KB | None | 0 0
  1. <?php
  2. include("db.php");
  3.  
  4. $query = mysql_query("SELECT * FROM temp_websites");
  5.  
  6. while($rows = mysql_fetch_assoc($query))
  7. {
  8.     $url = $rows['website'];
  9.  
  10.     $file_headers = @get_headers($url);
  11.  
  12.     if($file_headers[0] != 'HTTP/1.1 404 Not Found')
  13.     {
  14.         $tags = get_meta_tags($url);
  15.  
  16.         $title =  $tags['title'];
  17.         $keywords = $tags['keywords'];
  18.         $deciption = $tags['description'];
  19.    
  20.         mysql_query("INSERT INTO `engine`(name, deciption, keywords, website_url) VALUES ('$title','$keywords','$deciption','$url')") or die ( mysql_error ( ) );
  21.     }
  22.  
  23.     mysql_query("DELETE FROM `temp_websites` WHERE `website` = '$url'") or die ( mysql_error ( ) );
  24. }
  25. ?>
Add Comment
Please, Sign In to add comment