Process https pages with CURL

Discussion in 'PHP' started by ade92uk, Mar 1, 2009.

  1. #1
    I have used CURL and PHP to retireve and process pages, but can someone please tell me how to process https pages with curl. I get the error:

    Warning: is_executable() [function.is-executable]: open_basedir restriction in effect. File(/usr/local/bin/curl) is not within the allowed path(s): ('.:/proc/uptime:/tmp:/home:/usr/local/lib/php:/usr/home:/usr/local/bin/') in /home/account/public_html/coded/classes/connect.class.php on line 309
    error fetching document:
     
    ade92uk, Mar 1, 2009 IP
  2. Shoro

    Shoro Peon

    Messages:
    143
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Try setting the following options:
    
    curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
    curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2);
    
    PHP:
     
    Shoro, Mar 1, 2009 IP
  3. SmallPotatoes

    SmallPotatoes Peon

    Messages:
    1,321
    Likes Received:
    41
    Best Answers:
    0
    Trophy Points:
    0
    #3
    It looks like you are trying to run curl as an external program rather than using the PHP extension. Use the PHP functions if possible, it works better and is safer.
     
    SmallPotatoes, Mar 1, 2009 IP