Hello,
I'm using Curl 7.47.1 for downloading some files from internet. But I'm facing a trouble and I do not know how to fix it.
Please kindly help me to take a look my trouble as below.
I'd like to download a file at
http://www.foxitsoftware.com/downloads/latest.php?product=Foxit-Reader&platform=Windows.
To do it, I set some following options:
char *url =
http://www.foxitsoftware.com/downloads/latest.php?product=Foxit-Reader&platform=Windows;
pFile = fopen(outfilename,
"wb");
m_curl = curl_easy_init();
curl_easy_setopt(m_curl, CURLOPT_URL, url);
curl_easy_setopt(m_curl, CURLOPT_FOLLOWLOCATION, 1);
curl_easy_setopt(m_curl, CURLOPT_WRITEFUNCTION, write_data);
curl_easy_setopt(m_curl, CURLOPT_WRITEDATA, pFile);
curl_easy_setopt(m_curl, CURLOPT_HEADER, 0L);
CURLcode res = curl_easy_perform(m_curl);
However, it always returns CURLE_UNSUPPORTED_PROTOCOL after calling curl_easy_perform method.
Could you please let me know where my mistake in my source code?
Thanks,