<?php
$auth_data = "user=".$login."&domain=e-mail.ru&pass=".$password."&comp_pl=home_pl&cmd=quick_login&tcode=".$tcode."&force_connection=true&frames=true&on_error=show&selected_tpl=1&err_page=login&_vhost=e-mail.ru";
$auth_data_len = strlen($auth_data);
$header = "POST http://e-mail.ru/webmail.ok HTTP/1.0\r\n";
$header .= "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";
$header .= "Referer: http://e-mail.ru\r\n";
$header .= "Accept-Language: uk\r\n";
$header .= "Content-Type: application/x-www-form-urlencoded\r\n";
$header .= "Proxy-Connection: Keep-Alive\r\n";
$header .= "User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322)\r\n";
$header .= "Host: e-mail.ru\r\n";
$header .= "Content-Length: ".$auth_data_len."\r\n";
$header .= "Pragma: no-cache\r\n\r\n";
$header .= $auth_data;
$sckt = fsockopen("e-mail.ru",80);
fputs($sckt,$header);
while(!feof($sckt))
{
$serv_answer = fgets($sckt,2048);
echo $serv_answer;
}
?>