איציק ברבי |
20-11-12 09:52 |
למה לעזאזל דבר כזה פשוט לא עובד? send email via paypalIPN
PHP קוד:
<?php $req = 'cmd=_notify-validate';
foreach ($_POST as $key => $value) { $value = urlencode(stripslashes($value)); $req .= "&$key=$value"; } $header .= "POST /cgi-bin/webscr HTTP/1.0\r\n"; $header .= "Content-Type: application/x-www-form-urlencoded\r\n"; $header .= "Content-Length: " . strlen($req) . "\r\n\r\n"; $fp = fsockopen ('ssl://www.sandbox.paypal.com', 443, $errno, $errstr, 30); if (!$fp) { // HTTP ERROR } else { fputs ($fp, $header . $req); while (!feof($fp)) { $res = fgets ($fp, 1024); if (strcmp ($res, "VERIFIED") == 0) { mail("itshaking1@gmail.com","bla",$req); } else if (strcmp ($res, "INVALID") == 0) { // log for manual investigation } } fclose ($fp); } ?>
כנ"ל לגבי הקוד שמוצג כאן: https://cms.paypal.com/es/cgi-bin/?c...Implementation
הקישורים תואמים, אני עובד על אחסון.
|