This is possible. I had a situation where I wanted to post form contents to a cgi-script and have my own thank-you/confirmation page. You can post data to another PHP script or cgi-script from within a PHP script using the following function (This example posts a page to the SkyTel web pager):
HTTP POST function
function PostToHost($host, $path, $data_to_send)
{
$fp = fsockopen($host, 80);
fputs($fp, "POST $path HTTP/1.1\n");
fputs($fp, "Host: $host\n");
fputs($fp, "Content-type: application/x-www-form-urlencoded\n");
fputs($fp, "Content-length: ".strlen($data_to_send)."\n");
fputs($fp, "Connection: close\n\n");
fputs($fp, $data_to_send);
fclose($fp);
}
$data = "to=$pagerpin&message=$pagetext&Submit=Send Message";
$host = "www.skytel.com";
$path = "/cgi-bin/page.pl";
PostToHost($host, $path, $data);
Make sure that you use the variable names in the $data string that the resulting script is expecting.
Jon