Столкнулся с сабжем. Вот, что получилось средствами php:
<?php
$host = 'localhost';
$path = '/test.php';
$port= 80;
$data = 'Some data';
$fp = fsockopen("$host",$port, $errno, $errstr);
if (!$fp) {
echo "$errstr ($errno) <br/>\n";
}
else {
$out = "POST $path HTTP/1.0\r\n"
."Host: $host\r\n"
."Content-Type: text/html\r\n"
."Content-Length: ".strlen($data)."\r\n"
."Connection: close\r\n"
."\r\n"
.$data;
fwrite($fp, $out);
echo "<pre>";
while (!feof($fp)) {
echo fgets($fp, 128);
}
fclose($fp);
}
?>
P.S. После питона стал пропускать ";"