If you would like it to post on server side then you could just use curl. So the following is an example script that will display only the paypal page but still submit the post variables to the second link:
$vars='';
foreach ($_POST AS $key => $val) {
$vars.=$key.'='.$val.'&';
}
$vars=substr($vars,0,-1);
$ch = curl_init();
// set the target url
curl_setopt($ch, CURLOPT_URL,'xyz.com/order/email_order.php');
curl_setopt($ch, CURLOPT_HTTPHEADER, Array("User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.15) Gecko/20080623 Firefox/2.0.0.15") ); // request as if Firefox
// howmany parameter to post
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS,$vars);
curl_setopt($ch, CURLOPT_NOBODY, false);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$dresult= curl_exec ($ch);
curl_close ($ch);
//now for paypal
$ch = curl_init();
// set the target url
curl_setopt($ch, CURLOPT_URL,'https://www.paypal.com/cgi-bin/webscr');
curl_setopt($ch, CURLOPT_HTTPHEADER, Array("User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.15) Gecko/20080623 Firefox/2.0.0.15") ); // request as if Firefox
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS,$vars);
curl_setopt($ch, CURLOPT_NOBODY, false);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$result= curl_exec ($ch);
curl_close ($ch);
echo $result;
So if you post to a page that has just the above script, the above script will then re-post the data to the 2 links provided.
cwarn23
Occupation: Genius
3,033 posts since Sep 2007
Reputation Points: 413
Solved Threads: 259