Advertisement
Guest User

Proxy checker using php, By El3ct71k

a guest
Dec 29th, 2012
290
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.78 KB | None | 0 0
  1. <?php
  2. #Proxy checker V 1.0
  3. #By El3ct71k, [email protected]
  4. function Proxy($file) {
  5.     $fp = fopen($file, 'r');
  6.     $whitelist = fopen('whitelist.txt', 'a+');
  7.     $blacklist = fopen('blacklist.txt', 'a+');
  8.     $logs = '';
  9.     foreach(explode("\r\n", fread($fp, filesize($file))) as $proxy) {
  10.         $opts = array('http' => array('proxy' => 'tcp://'.$proxy, 'request_fulluri' => true));
  11.         $context = stream_context_create($opts);
  12.         if(@file_get_contents('http://dynupdate.no-ip.com/ip.php', false, $context)==True) {
  13.             $logs .= "[+] ".$proxy."<br />";
  14.             fwrite($whitelist, $proxy."\r\n");
  15.         }
  16.         else {
  17.             fwrite($blacklist, $proxy."\r\n");
  18.             $logs .= "[-] ".$proxy." Not work.<br />";
  19.         }
  20.     }
  21.     fclose($fp);
  22.     fclose($whitelist);
  23.     fclose($blacklist);
  24.     echo $logs;
  25. }
  26.  
  27. Proxy('proxylist.txt');
  28. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement