$posts='id=slavon&pas=123456678';
$query="POST http://host/dir/page.php HTTP/1.0\r\n".
"Referer: http://host \r\n".
"User-Agent: Opera/8.50 (Windows NT 5.1; U; ru)\r\n".
"Host: www.nm.ru\r\n".
"Accept: text/html, application/xml;q=0.9, application/xhtml+xml, image/png, image/jpeg, image/gif, image/x-xbitmap, */*;q=0.1\r\n".
"Accept-Language: ru,en;q=0.9\r\n".
"Accept-Charset: windows-1251, utf-8, utf-16, iso-8859-1;q=0.6, *;q=0.1\r\n".
"Proxy-Connection: close\r\n".
"Content-Type: application/x-www-form-urlencoded\r\n".
"Content-Length: ".strlen($posts)."\r\n\r\n".
$posts."\r\n\r\n";
$socket=fsockopen('www.host.ru',80,$errno,$errstr,60);
fwrite($socket,$query);
while(!feof($socket) s.=fgets($socket);
fclose($socket);
echo $s;