Downloader
Downloader
* A file downloader
* @uthor: PARITOSH KUMAR RAKESH
* DATE: JUL 23 2020
*/
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <signal.h>
#include <string.h>
#include <libxml/HTMLparser.h>
#include <libxml/xpath.h>
#include <libxml/uri.h>
#include <curl/curl.h>
int main()
{
CURL* curl; //Curl handle for networking
char filename[20];
char url[1000];
system("clear");
printf("URL >>> ");
scanf("%s",&url);
printf("Filename >>> ");
scanf("%s",&filename);
FILE* fp = fopen(filename,"wb");
int result;
curl = curl_easy_init(); //initialise the handle
curl_easy_setopt(curl, CURLOPT_URL, url); //configure the handle to parse the
url
curl_easy_setopt(curl, CURLOPT_ALTSVC, "altsvc.txt");