
14.12.2007, 15:52
|
|
Участник форума
Регистрация: 31.12.2005
Сообщений: 231
С нами:
10715512
Репутация:
366
|
|
PHP код:
<?
$header="POST /search.php HTTP/1.0\r\n";
$header.="Host: forum.antichat.ru\r\n";
$header.="User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; ru; rv:1.8.1.9) Gecko/20071025 Firefox/2.0.0.9\r\n";
$header.="Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5\r\n";
$header.="Accept-Language: ru,en;q=0.5\r\n";
$header.="Accept-Encoding: gzip,deflate\r\n";
$header.="Accept-Charset: windows-1251,utf-8;q=0.7,*;q=0.7\r\n";
$header.="Content-Type: application/x-www-form-urlencoded\r\n";
$header.="Content-Length: 53\r\n\r\n";
$header.="s=&do=process&sortby=lastpost&forumchoice=0&query=red\r\n\r\n";
$f=fsockopen('forum.antichat.ru',80);
fwrite($f,$header);
$buffer='';
while(!feof($f))$buffer.=fread($f,1024);
echo $buffer;
?>
HTTP/1.1 200 OK Server: nginx Date: Fri, 14 Dec 2007 11:52:39 GMT Content-Type: text/html; charset=windows-1251 Connection: close X-Powered-By: PHP/5.2.4 POST requests from foreign hosts are not allowed.
нормальный ответ
|
|
|