* 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;
$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']; $proxyAddress = preg_replace('%<[^<>]*>%imsu', '', $proxyAddress); $proxyAddress = preg_replace('%\\s+%ms', '', $proxyAddress); $proxyAddress = trim($proxyAddress); if (DryPath::isIp($proxyAddress)) { $proxyHidemyass[] = $proxyAddress; } } } if (preg_match('%<a\\s*href="(?<next>[^"]+)"\\s*class="next">%imsu', $answerHidemyass, $matchNext)) { $urlSource = "http://proxylist.hidemyass.com" . $matchNext['next'] . '#listable'; } else { unset($urlSource); } sleep(rand(1, 3)); } while (isset($urlSource)); $updateProxy->saveSource($nameSource, $proxyHidemyass); return $proxyHidemyass;
* 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;
<?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;
*/ 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]; if (DryPath::isIp($proxyAddress)) { $proxyFoxtools[] = trim($proxyAddress); } } sleep(rand(1, 3)); } $updateProxy->saveSource($nameSource, $proxyFoxtools); return $proxyFoxtools;
<?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;
* @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); } } } $i++; sleep(rand(1, 3)); $content = $curl->load($urlSource . $i . "/sort:working_average/direction:asc"); } while ($i <= $countPage); $updateProxy->saveSource($nameSource, $proxyCoolProxy); return $proxyCoolProxy;
* 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;
/** * 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;
$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; } foreach ($matchesHtml['proxyHtml'] as $proxyHtml) { if (DryPath::isIp($proxyAddress)) { $proxySamair[] = trim($proxyAddress); } } if (preg_match('%<a\\s*class="page"\\s*href="(?<next>proxy\\-\\d+.htm)">next</a>%imsu', $answerSamair, $matchNext)) { $urlSource = "http://hidemyass.com" . $matchNext['next']; } else { unset($urlSource); } sleep(rand(1, 3)); } while (isset($urlSource)); $updateProxy->saveSource($nameSource, $proxySamair); return $proxySamair;
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; } } } if (preg_match('%<a\\s*href="\\./\\?page=(?<next>\\d+)">Следующая%imsu', $answer, $matchNext)) { $urlSource = "http://www.freeproxylists.net/ru/?page=" . $matchNext['next']; } else { unset($urlSource); } sleep(rand(1, 3)); if (!isset($urlSource)) { break; } } while (true); $updateProxy->saveSource($nameSource, $proxyArray); return $proxyArray;
$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'); $answerTwofreeproxy = $curl->load($urlSource); $tmpProxyArray2 = array(); if ($answerTwofreeproxy) { $tmpJsonProxy = json_decode($answerTwofreeproxy, true); $tmpProxyArray2 = explode('<br>', $tmpJsonProxy['proxy']); } $tmpProxyNew = array_merge($tmpProxyArray2, $tmpProxyArray); foreach ($tmpProxyNew as $valuePoststar) { if (DryPath::isIp(trim($valuePoststar))) { $proxyTwofreeproxyProxy[] = trim($valuePoststar); } } $updateProxy->saveSource($nameSource, $proxyTwofreeproxyProxy); return $proxyTwofreeproxyProxy;
/** * 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;
$lit = explode(",", $matchSecretArray['js_code']); $litera = array(); foreach ($lit as $key => $value) { $litera[$key] = chr($value); } foreach ($litera as $keyLitera => $valueLitera) { $strSecretCode = preg_replace('#Proxy\\[' . $keyLitera . '\\]#iUs', $valueLitera, $strSecretCode); } foreach ($javascriptEncode as $keyJavascript => $valueJavascript) { $strSecretCode = preg_replace('#' . preg_quote($valueJavascript, '#') . '#', $keyJavascript, $strSecretCode); } preg_match_all('#(?:\\(|\\+)(?<ip>\\w+)#s', $strSecretCode, $matchesSecretVar); $ip = ""; foreach ($matchesSecretVar['ip'] as $valueIp) { if (preg_match('#' . $valueIp . '=\'(?<ip>[^\']*)\'#s', $strSecretCode, $matchIp)) { $ip .= $matchIp['ip']; } } $ip = trim($ip); if (DryPath::isIp($ip)) { $proxySeprox[] = $ip; } } $pagenation++; sleep(rand(1, 3)); if (!($content = $curl->load($urlSource . $pagenation . ".html"))) { continue; } } while ($pagenation < $countPage); $updateProxy->saveSource($nameSource, $proxySeprox); return $proxySeprox;