# 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';
)) {
$return .= fgets ($fp,128);
}
fclose ($fp);
}
?
- Original Message -
From: Richard Kurth [EMAIL PROTECTED]
To: php [EMAIL PROTECTED]
Sent: Wednesday, September 12, 2001 4:01 PM
Subject: [PHP] Changing perl to PHP
Could somebody tell me how to convert this little bet of code to PHP
?php
$fp = fsockopen(www.paypal.com, 443, $errono, $errstr, 30);
if (!$fp) {
echo $errstr ($errno)br\n;
} else {
fputs ($fp, GET https://www.paypal.com/cgi-bin/webscr
HTTP/1.1\015\012);
fputs ($fp, HOST www.paypal.com\015\012);
fputs ($fp, Content-type:
Could somebody tell me how to convert this little bet of code to PHP.
The rest of the code for this was easy to do but I dont know what to
do with this. Can I call LWP from php and if yes how?
# read the post from PayPal system and add 'cmd'
read (STDIN, $query, $ENV{'CONTENT_LENGTH'});
$query
4 matches
Mail list logo