TLS 1.2 and HTTP/1.1 upgrade (PHP fsockopen)



我是PHP&贝宝(PayPal(并试图弄清楚我是否需要根据以下贝宝(PayPal(文章升级TLS:https://www.paypal-knowledge.com/infocenter/infocenter/index?page=content& id = faq; id=faq1914

1914

要验证系统,我正在使用 tlstest.paypal.com 端点如下:

$header = '';
$header .= "POST /cgi-bin/webscr HTTP/1.1rn";
$header .= "Content-Type: application/x-www-form-urlencodedrn";
$header .= "Host: tlstest.paypal.comrn";
$header .= "Content-Length: " . strlen($req) . "rnrn";
$paypaladdr = 'tlstest.paypal.com';
$fp = fsockopen('ssl://'.$paypaladdr, 443, $errno, $errstr, 30);

我立即得到下面的回应:

HTTP/1.1  200 OK
Content-Type: text/html
Content-Length: 20
Connection: keep-alive

然后几分钟(6-8(分钟后,我得到了: paypal_connection_ok

您知道为什么要花这么长时间才能接收 paypal_connection_ok 消息?我希望生产终点不会发生这种情况。我很好吗?

预先感谢您。

只要您从PayPal服务器获得Connection_ok,连接就可以了。

谢谢。

最新更新