SHARE
TWEET

Untitled

a guest Nov 27th, 2014 231 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. $db = new PDO('mysql:host=localhost;dbname=db', 'user', 'password',array(PDO::MYSQL_ATTR_INIT_COMMAND => "SET NAMES utf8"));
  2.  
  3. include("Detect-CMS/Detect-CMS.php");
  4.  
  5. $test = new DetectCMS();
  6.  
  7. for($i=0;$i<200;$i++) {
  8.  
  9.         $query = $db->query("SELECT * FROM `table` WHERE status = 0 ORDER BY RAND()");
  10.  
  11.         $query->execute();
  12.  
  13.         $row = $query->fetch();
  14.  
  15.         $url = $row['url'];
  16.  
  17.         if($detected = $test->check($url)) {
  18.  
  19.                 echo "DETECTED: ".$url." ".$detected."\n";
  20.  
  21.                 // Do something for detected
  22.  
  23.         } else {
  24.  
  25.                 echo "NOT DETECTED: ".$url."\n";
  26.  
  27.                 // Do something if not detected
  28.  
  29.         }
  30.  
  31. }
RAW Paste Data
Top