Advertisement
RieqyNS13

Untitled

Dec 24th, 2013
205
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.91 KB | None | 0 0
  1. <?php
  2. $url="http://rieqyns13.blogspot.com/";
  3. $total=555;
  4.  
  5.  
  6. function curl($url){
  7.     $userAgent = array(
  8.         'Mozilla/5.0 (X11; Linux i686) AppleWebKit/536.5 (KHTML, like Gecko) Chrome/19.0.1084.52 Safari/536.5',
  9.         'Mozilla/5.0 (Windows; U; Windows NT 5.1; it; rv:1.8.1.11) Gecko/20071127 Firefox/2.0.0.11',
  10.         'Opera/9.25 (Windows NT 5.1; U; en)',
  11.         'Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; .NET CLR 2.0.50727)',
  12.         'Mozilla/5.0 (compatible; Konqueror/3.5; Linux) KHTML/3.5.5 (like Gecko) (Kubuntu)',
  13.         'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.12) Gecko/20070731 Ubuntu/dapper-security Firefox/1.5.0.12',
  14.         'Mozilla/5.0 (iPad; U; CPU OS 3_2 like Mac OS X; en-us) AppleWebKit/531.21.10 (KHTML, like Gecko) Version/4.0.4 Mobile/7B334b Safari/531.21.102011-10-16 20:23:50',
  15.         'Mozilla/5.0 (BlackBerry; U; BlackBerry 9800; en) AppleWebKit/534.1+ (KHTML, like Gecko) Version/6.0.0.337 Mobile Safari/534.1+2011-10-16 20:21:10',
  16.         'Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; en) Opera 8.0',
  17.         'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.8.1.6) Gecko/20070725 Firefox/2.0.0.6'
  18.     );
  19.     $ch = curl_init();
  20.     curl_setopt($ch, CURLOPT_URL, $url);
  21.     curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
  22.     curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
  23.     curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
  24.     curl_setopt($ch, CURLOPT_USERAGENT, $userAgent[array_rand($userAgent)]);
  25.     $exec = curl_exec($ch);
  26.     if(!curl_errno($ch)){
  27.         //$info = curl_getinfo($ch, CURLINFO_HTTP_CODE);
  28.         $info = curl_getinfo($ch);
  29.         $ip = $info['primary_ip'];
  30.         $port = $info['primary_port'];
  31.         $code = $info['http_code'];
  32.         curl_close($ch);
  33.         return $ip.":".$port." -> ".$code;
  34.     }
  35.     return "failed";
  36. }
  37.  
  38. $start = time();
  39. for($a=0; $a<$total; $a++){
  40.     echo curl($url)."\n";
  41. }
  42. $end = time()-$start;
  43. echo "\nSelesai dgan waktu ".$end." detik";
  44.  
  45. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement