SitePoint Sponsor

User Tag List

Results 1 to 2 of 2

Thread: CURL with SSL

  1. #1
    SitePoint Member
    Join Date
    Aug 2003
    Location
    Toronto
    Posts
    1
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    CURL with SSL

    I'm having issues connecting to a secure page using CURL... I can get it to work for normal HTTP, but just get "Connect Failed" when doing https...

    Is there more debuging options available for CURL other than curl_error()?

    Could my php be missing something needed to handle SSL? Under "curl information" in phpinfo, I get "libcurl 7.9.8 (OpenSSL 0.9.7a)".

    Not sure what could be going wrong here...

    Pete.

  2. #2
    SitePoint Zealot sidhighwind's Avatar
    Join Date
    Aug 2003
    Location
    Indianapolis, IN
    Posts
    163
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    some code would be helpful to see how you are doing it but here is how i connect to ups in my tracking script..

    PHP Code:
    $ch curl_init();
      
    curl_setopt ($chCURLOPT_URL,"https://www.ups.com/ups.app/xml/Track"); /// set the post-to url (do not include the ?query+string here!)
      
    curl_setopt ($chCURLOPT_HEADER0); /// Header control
      
    curl_setopt ($chCURLOPT_POST1);  /// tell it to make a POST, not a GET
      
    curl_setopt ($chCURLOPT_POSTFIELDS"$y");  /// put the query string here starting with "?"
      
    curl_setopt ($chCURLOPT_RETURNTRANSFER1); /// This allows the output to be set into a variable $xyz
      
    $this->xmlreturndata curl_exec ($ch); /// execute the curl session and return the output to a variable $xyz
      
    curl_close ($ch); /// close the curl session 
    Jon Whitcraft :: It's the Bombdiggity!
    Web Applications Developer :: Zend Certified Engineer
    http://www.indycar.com


Bookmarks

Posting Permissions

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