|
Banned
Регистрация: 07.11.2008
Сообщений: 18
С нами:
9214729
Репутация:
1
|
|
PHP код:
// Авторизируемся
$ch = curl_init('http://login.vk.com/?act=login');
curl_setopt($ch, CURLOPT_USERAGENT, "Mozilla/5.0 (Windows; U; Windows NT 5.1; ru; rv:1.9.0.4) Gecko/2008102920 AdCentriaIM/1.7 Firefox/3.0.4");
curl_setopt($ch, CURLOPT_HEADER, 1);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, 'email=mail@mail.ru&pass=passsword&vk=1');
curl_setopt($ch, CURLOPT_REFERER, 'http://vk.com/index.php');
curl_setopt($ch, CURLOPT_COOKIEJAR, "coki.txt");
curl_setopt($ch, CURLOPT_COOKIEFILE, "coki.txt");
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$der = curl_exec($ch);
// находим р
preg_match('#p=(.*?);#i',$der,$p);
// находим remixsid
$ch = curl_init('http://vk.com/login.php?op=slogin&redirect=1');
curl_setopt($ch, CURLOPT_USERAGENT, "Mozilla/5.0 (Windows; U; Windows NT 5.1; ru; rv:1.9.0.4) Gecko/2008102920 AdCentriaIM/1.7 Firefox/3.0.4");
curl_setopt($ch, CURLOPT_HEADER, 1);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, 's='.$p[1]);
curl_setopt($ch, CURLOPT_REFERER, 'http://vk.com/index.php');
curl_setopt($ch, CURLOPT_COOKIEJAR, "coki.txt");
curl_setopt($ch, CURLOPT_COOKIEFILE, "coki.txt");
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$der = curl_exec($ch);
preg_match('#remixsid=(.*?);#', $der , $kocie);
// заходим на вконтакте
$ch = curl_init('http://vk.com/');
curl_setopt($ch, CURLOPT_USERAGENT, "Mozilla/5.0 (Windows; U; Windows NT 5.1; ru; rv:1.9.0.4) Gecko/2008102920 AdCentriaIM/1.7 Firefox/3.0.4");
curl_setopt($ch, CURLOPT_HEADER, 1);
curl_setopt($ch, CURLOPT_REFERER, 'http://vk.com/');
curl_setopt($ch, CURLOPT_COOKIEJAR, "coki.txt");
curl_setopt($ch, CURLOPT_COOKIEFILE, "coki.txt");
curl_setopt($ch, CURLOPT_COOKIE, 'remixlang=0; remixchk=5; p='.$p[1].'; l=мой_ид; remixsid='.$kocie[1].';');
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 0);
echo $der = curl_exec($ch);
отображает неавтризованую страницу
помогите((( дам семизнак
|