Skrtypt wysyłający:
$data = array ('zmienna1' => 'mapa', 'zmienna2' => 'Polski');
$content = http_build_query($data);
$context_options4 = array (
'http' => array (
'method' => 'POST',
'header'=> "Content-type: application/x-www-form-urlencoded\r\n"
. "Content-Length: " . strlen($content) . "\r\n",
'content' => $content
)
);
$context = stream_context_create($context_options4);
$fp = fopen('http://www.wolakorybutowa.pl/test/post_test.php', 'r', false, $context);
fpassthru($fp);
fclose($fp);
Skrtypt odbierający:
<?
print_r($_POST);
?>