<?php set_time_limit(0); $fp=fsockopen("vkontakte.ru",80,$errno,$errstr); $out = "POST http://vkontakte.ru/login.php HTTP/1.0\r\n"; $out .= "Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/x-shockwave-flash, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, */*\r\n"; $out .= "Accept-Language: ru\r\n"; $out .= "Content-Type: application/x-www-form-urlencoded\r\n"; $out .= "Host: vkontakte.ru\r\n"; $out .= "Content-Length: 38\r\n"; $out .= "Pragma: no-cache\r\n"; $out .= "Cookie: remixchk=5; remixlang=0; remixfriends=1; remixclosed_tabs=0; remixautobookmark=2\r\n"; $out .= "Connection: Keep-Alive\r\n\r\n"; $out .= "email=rambler@rambler.ru&pass=Dnrj43e9"; fwrite($fp,$out); echo "coocie--->> ".$_COOKIE['remixmid']; # Записываем ответ сервера в переменную while (!feof($fp)) { $ans=fgets($fp); } echo $ans; # Если 302 найден, значит акк валидный if(preg_match("/\b302 Found\b/is", $ans)) { echo " true"; } else { echo " false"; } fclose($fp); ?>