Выкладываю скрипт на передвижение те ломать транспорт юзать осторожно много шагов не ставить=)
работает самостоятельно просто залить на сервер настроить и запустить все глюки по скриптам мне в личку
<?
error_reporting(0);
set_time_limit(0);
ignore_user_abort(0);
//////////////////////////////////////////////////////////
$login='login';
$password='password';
$time="185"; //вревя через которое произойдет шаг
$steps="3"; //сколько всего шагов сделать
$step="right"; // направление первого шага right право left лево
/////////////////////////////////////////////////////////
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;
}
//////////////////////////////////////////////////////////
$f=fopen("datem","w");
fputs($f,"0");
fclose($f);
while($s!=$steps)
{
sleep($time);
$s++;
login("
http://www.ganjawars.ru/login.php");
if($step=="right")
{
download_pretending("
http://www.ganjawars.ru/map.move.php?moveright=1");
$step="left";
}
if($step=="left")
{
download_pretending("
http://www.ganjawars.ru/map.move.php?moveleft=1");
$step="right";
}
$f=fopen("datem","w");
fputs($f,file_get_contents("datem")+1);
fclose($f);
}
?>