コード例 #1
0
ファイル: spys.ru.php プロジェクト: bpteam/php-proxy-list
 * User: EC
 * Date: 14.05.13
 * Time: 3:35
 * Project: GetContent
 * @author: Evgeny Pynykh bpteam22@gmail.com
 */
use bpteam\Loader\Loader;
use bpteam\DryText\DryPath;
use bpteam\DryText\DryHtml;
use bpteam\ProxyList\ProxyUpdate;
return array();
$urlSource = "http://spys.ru/aproxy/";
$nameSource = "spys.ru";
/**
 * @var Loader|\bpteam\Loader\LoaderSingleCurl $curl
 */
$curl = new Loader('LoaderSingleCurl');
$updateProxy = new ProxyUpdate();
$curl->setTypeContent("html");
$curl->setDefaultOption(CURLOPT_POST, true);
$curl->setDefaultOption(CURLOPT_POSTFIELDS, 'sto=%CF%EE%EA%E0%E7%E0%F2%FC+200');
$answerSpys = $curl->load($urlSource);
$answerSpys = DryHtml::betweenTag($answerSpys, '<table width="100%" BORDER=0 CELLPADDING=1 CELLSPACING=1>');
$ips = DryPath::getIp($answerSpys);
if ($ips) {
    foreach ($ips as $valueSpys) {
        $proxySpysProxy[] = trim($valueSpys);
    }
}
$updateProxy->saveSource($nameSource, $proxySpysProxy);
return $proxySpysProxy;
コード例 #2
0
<?php

/**
 * Created by JetBrains PhpStorm.
 * User: EC
 * Date: 14.05.13
 * Time: 2:36
 * Project: GetContent
 * @author: Evgeny Pynykh bpteam22@gmail.com
 */
use bpteam\Curl\SingleCurl;
use bpteam\DryText\DryPath;
use bpteam\ProxyList\ProxyUpdate;
return array();
$urlSource = "http://checkerproxy.net/all_proxy";
$nameSource = "checkerproxy.net";
$curl = new SingleCurl();
$updateProxy = new ProxyUpdate();
$answerCheckerProxy = $curl->load($urlSource);
$proxyCheckerProxy = [];
$ips = DryPath::getIp($answerCheckerProxy);
if ($ips) {
    foreach ($ips as $valueCheckerProxy) {
        $valueCheckerProxy = trim($valueCheckerProxy);
        if (DryPath::isIp($valueCheckerProxy)) {
            $proxyCheckerProxy[] = $valueCheckerProxy;
        }
    }
}
$updateProxy->saveSource($nameSource, $proxyCheckerProxy);
return $proxyCheckerProxy;
コード例 #3
0
ファイル: xseo.in.php プロジェクト: bpteam/php-proxy-list
 * User: EC
 * Date: 14.05.13
 * Time: 3:26
 * Project: GetContent
 * @author: Evgeny Pynykh bpteam22@gmail.com
 */
use bpteam\Loader\Loader;
use bpteam\DryText\DryPath;
use bpteam\DryText\DryHtml;
use bpteam\ProxyList\ProxyUpdate;
$urlSource = "http://xseo.in/freeproxy";
$nameSource = "xseo.in";
/**
 * @var Loader|\bpteam\Loader\LoaderSingleCurl $curl
 */
$curl = new Loader('LoaderSingleCurl');
$updateProxy = new ProxyUpdate();
$curl->setTypeContent("html");
$curl->setDefaultOption(CURLOPT_POST, true);
$curl->setDefaultOption(CURLOPT_POSTFIELDS, 'submit=%CF%EE%EA%E0%E7%E0%F2%FC+%EF%EE+100+%EF%F0%EE%EA%F1%E8+%ED%E0+%F1%F2%F0%E0%ED%E8%F6%E5');
$answerXseo = $curl->load($urlSource);
$proxyXseoProxy = array();
$answerXseo = DryHtml::betweenTag($answerXseo, '<table width="100%" BORDER=0 CELLPADDING=0 CELLSPACING=1>', false);
$ips = DryPath::getIp($answerXseo);
if ($ips) {
    foreach ($ips as $value_xseo) {
        $proxyXseoProxy[] = trim($value_xseo);
    }
}
$updateProxy->saveSource($nameSource, $proxyXseoProxy);
return $proxyXseoProxy;
コード例 #4
0
<?php

