Created
August 3, 2013 00:35
-
-
Save safounette/6144515 to your computer and use it in GitHub Desktop.
problème avec les headers, il faut ajouter $header .= "Host: www.sandbox.paypal.com\r\n";
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$header = "POST /cgi-bin/webscr HTTP/1.0\r\n"; | |
$header .= "Host: www.sandbox.paypal.com\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); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment