cURL post not working PHP

前端 未结 5 1367
感情败类
感情败类 2021-01-01 00:11

I\'m having trouble using cURL for a specific page.

A live code working: http://svgen.com/jupiter.php

Here is my code:

    $url = \'https://u         


        
5条回答
  •  失恋的感觉
    2021-01-01 00:56

    Try these:

    curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, true);
    curl_setopt($ch, CURLOPT_CAINFO, '/etc/pki/tls/cert.pem'); // path is valid for RHEL/CentOS
    

    This makes sure the resource you're "curling" has a valid SSL certificate. It is not recommended to set "CURLOPT_SSL_VERIFYPEER" to false (0).

提交回复
热议问题