According to this page: http://curl.haxx.se/download.html
You can download the libcurl for windows which is supported by Windows XP and Windows 2000.
It should work fine with the PHP and Apache setup, and you can either have the libcurl or the binary, either will support SSL.
My question is, WHY oh WHY does XAMPP NOT already support https/ssl urls, when trying to use curl via php that is included in XAMPP?
I'm sure AF could easily include this in the next release.
no curl/libcurl ssl/https support, why?
As you can read in the PHP manual, you don't need "libcurl" for the CURL extension.It should work fine with the PHP and Apache setup, and you can either have the libcurl or the binary, either will support SSL.
The CURL extension support HTTPS and I have no problem to use such URI in a test script.My question is, WHY oh WHY does XAMPP NOT already support https/ssl urls, when trying to use curl via php that is included in XAMPP?
@hm2k
Try https://localhost/
Also in the XAMPP admin Welcome page there is this:
For OpenSSL support please use the test certificate with https://127.0.0.1 or https://localhost
Once you are in the https://localhost/ welcome page all php links in the menu are now loaded using https. Click on the Status menu and you should see HTTPS (SSL) Activated
Now you can proceed to do your testing from there.
You may have to create a new certificate for your use as, I believe, the test cert. has expired and may give an error message in your browser.
Try https://localhost/
Also in the XAMPP admin Welcome page there is this:
For OpenSSL support please use the test certificate with https://127.0.0.1 or https://localhost
Once you are in the https://localhost/ welcome page all php links in the menu are now loaded using https. Click on the Status menu and you should see HTTPS (SSL) Activated
Now you can proceed to do your testing from there.
You may have to create a new certificate for your use as, I believe, the test cert. has expired and may give an error message in your browser.
Okay, so lets see here...
From http://uk.php.net/curl
Using OpenSSL is NOT the same as using CURL to access https sites.
An example of curl usage with php can be found here: http://curl.haxx.se/libcurl/php/examples/simpleget.html -- lets use a known https address, eg: https://adwords.google.com/select/
Results in a blank page.
Izzy, what you're talking about is Apache SSL support, NOT curl or PHP.
Besides, infact when I do visit either of those addresses, I get the following error (or similar): The connection to 127.0.0.1 was interrupted while the page was loading.
From http://uk.php.net/curl
However, you WILL find php_curl.dll here: "C:\Program Files\XAMPP\php\extensions\" included with XAMPP.Installation
To use PHP's CURL support you must also compile PHP --with-curl[=DIR] where DIR is the location of the directory containing the lib and include directories. In the "include" directory there should be a folder named "curl" which should contain the easy.h and curl.h files. There should be a file named libcurl.a located in the "lib" directory. Beginning with PHP 4.3.0 you can configure PHP to use CURL for URL streams --with-curlwrappers.
Note to Win32 Users: In order to enable this module on a Windows environment, libeay32.dll and ssleay32.dll must be present in your PATH.
You don't need libcurl.dll from the CURL site.
Using OpenSSL is NOT the same as using CURL to access https sites.
An example of curl usage with php can be found here: http://curl.haxx.se/libcurl/php/examples/simpleget.html -- lets use a known https address, eg: https://adwords.google.com/select/
Code: Select all
<?php
//
// A very simple example that gets a HTTP page.
//
$ch = curl_init();
curl_setopt ($ch, CURLOPT_URL, "https://adwords.google.com/select/");
curl_setopt ($ch, CURLOPT_HEADER, 0);
curl_exec ($ch);
curl_close ($ch);
?>
Izzy, what you're talking about is Apache SSL support, NOT curl or PHP.
Besides, infact when I do visit either of those addresses, I get the following error (or similar): The connection to 127.0.0.1 was interrupted while the page was loading.
Right, and in "C:\Program Files\XAMPP\php\ext\". These are the extensions for PHP4 and PHP5.However, you WILL find php_curl.dll here: "C:\Program Files\XAMPP\php\extensions\" included with XAMPP.
These files are in ""C:\Program Files\XAMPP\apache\bin", so Apache and PHP can find them.Note to Win32 Users: In order to enable this module on a Windows environment, libeay32.dll and ssleay32.dll must be present in your PATH.
You remember my last post?You don't need libcurl.dll from the CURL site.
You are talking to me?Using OpenSSL is NOT the same as using CURL to access https sites.
At line 10 you must add this:Results in a blank page.Code: Select all
<?php // // A very simple example that gets a HTTP page. // $ch = curl_init(); curl_setopt ($ch, CURLOPT_URL, "https://adwords.google.com/select/"); curl_setopt ($ch, CURLOPT_HEADER, 0); curl_exec ($ch); curl_close ($ch); ?>
Code: Select all
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);