|
Познающий
Регистрация: 12.12.2006
Сообщений: 89
С нами:
10217126
Репутация:
60
|
|
Накрутка голосов (www.open-fest.ru)
Тадам... не называйте меня "Археологом", просто нашёл старую свою тему... и решил запостить новый накрутчик, уже с поддержкой прокси, с cURL'ами...
Отдельное спасибо 159932, ChaaK, .:EnoT:. за хорошие наставления
PHP код:
<?php
set_time_limit(0);
ignore_user_abort(1);
$file = file('proxy.txt'); // Список проксей
$usag = file('ua.txt'); // Список UserAgents
$id='xxx'; //Номер счастливчика
$url = "http://open-fest.ru/muz/{$id}/"; //Отсюда забираем печеньки
$url_x = 'http://open-fest.ru/'; // А тут живёт голосование
function pregCookie($headers)
{
preg_match_all('#Set-cookie: (.*;)#UiSm',$headers,$headers);
return implode('',$headers['1']).' /';
}
function curl_set($host='http://google.com',$get='',$proxy=false,$port=false,$ugnt =false,$ref=false,$cookie=false,$sleep=2,$debug=false)
{
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $host.$get);
curl_setopt($ch, CURLOPT_HEADER, 1);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
if ($ugnt) {curl_setopt($ch, CURLOPT_USERAGENT, $ugnt);};
if ($ref) {curl_setopt($ch, CURLOPT_REFERER, $ref);};
if ($proxy) {curl_setopt($ch, CURLOPT_PROXY, $proxy.':'.$port);};
if (!$cookie) {ob_start();} else { curl_setopt($ch, CURLOPT_COOKIE, $cookie);};
if (!$debug) {curl_exec($ch);} else {$result = curl_exec($ch); print_r($result);};
curl_close ($ch);
if (!$cookie) {$cookie=pregCookie(ob_get_contents()); ob_end_clean(); return $cookie;};
sleep($sleep);
}
for ($i=0;$i<count($file);$i++)
{
$prox[$i]=explode(':', $file[$i]);
$get ="db.php?j=10&q={$id}&t=".$prox[$i][0]."&c=10";
$uag='User-Agent: '.$usag[rand(0,count($usag)-1)].' /';
curl_set($url_x,$get,$prox[$i][0],$prox[$i][1],$uag,$url_x,curl_set($url,'',$prox[$i][0],$prox[$i][1],$uag,$url),rand(5,50));
}
?>
ps. Список UserAgents можно найти в >>ЭтоЙ ТемЕ<<
Последний раз редактировалось DCRM; 17.12.2008 в 22:41..
|