I found this script somewhere on the net. The only problem is I haven't used it 'live' yet, and PayPal don't offer a 'test' facility. I'm new to php, so if any 'real coders' can spot any glaring mistakes it would be appreciated!
Paul
<?
while (list ($key,$value)=each($HTTP_POST_VARS))
{
echo "$key:$value<br>/n";
$postdata .=$key.'='.$value.'&';
}
$postdata .= 'cmd=_notify-validate';
$url = '';
$command = '/usr/bin/curl -m 120 -d "'.$postdata.'" https://www.paypal.com/cgi-bin/webscr -L';
exec($command, $return_array, $return_value);
if ($return_array[0] == 'INVALID') {
include("../private_html/problem.inc");
}
else if ($return_array[0] == 'VERIFIED') {
include("../private_html/thankyou.inc");
}
else{
echo("<font color='#000080' size='2' face='Verdana, Arial, Helvetica'>Thank you for your order - we appreciate your business.<br><br>Unfortunately, we have not received the response we expected from PayPal's server, and cannot provide immediate confirmation of your transaction; we will contact you shortly by email to update you on your order status.<br><br>If you prefer you may check your PayPal account to verify whether the transaction completed successfully, and email details to me</font>");
}
?>