You can make a php script that would post to a URL, HOWEVER php currently does NOT support posting to a secure server (https://), I've tried to use fsocks, fopen, etc.. im pretty sure because i've spent 5 hours trying to do this. The solution that I have implemented is quite simple. I use the Perl script (its in paypal's Single Purchase Manual) and based on the outcome (verified or not) i redirect it to a php script that does all of the appropriate database functions.
To redirect in Perl use something like:
$target = "http://www.serv.com/dostuff.php?pass=your&variables=here";
print redirect (-uri => $target);
if you need some help, post a reply and email me.