Results 1 to 5 of 5

Thread: php curl ssl

  1. #1
    Join Date
    Nov 2002

    php curl ssl

    I'm trying to use CURL via PHP to connect to a url which uses HTTPS.

    According to the curl docs , at step 2, you must get a CA cert.

    How does one obtain their shared host's CA cert?

  2. #2
    In their download they have a CA file. Just download the archilve and find the 'curl-ca-bundle.crt' file inside and use that!


  3. #3
    Join Date
    Nov 2002
    ive discovered that while using php's curl libraries and ssl, the problem is, im on a shared host. and the domain name is different to the ssl certificate which is used with ssl.

    so im stuck now what to do! any advise?

  4. #4
    Join Date
    Jan 2004
    Purchase a certificate from a Certificate Authority like GeoTrust. Then have your certificate installed onto your server. You will have to have an extra IP address for this. Tell your host to help you out.

    Visit if you have anymore questions
    Check out my new Chrome Extension - Server Admin Tool - Helpful Server Tech Advice

  5. #5
    Join Date
    Jul 2003
    You don't need to purchase a certificate just for that.

    Add these options to your curl object (here $ch):

    curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2);
    curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);

    and it should work.
    In order to understand recursion, one must first understand recursion.
    If you feel like it, you can read my blog
    Signal > Noise

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts