LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-19-2014, 12:59 PM   #1
Osafeliz
LQ Newbie
 
Registered: Feb 2014
Posts: 1

Rep: Reputation: Disabled
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");

Last edited by colucix; 02-19-2014 at 03:12 PM. Reason: Added CODE tags.
 
Old 02-19-2014, 04:41 PM   #2
sneakyimp
Senior Member
 
Registered: Dec 2004
Posts: 1,001

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


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Cant Download the file using wget or curl apirani Linux - Newbie 3 02-18-2014 12:35 AM
curl and wget http post williebens Linux - Newbie 4 10-12-2010 12:03 AM
wget/curl problems PLS HELP tommmmmm Linux - Software 0 08-19-2005 04:58 AM
YOU for SUSE 9.1 - curl or wget? djc SUSE / openSUSE 1 02-15-2005 04:26 PM
Wget and cURL can't connect umberleigh Linux - Newbie 0 09-21-2004 06:59 PM


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

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration