скрипт для автоматической игры в рулетку на ганже
запускать так на сайте с хорошей посещаемостью ставим
<img src="scriptfile.php" width="1" height="1">
или кроном раз в 11 мин экзекайте
да не забудьте поставить права 0777 на папку куда положите скрипт
в процессе выдиралка всех цен и количества ресурсов с сортировкой из всего острова но это потом ещё не дописано
<?
error_reporting(0);
//////////////////////////////////////////////////////////
$stavka="1"; //не больше 2500
$login='login';
$password='password';
/////////////////////////////////////////////////////////
function login($url)
{
global $login,$password;
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,$url);
curl_setopt($ch, CURLOPT_HEADER,1);
curl_setopt($ch, CURLOPT_REFERER, $url);
curl_setopt($ch, CURLOPT_POST,1);
curl_setopt($ch, CURLOPT_POSTFIELDS,"login=$login&pass=$password");
curl_setopt($ch, CURLOPT_COOKIEJAR, "cook");
curl_setopt($ch, CURLOPT_COOKIEFILE, "cook");
curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_TIMEOUT,100);
$result = curl_exec ($ch);
curl_close($ch);
}
//////////////////////////////////////////////////////////
function download_pretending($url) {
$url=parse_url($url);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "http://$url[host]$url[path]");
curl_setopt($ch, CURLOPT_HEADER,1);
curl_setopt($ch, CURLOPT_REFERER, "http://$url[host]$url[path]");
curl_setopt($ch, CURLOPT_POST,1);
curl_setopt($ch, CURLOPT_POSTFIELDS,"$url[query]");
curl_setopt($ch, CURLOPT_COOKIEJAR, "cook");
curl_setopt($ch, CURLOPT_COOKIEFILE, "cook");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_TIMEOUT,100);
$result = curl_exec ($ch);
curl_close ($ch);
return $result;
}
if(date("U")-601 >file_get_contents("date"))
{
login("
http://www.ganjawars.ru/login.php");
while($s==$y)
{
$s=rand(1,3);
$y=rand(1,3);
}
if($s==1){download_pretending("
http://www.ganjawars.ru/roulette.bet.php?bet=$stavka&betn=40");}
if($s==2){download_pretending("
http://www.ganjawars.ru/roulette.bet.php?bet=$stavka&betn=41");}
if($s==3){download_pretending("
http://www.ganjawars.ru/roulette.bet.php?bet=$stavka&betn=42");}
if($y==1){download_pretending("
http://www.ganjawars.ru/roulette.bet.php?bet=$stavka&betn=40");}
if($y==2){download_pretending("
http://www.ganjawars.ru/roulette.bet.php?bet=$stavka&betn=41");}
if($y==3){download_pretending("
http://www.ganjawars.ru/roulette.bet.php?bet=$stavka&betn=42");}
$f=fopen("date","w");
fputs($f,date("U"));
fclose($f);
}
header ("Content-type: image/gif");
echo base64_decode('R0lGODlhAQABAJEAAAAAAP///////wAAACH5BAEAAAIALAAAAAABAAEAAAICVAEAOw==');
?>