What is blocking fsockopen?

前端 未结 4 1621
误落风尘
误落风尘 2021-01-12 10:26

After struggling for half a day, I finally manage to get reCAPTCHA to work by converting this function:

function _recaptcha_http_post($host, $path, $data, $p         


        
4条回答
  •  [愿得一人]
    2021-01-12 11:04

    I might be wrong, but you use $port = 80 in fsockopen() while in cURL case this variable is not used at all. I had same problem when tried to connect to SSL via port 80 instead of port 443; as far as I know, cURL checks SSL by default and connects accordingly.

    Also, try running cURL with CURLOPT_VERBOSE to see what it does.

提交回复
热议问题