Re: How best to fetch a web page...
- From: "Freddie Unpenstein" <fredderic excite com>
- To: gtk-app-devel-list gnome org
- Subject: Re: How best to fetch a web page...
- Date: Tue, 25 Jan 2005 23:36:05 -0500 (EST)
Why not use libcurl? You can get much more info about your
connection.
libcurl even provides examples for how to use libcurl with a Gtk+ app.
Although I must admit their example should work fine for simple things
becareful not to abuse what the example demonstrates (the use of
gdk_threads_enter/leave) or a I fear it will come back to bit you!
Hmmm..... libcurl does seem to be fairly popular... Shame it doesn't come with a gtkcurl wrapper library,
or something. I'm not even fetching a web page, just a straight text file sitting on a web server (well,
it's actually generated on request by a CGI script), so support for all the extra odds and sods is just bloat.
I just noticed the Gnet examples directory has a VERY basic http-fetch example... I probably would have just
used that if I'd noticed it when I first went looking. :) Although my reasoning for using wget in the first
place, instead of a raw tcp connection, was to have at least some sense of robustness. wget will give me the
page I want, handle a few minor (and not so minor) bugbears that might pop up along the way, and give me a
nice text dump / error log for the nosy. The only thing I don't like about the wget way, is that it exposes
the username/password combo packed into the http query address. So it will be updated to one or the other;
but I think I'll wait and see how Gnet turns out.
Fredderic
_______________________________________________
Join Excite! - http://www.excite.com
The most personalized portal on the Web!
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]