PayPal has mailed me that they will no longer support HTTP1.0 in a few days.
So i've changed my old PHP code:
$header = "POST /cgi-bin/webscr HTTP/1.0
";
$header .= "Content-Type: application/x-www-form-urlencoded
";
$header .= "Content-Length: " . strlen($req) . "
";
to what they've recommended:
$header="POST /cgi-bin/webscr HTTP/1.1
";
$header .="Content-Type: application/x-www-form-urlencoded
";
$header .="Host: www.paypal.com
";
$header .="Connection: close
";
Now the notify.php don't work anymore :(
Any ideas?
Thanks!
Found this:
PayPal recently announced that they're going to "discontinue support for HTTP 1.0 protocol starting February 1, 2013." Today I ran into some problems implementing these changes. It turns out that the VERIFIED response code is now followed by a . So, the previous if (strcmp($res, "VERIFIED") == 0) { code no longer works by itself. I was able to solve this by trimming off the using $res = trim($res);.
http://www.johnboy.com/blog/http-11-paypal-ipn-example-php-code