cURL / Mailing Lists / curl-library / Single Mail


How to download a zip file using http

From: <>
Date: Tue, 19 Nov 2013 19:18:28 -0500


I am wondering since i am a little confused on how to download a zip
file from a url like I have looked at the
examples such as simple.c but that only returns the source of the page.
I than tried to do something like this (idk if it would be better as a
attachment or not).

#include <stdio.h>
#include <curl.h>

 CURL *curl;
 CURLcode res;

 curl = curl_easy_init();

if(curl) {
 curl_easy_setopt(curl, CURLOPT_URL,

 /* Perform the request, res will get
the return code */
 res = curl_easy_perform(curl);
 /* Check for errors
 if(res != CURLE_OK)
 fprintf(stderr, "curl_easy_perform() failed:

 /* always cleanup */

 system("PAUSE"); //so i can read what it
 return 0;

It returns PK♣♠ so something is not right
here and i am using this on c++ but i have not found a problem with

So how do i download a zip from a url?


List admin:
Received on 2013-11-20