Curl request is failing on the SSL?

后端 未结 7 1937
走了就别回头了
走了就别回头了 2020-12-14 18:09

I have this code

    if(ereg(\"^(https)\",$url))
        curl_setopt($curl,CURLOPT_SSL_VERIFYPEER,false);
    // execute, and log the result to curl_put.log
         


        
7条回答
  •  陌清茗
    陌清茗 (楼主)
    2020-12-14 18:58

    add this:

    curl_setopt( $curl, CURLOPT_SSL_VERIFYHOST, 0);

    I had the same error and worked fine for me.

提交回复
热议问题