/**
 * Created by JetBrains PhpStorm.
 * User: EC
 * Date: 14.05.13
 * Time: 3:35
 * Project: GetContent
 * @author: Evgeny Pynykh bpteam22@gmail.com
 */
use bpteam\Loader\Loader;
use bpteam\DryText\DryPath;
use bpteam\ProxyList\ProxyUpdate;
//return array();
$urlSource = "http://stopinfection.narod.ru/Proxy.htm";
$nameSource = "stopinfection.narod.ru";
$curl = new Loader('LoaderSingleCurl');
$updateProxy = new ProxyUpdate();
$curl->setEncodingAnswer(true);
$curl->setEncodingName('UTF-8');
$curl->setTypeContent("html");
$answerStopinfection = $curl->load($urlSource);
$proxyStopinfectionProxy = [];
if ($answerStopinfection && ($ips = DryPath::getIp($answerStopinfection))) {
    foreach ($ips as $valueStopinfection) {
        $proxyStopinfectionProxy[] = trim($valueStopinfection);
    }
}
$updateProxy->saveSource($nameSource, $proxyStopinfectionProxy);
return $proxyStopinfectionProxy;
コード例 #5
0
ファイル: import.php プロジェクト: bpteam/php-proxy-list
<?php

/**
 * Created by JetBrains PhpStorm.
 * User: EC
 * Date: 14.05.13
 * Time: 3:35
 * Project: GetContent
 * @author: Evgeny Pynykh bpteam22@gmail.com
 */
use bpteam\DryText\DryPath;
use bpteam\ProxyList\ProxyUpdate;
$urlSource = __DIR__ . "/../proxy_list/source/import.page";
$nameSource = "import";
$updateProxy = new ProxyUpdate();
$fh = fopen($urlSource, 'r');
while ($answer = fgets($fh)) {
    $ips = DryPath::getIp($answer);
    if ($ips) {
        foreach ($ips as $value) {
            $value = trim($value);
            if (DryPath::isIp($value)) {
                $proxy[] = $value;
            }
        }
    }
}
$updateProxy->saveSource($nameSource, $proxy);
return $proxy;
コード例 #6
0
 * Date: 14.05.13
 * Time: 3:35
 * Project: GetContent
 * @author: Evgeny Pynykh bpteam22@gmail.com
 */
use bpteam\Loader\Loader;
use bpteam\DryText\DryPath;
use bpteam\ProxyList\ProxyUpdate;
$urlSource = "http://www.cool-tests.com/all-working-proxies.php";
$nameSource = "cool-tests.com";
/**
 * @var Loader|bpteam\Loader\LoaderSingleCurl $curl
 */
$curl = new Loader('LoaderSingleCurl');
$updateProxy = new ProxyUpdate();
$curl->setEncodingAnswer(true);
$curl->setEncodingName('UTF-8');
$curl->load('http://www.cool-tests.com');
$curl->setTypeContent("html");
$curl->setDefaultOption(CURLOPT_REFERER, 'http://www.cool-tests.com');
$answerCoolTests = $curl->load($urlSource);
$proxyCoolTestsProxy = [];
$ips = DryPath::getIp($answerCoolTests);
if (!$ips) {
    return [];
}
foreach ($ips as $valueCoolTests) {
    $proxyCoolTestsProxy[] = trim($valueCoolTests);
}
$updateProxy->saveSource($nameSource, $proxyCoolTestsProxy);
return $proxyCoolTestsProxy;
コード例 #7
0
 * Project: GetContent
 * @author: Evgeny Pynykh bpteam22@gmail.com
 */
