
22.02.2010, 22:36
|
|
Постоянный
Регистрация: 27.10.2008
Сообщений: 491
Провел на форуме: 4002393
Репутация:
464
|
|
PHP код:
<?php
function curl($url,$post)
{
$cfile = 'cookies.txt';
$ch = curl_init();
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_POSTFIELDS, $post);
curl_setopt($ch, CURLOPT_COOKIEJAR, $cfile);
curl_setopt($ch, CURLOPT_COOKIEFILE, $cfile);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
curl_setopt($ch, CURLOPT_POST, 1);
$result = curl_exec($ch);
curl_close($ch);
return $result;
}
$email = 'ssaf';
$pass = 'asddsa';
$nik = 'ziaga';
$result = curl("http://vkontakte.ru/login.php","email=$email&pass=$pass");
$result = curl('http://vkontakte.ru/settings.php','');
preg_match_all("#hash:'(.*)'#iU",$result,$regs);
$hash = $regs[1][0];
$result = curl('http://vkontakte.ru/settings.php','hash='.$hash.'&act=change_nickname&subm=1&nickname='.$nik);
echo $result;
?>
upd. неуспел=((
|
|
|