Yandex авторизация
Авторизация проходит на почте, но идет безконечный цикл обновления, там нужен в GET параметр uid=****
. Как его получить?
$cookie_box = dirname(__FILE__).'/cookie.txt';
$login = '****';
$password = '***';
$common_yandex = curl_init('https://passport.yandex.ru/passport?mode=auth&msg=money');
curl_setopt($common_yandex, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($common_yandex, CURLOPT_POST, 1);
curl_setopt($common_yandex, CURLOPT_POSTFIELDS,"login=$login&passwd=$password");
curl_setopt($common_yandex, CURLOPT_HEADER, 0);
curl_setopt($common_yandex, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($common_yandex, CURLOPT_COOKIEJAR, $cookie_box);
curl_setopt($common_yandex, CURLOPT_FOLLOWLOCATION, 1);
$html = curl_exec($common_yandex);
curl_setopt($common_yandex, CURLOPT_URL, "https://mail.yandex.ru/neo2/?dpda=yes&uid=1743813725&login=fixgame2#inbox");
$html = curl_exec($common_yandex);
echo $html;
curl_close($common_yandex);
Источник: Stack Overflow на русском