Example #1
0
 protected function checkProxyArrayToSite($arrayProxy, $url, $checkWord, $chunk = 100)
 {
     if (!is_array($arrayProxy)) {
         return [];
     }
     $goodProxy = [];
     $this->loader->setCountStream(1);
     $this->loader->setTypeContent('text');
     $this->loader->setDefaultOption(CURLOPT_POST, false);
     $this->loader->setDefaultOption(CURLOPT_TIMEOUT, 30);
     $this->loader->setCheckAnswer(false);
     foreach (array_chunk($arrayProxy, $chunk) as $challenger) {
         $this->loader->setCountCurl(count($challenger));
         $descriptorArray =& $this->loader->getDescriptorArray();
         $urlList = [];
         foreach ($descriptorArray as $key => &$descriptor) {
             $this->loader->setOption($descriptor, CURLOPT_PROXY, $challenger[$key]['proxy']);
             $urlList[] = $url;
         }
         foreach ($this->loader->load($urlList) as $key => $answer) {
             $testCount = 0;
             $countGood = 0;
             foreach ($checkWord as $valueCheckWord) {
                 $testCount++;
                 if (preg_match($valueCheckWord, $answer)) {
                     $countGood++;
                 }
             }
             if ($countGood == $testCount) {
                 $goodProxy[] = $challenger[$key];
             }
         }
     }
     return count($goodProxy) ? $goodProxy : [];
 }
Example #2
0
 * 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;
Example #3
0
 * 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;
Example #4
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;
 * Time: 2:36
 * 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);
use bpteam\Loader\Loader;
use bpteam\DryText\DryPath;
use bpteam\ProxyList\ProxyUpdate;
return array();
$urlSource = "http://www.freeproxylists.net/ru/";
$nameSource = "freeproxylists.net";
/**
 * @var Loader|bpteam\Loader\LoaderSingleCurl $curl
 */
$curl = new Loader('LoaderSingleCurl');
$updateProxy = new ProxyUpdate();
$proxyArray = [];
do {
    $answer = $curl->load($urlSource);
    var_dump($urlSource, $answer);
    $curl->setDefaultOption(CURLOPT_REFERER, $urlSource);
    $answer = $curl->load('http://www.freeproxylists.net/php/h.php');
    var_dump($urlSource, $answer);
    exit;
    if (!$answer) {
        break;
    }
    if (preg_match_all('%IPDecode\\("(?<encoded_ip>[^"]+)"\\)</script>\\s*</td>\\s*<td\\s*align="center">\\s*(?<port>\\d+)\\s*</td>%imsu', $answer, $matchesHtml)) {
        foreach ($matchesHtml['encoded_ip'] as $key => $proxy) {
            $proxy = trim(urldecode($proxy));
            $proxyAddress = $proxy . ':' . $matchesHtml['port'][$key];
            if (DryPath::isIp($proxyAddress)) {
                $proxyArray[] = $proxyAddress;
            }
        }
    }
 */
use bpteam\Loader\Loader;
use bpteam\DryText\DryPath;
use bpteam\ProxyList\ProxyUpdate;
return [];
$urlSource = "http://2freeproxy.com/wp-content/plugins/proxy/load_proxy.php";
$nameSource = "2freeproxy.com";
$proxyTwofreeproxyProxy = array();
/**
 * @var Loader|\bpteam\Loader\LoaderSingleCurl $curl
 */
$curl = new Loader('LoaderSingleCurl');
$updateProxy = new ProxyUpdate();
$curl->setTypeContent("text");
$httpHead = array('Host: 2freeproxy.com', 'User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:21.0) Gecko/20100101 Firefox/21.0', 'Accept: application/json, text/javascript, */*; q=0.01', 'Accept-Language: ru-RU,ru;q=0.8,en-US;q=0.5,en;q=0.3', 'Content-Type: application/x-www-form-urlencoded; charset=UTF-8', 'X-Requested-With: XMLHttpRequest', 'Referer: http://2freeproxy.com/anonymous-proxy.html', 'Content-Length: 14', 'Connection: keep-alive', 'Pragma: no-cache', 'Cache-Control: no-cache');
$curl->setDefaultOption(CURLOPT_HTTPHEADER, $httpHead);
$curl->setDefaultOption(CURLOPT_REFERER, 'http://2freeproxy.com/anonymous-proxy.html');
$curl->setDefaultOption(CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows NT 6.1; rv:21.0) Gecko/20100101 Firefox/21.0');
$curl->setDefaultOption(CURLOPT_POST, true);
$curl->setDefaultOption(CURLOPT_POSTFIELDS, 'type=anonymous');
$answerTwofreeproxy = $curl->load($urlSource);
$tmpProxyArray = array();
if ($answerTwofreeproxy) {
    $tmpJsonProxy = json_decode($answerTwofreeproxy, true);
    $tmpProxyArray = explode('<br>', $tmpJsonProxy['proxy']);
}
$httpHead = array('Host: 2freeproxy.com', 'User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:21.0) Gecko/20100101 Firefox/21.0', 'Accept: application/json, text/javascript, */*; q=0.01', 'Accept-Language: ru-RU,ru;q=0.8,en-US;q=0.5,en;q=0.3', 'Content-Type: application/x-www-form-urlencoded; charset=UTF-8', 'X-Requested-With: XMLHttpRequest', 'Referer: http://2freeproxy.com/elite-proxy.html', 'Content-Length: 10', 'Connection: keep-alive', 'Pragma: no-cache', 'Cache-Control: no-cache');
$curl->setDefaultOption(CURLOPT_HTTPHEADER, $httpHead);
$curl->setDefaultOption(CURLOPT_REFERER, 'http://2freeproxy.com/elite-proxy.html');
$curl->setDefaultOption(CURLOPT_POST, true);
$curl->setDefaultOption(CURLOPT_POSTFIELDS, 'type=elite');