
04.06.2007, 01:02
|
|
Познавший АНТИЧАТ
Регистрация: 02.05.2006
Сообщений: 1,191
Провел на форуме: 7364332
Репутация:
1276
|
|
Вот держи
PHP код:
$proxy = '127.0.0.1';
$port = 80;
@$fsock = fsockopen($proxy ,$port,$errnum,$errstr,5);
if (!$fsock)
die ("Увы, или прокся дохлая или истекло время ожидания ответа от нее...(((");
else {
$POST_to_GET = "to=123&for=123";
$len = strlen($POST_GET);
$request = "POST http://site.ru/index.php HTTP/1.0\n";
$request .="Host: site.ru\n";
$request .="Content-Type: application/x-www-form-urlencoded\n";
$request .="Content-Length: $len \r\n\r\n";
$request .=$POST_to_GET."\r\n";
fwrite ($fsock,$request);
$head = '';
while(!feof($fsock))
{
$fgets=fgets($fsock,500);
if ($fgets=="\r\n" || $fgets=="\n")
{break;} $head.=$fgets;}
$content = '';
while(!feof($fsock))
{$content .=fread($fsock,2048);}
fclose($fsock);
Только там может не много косячить из-за зоголовка, ну я думаю ты сможешь сделать все супер, ты же не маленький...)))
|
|
|