更新时间:2022-06-27 07:05:28
由于您是自己打开套接字,而不是使用 curl 等 HTTP 库,因此您需要设置正确的 HTTP 协议版本并添加
Since you're opening the socket yourself, rather than using an HTTP library such as curl, you need to set the proper HTTP Protocol version and add the HTTP Host header yourself just below the POST line.
$header = "POST /cgi-bin/webscr HTTP/1.1
";
$header .= "Host: www.sandbox.paypal.com
";