Construct the POST request:
$req='var=xpto&var=somevalue';
Send the POST request to the server:
$fp = fsockopen ('testserver.com', 80, $errno, $errstr, 30);
$header = "POST /test.php HTTP/1.0\r\n";
$header.= "Host yourserver.com\r\n";
$header.= "Content-Type: application/x-www-form-urlencoded\r\n";
$header.= "Content-Length: ".strlen($req)."\r\n\r\n";
fputs ($fp, $header.$req);
fclose($fp);
Alternatively you can use libcurl for this.