LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   How to use curl instead of wget to read http commands (https://www.linuxquestions.org/questions/linux-newbie-8/how-to-use-curl-instead-of-wget-to-read-http-commands-4175495528/)

Osafeliz 02-19-2014 11:59 AM

How to use curl instead of wget to read http commands
 
Hi,
I am using a wget with http commands within a C++ program over linux. I need to substitute wget for curl. Anyone knows how to do it? Here is my code:

Code:

char buf[500];
        snprintf(buf, sizeof(buf), "wget  http:'/'/192.168.3.4/channel.cgi?channel=%d", indexcanal);
        system(buf);
// SAVING THE INFORMATION INTO data.txt FILE
        system("wget http:'/'/192.168.3.4/data/data -O data.txt");


sneakyimp 02-19-2014 03:41 PM

You should probably use the curl C library:
http://curl.haxx.se/libcurl/


All times are GMT -5. The time now is 05:01 AM.