
28.07.2009, 13:20
|
|
Участник форума
Регистрация: 31.12.2007
Сообщений: 279
С нами:
9663762
Репутация:
114
|
|
Добрый день.
Нобходимо авторизоваться на мире маил.ру
использую тако код :
PHP код:
$log= "Логин";
$domain ="@mail.ru";
$pass="пасс";
$url_arr = array("my.mail.ru", "my.mail.ru", "my.mail.ru", "my.mail.ru", "my.mail.ru", "my.mail.ru", "my.mail.ru");
$rand = rand(1111111111,9999999999);
$url = "http://".$url_arr[rand(0,6)]."/cgi-bin/login?rand=$rand";
$post = "Login=$log&Domain=$domain&Password=$pass&page=start";
$ref = "http://my.mail.ru/cgi-bin/login?page=http%3A%2F%2Fmy.mail.ru%2F";
$ua = "Mozilla/5.0 (Windows; U; Windows NT 5.1; ru; rv:1.9.0.4) Gecko/2008102920Firefox/3.0.4";
$ch = curl_init($url);
curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $post);
curl_setopt($ch, CURLOPT_REFERER, $ref);
curl_setopt($ch, CURLOPT_USERAGENT, $ua);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 0);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_NOBODY, 0);
$res = curl_exec($ch);
А вот как принять куки?
|
|
|