wget library alternative
Is there a C/C++ or any other library function that I could use instead of wget?
Right now, I'm working on a program that uses wget to grab four images. The images are written to disk, but then I have to open all four of them again to do any work with them. This is supposed to be a real-time system, so I was thinking I'm wasting a lot of time writing the images to disk with wget then reading them back out from disk to work on them instead of just using a common buffer or something. If there's no direct alternative to wget, is there another way to do this? |
I dont think there is another way besides wget.
|
I have to use Windows because we are using some other 3rd party apps for camera control. Is there some way to program this manually then? All I need to do is use it this way "wget http://www.url.com/picture.jpg -o drive:/filename.jpg," so all I need is the most basic functionality of the program... Can someone give me at least some like pseudo code or something?
|
doing something like "wget $URL -o - | $MANIP_CMD" might work.
Also, you might want to look into cURL, it provides similar functionality. |
Thanks for the help. I looked at cURL, but I'm not really looking for a command line tool. I'm looking more for library functions or something that I could use to have some wget functionality in my program. Can I do this with just socket(), connect(), etc.?
I was looking for some code examples online where people use wget in their programs, but I guess no one really does this... |
cURL has library functions too. See
http://supertux.lethargik.org/viewvc...pp?view=markup as an example usage |
I believe wget is capable of writing it's retrieved data to it's standard output, which you should be able to attach to your process using a pipe(). See the section on pipes in Beej's Guide to IPC for a decent explanation of the mechanics of this.
--- rod. |
All times are GMT -5. The time now is 07:21 PM. |