Как сделать при помощи сокетов, я знаю.
Просто хотелось бы понять, что именно делает ф-ция header.
Вот небольшой примерчик, который, естесственно, не работает :-)
Код: Выделить всё
<?php
if ($_GET['test'] != 'test') {
$post = "hello=world";
$header = "Location: test.php?test=test\r\n";
$header .= "Content-type: application/x-www-form-urlencoded\r\n";
$header .= "Content-length: ".strlen($post)."\r\n";
$header .= "\r\n";
$header .= $post;
header($header);
exit;
}
?>
<pre>
<?php
print_r($_POST);
?>
</pre>
[url=test.php]test[/url]
Думал о втором варианте:
Код: Выделить всё
$post = "hello=world";
header("Location: test.php?test=test");
header("Content-type: application/x-www-form-urlencoded");
header("Content-length: ".strlen($post));
header("");
header($post);
Есть ли у кого какие идеи? И вообще, возможно ли это?