Advertisement
alexx876

ProxyChecker

Feb 5th, 2019
276
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.63 KB | None | 0 0
  1. <?php
  2. $all = file('all.txt');
  3. /*
  4. foreach ($all as $a) {
  5.     $a = explode(' - ', $a)[1];
  6.     if (trim($a)) echo $a;
  7. }
  8. die();
  9.  
  10. */
  11. $now = json_decode(file_get_contents('now.txt'));
  12. $used = [];
  13. $i = 0;
  14. foreach ($all as $a) {
  15.     $used[$i] = ['proxy' => $a];
  16.     foreach ($now as $index=>$pack) {
  17.         foreach (explode("\n",$pack) as $item) {
  18.             if (strripos($item, trim($a)) !== false) {
  19.                 $used[$i]['used'][] = $index;
  20.             }
  21.         }
  22.     }
  23.     $i++;
  24. }
  25. foreach ($used as $us) {
  26.     if ($us['used']) echo 'Прокси '.trim($us['proxy']).', пачки: '.json_encode($us['used'])."\n";
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement