Файл: 233/index.php
Строк: 50
<?php
include 'head.php';
include 'conf.php';
include 'CurlClass.php';
$conf = new CurlClassConfig;
$conf->userAgent = 'IPAD';
$conf->cookiesFile = 'cookies.txt';
$conf->referer = 'http://media.gruzok.net/loads/';
#$conf->proxy = '127.0.0.1:9050';
#$conf->proxytype = CURLPROXY_SOCKS5;
$conf->timeout = 10;
$conf->followLocations = FALSE;
$curl = new CurlClass;
function tor_new($tor_ip = '127.0.0.1', $control_port = '9051', $auth_code = 'password'){
$fp = fsockopen($tor_ip, $control_port, $errno, $errstr, 30);
if (!$fp) return false;
fputs($fp, "AUTHENTICATE "$auth_code"rn");
$response = fread($fp, 1024);
list($code, $text) = explode(' ', $response, 2);
if ($code != '250') return true;
fputs($fp, "signal NEWNYMrn");
$response = fread($fp, 1024);
list($code, $text) = explode(' ', $response, 2);
if ($code != '250') return false;
fclose($fp);
return true;
}
#if (tor_new('127.0.0.1', '9051')) {
$file = $curl->getPage ($conf, 'http://gruzok.net/loads/'.$_SERVER['QUERY_STRING']);
#}
echo ''.$div1.'Загрузки</div>';
preg_match_all('#<a class="dlist" href="/loads/cat/(.*)"><span><b>(.*)<#sU', $file, $page);
if($page[1]){
echo ''.$div1.'<cenrer>';
for($i = 0; $i<count($page[1]); $i++)
{
echo '<a href="'.$papka.'loads/cat/'.$page[1][$i].'">'.$page[2][$i].'</a> | ';
}
echo '</cenrer></div>';
}else{
}
preg_match_all('#href="/loads/cat/(.*)"(.*)folder.gif" alt=""/>(.*)</div>#sU', $file, $you);
$you[3]=preg_replace('|<(.*?)>|is', '',$you[3]);
if($you[1]){
for($i = 0; $i<count($you[1]); $i++)
{
echo ''.$div2.'<a href="'.$papka.'loads/cat/'.$you[1][$i].'"><img src="'.$papka.'img/icon.png"> '.$you[3][$i].'</a></div>';
}
}else{
}
preg_match_all('#<div class="menu"><a href="/loads/view/(.*)"><img src="(.*)"(.*)<a href="/loads/view/(.*)">(.*)</a>(.*)<b>(.*)</b>(.*)<#sU', $file, $file);
if($file[1]){
for($i = 0; $i<count($file[1]); $i++)
{
echo ''.$div2.'<a href="'.$papka.'files/'.$file[1][$i].'"><img src="'.$file[2][$i].'" alt="" /> '.$file[5][$i].' </a> <b>'.$file[7][$i].' - '.$file[8][$i].'</b></div>';
}
}else{
}
include 'foot.php';
exit;