cURL / Mailing Lists / curl-library / Single Mail

curl-library

using libcurl for HTTPS with IP address as server address

From: Ajay Tanpure <ajaytanpure92_at_gmail.com>
Date: Tue, 4 Jun 2013 23:03:10 +0530

Hello,
I am using Libcurl on the HTTPS client side. I have gone through the
example of HTTPS as given on http://curl.haxx.se/libcurl/c/https.html
In this code instead of www.example.com in CURLOPT_URL function, i have
used the localhost as below as my server is also located on same local
machine
and it works fine.

*
>
> curl_easy_setopt(curl, CURLOPT_URL, "https://localhost:8080/a.html");*

But when i use IP address of the server like

*
>
> curl_easy_setopt(curl, CURLOPT_URL, "https://127.0.0.1:8080/a.html");*

or when server located on remote host then accessing web pages as

*
>
> curl_easy_setopt(curl, CURLOPT_URL, "https://192.168.0.105:8080/a.html");*

does not work.
It gives error that curl_easy_perform() fails.

How to handle this?

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2013-06-04