cURL / Mailing Lists / curl-and-php / Single Mail

curl-and-php

Re: having trouble using curl with https.

From: Mike Brown <mike_at_hbhosting.com>
Date: Sat, 24 Nov 2001 18:52:39 -0600

Brian,

    This is a common problem, in which I really wish the Curl team would post support information on their website about it.

The fix that I found to work, was to install PHP 4.1 (yes, it's not an official release, but it fixes the problem). From what I found, Curl changed their API in May 2001, which caused it to stop working with PHP for https. The patch that is available (you can find info about it on php.net under curl's 'libcurl') did not work for me, so my suggestion is to leave it.

I hope this helps. You can download PHP at http://www.php.net/~zeev/php-4.1.0RC3.tar.gz (thanks to Alan Knowles who posted it), as I found the CVS version to not install properly.

Michael Brown
HBHosting.com
mike_at_hbhosting.com
  ----- Original Message -----
  From: Brian Jankovich
  To: curl-and-php_at_lists.sourceforge.net
  Sent: Saturday, November 24, 2001 1:34 PM
  Subject: having trouble using curl with https.

  I'm having trouble using Curl posting to an https url.

  Curl has OpenSSL support built in according to phpinfo().

  I'm trying to post to a transaction gateway and get a response back.

  The current code I'm using to establish a connection is as follows.

   

  $strURL = "https://my.secure.url/secure.php";

    $ch = curl_init();

    curl_setopt ($ch, CURLOPT_USERAGENT, "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)");

    curl_setopt($ch, CURLOPT_URL, $strURL);

   

   

    $return_string = curl_exec($ch);

    curl_close ($ch);

   

    echo("re:$return_string");

   

   

  Any help is greatly appreciated,

   

  Brian
Received on 2001-11-25