
19.06.2008, 15:05
|
|
Постоянный
Регистрация: 22.03.2008
Сообщений: 325
С нами:
9545988
Репутация:
63
|
|
Вот тибе пример от Isis
PHP код:
<?php
$host = 'lol.com';
$port = 80;
$post = 'secretline=SECRET'; //POST данные
$http =
"POST http://".$host."/index.php HTTP/1.1\r\n".
"Host: ".$host."\r\n".
"User-Agent: Isya\r\n".
"Content-Type: application/x-www-form-urlencoded\r\n". //to form
"Content-Length: ".strlen($post)."\r\n\r\n".$post."\r\n";
$sock = fsockopen($host, $port, $errno, $errstr, 10);
if ($sock)
{
fwrite($sock, $http);
$content = '';
while (!feof($sock))
{
if (!$content .= fread($sock, 128))
{
$content = "";
}
}
fclose($sock);
}
echo $content; //Выводим что нам дал script2.php
?>
Последний раз редактировалось Buffalon; 19.06.2008 в 15:13..
|
|
|