use bpteam\Loader\Loader;
use bpteam\DryText\DryPath;
use bpteam\ProxyList\ProxyUpdate;
$urlSource = "http://gatherproxy.com/subscribe/login";
$nameSource = "gatherproxy.com";
$proxyGatherproxyProxy = [];
/**
 * @var Loader|\bpteam\Loader\LoaderSingleCurl $curl
 */
$curl = new Loader('LoaderSingleCurl');
$updateProxy = new ProxyUpdate();
$curl->setDefaultOption(CURLOPT_REFERER, 'http://gatherproxy.com/subscribe/login');
$curl->setTypeContent("html");
$curl->setDefaultOption(CURLOPT_POSTFIELDS, 'Username=zking.nothingz@gmail.com&Password=)VQd$x;7');
$answerGatherproxy = $curl->load($urlSource);
if (!preg_match('%<a\\s*href="(?<url>[^"]+)">Download\\s*fully\\s*\\d+\\s*proxies</a>%ims', $answerGatherproxy, $match)) {
    return $proxyGatherproxyProxy;
}
$curl->setDefaultOption(CURLOPT_REFERER, 'http://gatherproxy.com/subscribe/infos');
$answerGatherproxy = $curl->load('http://gatherproxy.com' . $match['url']);
$ips = DryPath::getIp($answerGatherproxy);
if ($ips) {
    foreach ($ips as $valueGatherproxy) {
        $proxyGatherproxyProxy[] = trim($valueGatherproxy);
    }
}
$updateProxy->saveSource($nameSource, $proxyGatherproxyProxy);
return $proxyGatherproxyProxy;
コード例 #8
0
ファイル: poststar.ru.php プロジェクト: bpteam/php-proxy-list
/**
 * Created by JetBrains PhpStorm.
 * User: EC
 * Date: 14.05.13
 * Time: 2:36
 * Project: GetContent
 * @author: Evgeny Pynykh bpteam22@gmail.com
 */
use bpteam\Loader\Loader;
use bpteam\DryText\DryPath;
use bpteam\DryText\DryHtml;
use bpteam\ProxyList\ProxyUpdate;
$urlSource = "http://www.poststar.ru/proxy.htm";
$nameSource = "poststar.ru";
$curl = new Loader('LoaderSingleCurl');
$updateProxy = new ProxyUpdate();
$curl->setTypeContent("html");
$answerPoststar = $curl->load($urlSource);
$answerPoststar = DryHtml::betweenTag($answerPoststar, '<table width="730" border="0" align="center">');
$proxyPoststarProxy = [];
$ips = DryPath::getIp($answerPoststar);
if ($ips) {
    foreach ($ips as $valuePoststar) {
        $valuePoststar = trim($valuePoststar);
        if (DryPath::isIp($valuePoststar)) {
            $proxyPoststarProxy[] = $valuePoststar;
        }
    }
}
$updateProxy->saveSource($nameSource, $proxyPoststarProxy);
return $proxyPoststarProxy;
コード例 #9
0
ファイル: ProxyUpdate.php プロジェクト: bpteam/php-proxy-list
 /**
  * Переделать или делать запрос на другой сервис
  * @param $ip
  * @return void
  */
 public function setServerIp($ip)
 {
     if (!$ip) {
         $answer = file_get_contents($this->getUrlCheckServerIp());
         $ip = DryPath::getIp($answer);
         if (!isset($ip[0]) || !$ip[0]) {
             exit('NO SERVER IP');
         }
         $this->setServerIp($ip[0]);
     } else {
         $this->serverIp = $ip;
     }
 }
コード例 #10
0
ファイル: Proxy.php プロジェクト: bpteam/php-proxy-list
 public function loadProxy($url)
 {
     $proxyListPage = file_get_contents($url);
     $proxy = [];
     if ($proxies = DryPath::getIp($proxyListPage)) {
         foreach ($proxies as $findProxy) {
             $proxy[$findProxy] = ['proxy' => $findProxy];
         }
         $this->write($proxy, 'content');
         return $proxy;
     } else {
         return false;
     }
 }