Skip to content

Instantly share code, notes, and snippets.

@safounette
Created August 3, 2013 00:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save safounette/6144515 to your computer and use it in GitHub Desktop.
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";
$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