> # read the post from PayPal system and add 'cmd'
> read (STDIN, $query, $ENV{'CONTENT_LENGTH'});
> $query .= '&cmd=_notify-validate';
>
> # post back to PayPal system to validate
> use LWP::UserAgent;
> $ua = new LWP::UserAgent;
> $req = new HTTP::Request 'POST','https://www.paypal.com/cgi-bin/webscr';
> $req->content_type('application/x-www-form-urlencoded');
> $req->content($query);
> $res = $ua->request($req);
Untested, using the curl part of the online manual (
http://www.php.net/manual/en/ref.curl.php ) as a reference:
foreach ($HTTP_POST_VARS as $key=>$value) $query .= "$key=$value&";
$query .= "cmd=_notify-validate";
if ($ch = curl_init("https://www.paypal.com/cgi-bin/webscr")) {
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $query);
curl_exec($ch);
curl_close($ch);
}
jason
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]