Help needed ...
Dear Wget Users, I am a newbie trying to write a small download program in linux which should get a specific file given in the URL similar to wget. My requirement is NOT towards handling all the complexities which are addressed in WGET. Can some body send me a sample code with which I can download a single file from the URL given. I am writing in C and tried to understand Wget..which looked very complicated. Any further suggestion are appreciated. for example: int main() { int i = getfile(http://ftp.gnu.org/pub/gnu/wget/;, wget-1.9.tar.gz); if ( i != 0 ) printf( Successfully Downloaded\n); else printf(HTTP address invalid\n); return 0; } Could you please help me with a small sample code... thank you very much.. looking forward... Satya. A.V.S.Phani Kumar
Re: Help needed ...
On Mon, 1 Nov 2004, Phani Kumar Anumolu wrote: Can some body send me a sample code with which I can download a single file from the URL given. I am writing in C and tried to understand Wget..which looked very complicated. Consider using libcurl: http://curl.haxx.se/libcurl/ ... or a competitor: http://curl.haxx.se/libcurl/competitors.html -- -=- Daniel Stenberg -=- http://daniel.haxx.se -=- ech`echo xiun|tr nu oc|sed 'sx\([sx]\)\([xoi]\)xo un\2\1 is xg'`ol
on tilde bug
Hello. I traced the url given at command line, and it looks like there is no difference if one gives ~ or %7E. Is this true? The urls end up to url_parse() which switches ~ (as unsafe) to %7E. If the original url is not used at all as it looks like, then there is no difference. But mysteriously the url with ~ and the url with %7E downloaded files differently! I also added new log outputs and while testing them with the problem sites, surprise, there seemed to be no problems. So, the fact that urls are not downloaded, could be just some code bug in wget. But why this problem appears when ~ is in the download url? Have I just missed the other cases? Or is the bug in the code which expands the unsafe characters? Juhana
char 5C problem
Hello. Wget could not download the images of the page http://www.fusionindustries.com/alex/combustion/index.html The image urls have %5C (backslash \) in them. http://www.fusionindustries.com/alex/combustion/small%5C0103%20edgepoint-pressure%20small.png http://www.fusionindustries.com/alex/combustion/big%5C0103%20edgepoint-pressure.png The wget 1.9.1 options used included -E, -r, -k, and -np. Juhana