Ejemplo n.º 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 : [];
 }
Ejemplo n.º 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;
Ejemplo n.º 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;
Ejemplo n.º 4
0
/**
 * Created by JetBrains PhpStorm.
 * User: ec
 * Date: 25.09.13
 * Time: 22:25
 * Project: GetContent
 * @author: Evgeny Pynykh bpteam22@gmail.com
 */
use bpteam\Loader\Loader;
use bpteam\DryText\DryPath;
use bpteam\ProxyList\ProxyUpdate;
//return array();
$urlSource = "http://proxylist.hidemyass.com";
$nameSource = "hidemyass.com";
$curl = new Loader('LoaderSingleCurl');
$updateProxy = new ProxyUpdate();
$curl->setTypeContent("html");
$proxyHidemyass = array();
do {
    $answerHidemyass = $curl->load($urlSource);
    if (!$answerHidemyass) {
        break;
    }
    if (preg_match_all('%<tr\\s*class="[^"]*"\\s*rel="\\d*">(?U)(?<proxyHtml>.*)</tr>%imsu', $answerHidemyass, $matchesHtml)) {
        foreach ($matchesHtml['proxyHtml'] as $proxyHtml) {
            preg_match_all('%\\.(?<class>[\\w_-]+){display\\:\\s*inline\\s*}%imsu', $proxyHtml, $matchesClass);
            $needClass = implode('|', $matchesClass['class']);
            preg_match_all('%(<(span|div)\\s*(style\\s*=\\s*"\\s*display\\s*\\:\\s*inline\\s*"|class\\s*=\\s*"(\\d+|' . $needClass . ')")\\s*>\\s*([^<>]+)\\s*|</(span|div|style)>\\s*([^"<>]+)\\s*)%imsu', $proxyHtml, $matchesProxy);
            preg_match('%</td>\\s*<td>\\s*(?<port>\\d+)\\s*</td>%imsu', $proxyHtml, $matchPort);
            $proxyAddress = implode('', $matchesProxy[0]) . ':' . $matchPort['port'];
Ejemplo n.º 5
0
/**
 * Created by JetBrains PhpStorm.
 * User: ec
 * Date: 25.09.13
 * Time: 22:25
 * 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://foxtools.ru/Proxy?page=";
$nameSource = "foxtools.ru";
$curl = new Loader('LoaderSingleCurl');
$updateProxy = new ProxyUpdate();
$curl->setTypeContent("html");
$proxyFoxtools = array();
for ($nom = 1; $nom < 50; $nom++) {
    $urlPage = $urlSource . $nom;
    $answerFoxtools = $curl->load($urlPage);
    if (!$answerFoxtools) {
        break;
    }
    $answerFoxtools = DryHtml::betweenTag($answerFoxtools, '<table style="width:100%" id="theProxyList">');
    if (!preg_match_all('%<td\\s*style="[^"]*">(?<ip>\\d+.\\d+.\\d+.\\d+)</td>\\s*<td\\s*style="[^"]*">(?<port>\\d+)</td>%imsu', $answerFoxtools, $matchesIp)) {
        break;
    }
    foreach ($matchesIp['ip'] as $key => $proxyIp) {
        $proxyAddress = $proxyIp . ':' . $matchesIp['port'][$key];
Ejemplo n.º 6
0
<?php

/**
 * Created by JetBrains PhpStorm.
 * User: EC
 * Date: 08.05.13
 * Time: 5:33
 * Project: GetContent
 * @author: Evgeny Pynykh bpteam22@gmail.com
 */
use bpteam\Loader\Loader;
use bpteam\DryText\DryPath;
use bpteam\ProxyList\ProxyUpdate;
$urlSource = "http://www.cool-proxy.net/proxies/http_proxy_list/page:";
$nameSource = "cool-proxy.net";
$curl = new Loader('LoaderSingleCurl');
$updateProxy = new ProxyUpdate();
$curl->setTypeContent("html");
$i = 1;
if (!($content = $curl->load($urlSource . $i . "/sort:working_average/direction:asc"))) {
    return [];
}
$countPage = preg_match_all('#/proxies/http_proxy_list/sort:working_average/direction:asc/page:(?<pagination>\\d*)"#iUm', $content, $matches) ? max($matches['pagination']) : 0;
$proxyCoolProxy = array();
do {
    if ($countProxy = preg_match_all('#<td\\s*style=\\"text.align.left.\\s*font.weight.bold.\\"><script type="text/javascript">document\\.write\\(Base64\\.decode\\("(?<ip_base64>.*)"\\)\\)</script></td>\\s*<td>(?<port>\\d+)</td>#iUms', $content, $matches)) {
        for ($j = 0; $j < $countProxy; $j++) {
            $is_ip = base64_decode($matches['ip_base64'][$j]) . ":" . $matches['port'][$j];
            if (DryPath::isIp($is_ip)) {
                $proxyCoolProxy[] = trim($is_ip);
            }
<?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;
Ejemplo n.º 8
0
 * 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;
$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);
}
Ejemplo n.º 9
0
/**
 * Created by JetBrains PhpStorm.
 * User: ec
 * Date: 26.09.13
 * Time: 22:15
 * Project: GetContent
 * @author: Evgeny Pynykh bpteam22@gmail.com
 */
use bpteam\Loader\Loader;
use bpteam\ProxyList\ProxyUpdate;
$nameSource = "notan.h1.ru";
$proxyNotanProxy = [];
$updateProxy = new ProxyUpdate();
for ($i = 1; $i <= 10; $i++) {
    $urlSource = "http://notan.h1.ru/hack/xwww/proxy" . $i . ".html";
    $curl = new Loader('LoaderSingleCurl');
    $curl->setTypeContent("html");
    $answerNotan = $curl->load($urlSource);
    if (!$answerNotan) {
        break;
    }
    if (!preg_match_all('%<TD\\s*class=name>\\s*(?<ip>\\d+\\.\\d+\\.\\d+\\.\\d+\\:\\d+)\\s*</TD>%ims', $answerNotan, $matchesNotan)) {
        break;
    }
    foreach ($matchesNotan['ip'] as $valueNotan) {
        $proxyNotanProxy[] = trim($valueNotan);
    }
    sleep(rand(1, 3));
}
$updateProxy->saveSource($nameSource, $proxyNotanProxy);
return $proxyNotanProxy;
Ejemplo n.º 10
0
 * 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\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);
    }
Ejemplo n.º 11
0
/**
 * Created by JetBrains PhpStorm.
 * User: ec
 * Date: 26.09.13
 * Time: 22:15
 * Project: GetContent
 * @author: Evgeny Pynykh bpteam22@gmail.com
 */
use bpteam\Loader\Loader;
use bpteam\DryText\DryPath;
use bpteam\ProxyList\ProxyUpdate;
return [];
$urlSource = "http://www.samair.ru/proxy/proxy-01.htm";
$nameSource = "samair.ru";
$curl = new Loader('LoaderSingleCurl');
$updateProxy = new ProxyUpdate();
$curl->setTypeContent("text");
$proxySamair = array();
do {
    $answerSamair = $curl->load($urlSource);
    if (!$answerSamair) {
        break;
    }
    if (!preg_match('%<script\\s*src="(?<jsFile>/js/\\d+.js)"\\s*type="text/javascript"></script>%imsu', $answerSamair, $jsFile)) {
        break;
    }
    $answerJs = $curl->load('http://www.samair.ru' . $jsFile);
    if (!preg_match_all('%<tr\\s*class="[^"]*"\\s*rel="\\d*">(?U)(?<proxyHtml>.*)</tr>%imsu', $answerSamair, $matchesHtml)) {
        break;
    }
Ejemplo n.º 12
0
 * User: EC
 * Date: 08.05.13
 * Time: 5:33
 * Project: GetContent
 * @author: Evgeny Pynykh bpteam22@gmail.com
 */
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));
Ejemplo n.º 13
0
 * Date: 04.07.13
 * Time: 15:00
 * Project: GetContent
 * @author: Evgeny Pynykh bpteam22@gmail.com
 */
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');
Ejemplo n.º 14
0
/**
 * 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);
Ejemplo n.º 15
0
/**
 * Created by JetBrains PhpStorm.
 * User: EC
 * Date: 08.05.13
 * Time: 5:33
 * Project: GetContent
 * @author: Evgeny Pynykh bpteam22@gmail.com
 * Модуль к классу  cProxy для скачивания списка прокси адресов с сайта seprox.ru
 */
use bpteam\Loader\Loader;
use bpteam\DryText\DryPath;
use bpteam\ProxyList\ProxyUpdate;
//return array();
$urlSource = "http://seprox.ru/ru/proxy_filter/0_0_0_0_0_0_0_0_0_";
$nameSource = "seprox.ru";
$curl = new Loader('LoaderSingleCurl');
$updateProxy = new ProxyUpdate();
$curl->setTypeContent("html");
$pagenation = 0;
$content = $curl->load($urlSource . $pagenation . ".html");
$countPage = 0;
if (preg_match('/<div\\s*class=\\"countResult\\">\\s*Всего\\s*найдено.\\s*(\\d+)\\s*<\\/div>/iUs', $content, $match)) {
    $countPage = ceil($match[1] / 15);
}
// JavaScript приколы с приведением типов. Расшифровка:
$javascriptEncode = ["a" => "(![]+[])[+!+[]]", "b" => "([]+[]+{})[!+[]+!+[]]", "c" => "([![]]+{})[+!+[]+[+[]]]", "d" => "([]+[]+[][[]])[!+[]+!+[]]", "e" => "(!![]+[])[!+[]+!+[]+!+[]]", "f" => "(![]+[])[+[]]", "i" => "([![]]+[][[]])[+!+[]+[+[]]]", "n" => "([]+[]+[][[]])[+!+[]]", "o" => "([]+[]+{})[+!+[]]", "r" => "(!![]+[])[+!+[]]", "t" => "(!![]+[])[+[]]", "u" => "(!![]+[])[!+[]+!+[]]", " " => "(+{}+[]+[]+[]+[]+{})[+!+[]+[+[]]]", "***" => "+++", "" => "+", "+" => "***"];
$proxySeprox = [];
do {
    $regEx = '#<tr\\s*class="proxyStr">\\s*<td>\\s*<script\\s*type="text/javascript">\\s*(?<js>[^<]*)\\s*</script>\\s*</td>\\s*<td>\\s*(?<type_proxy>.*)\\s*</td>#iUms';
    if (!preg_match_all($regEx, $content, $matchesSecretCode)) {
        break;