Re: How best to fetch a web page...




On Tuesday 25 January 2005 11:42, Hubert Sokolowski wrote:

the easiest way is to use gnet library (www.gnetlibrary.org) that
depends on glib.

The latest GNet release (2.0.5) doesn't have support for http yet
unfortunately, only the latest snapshot (from Oct 7) has the new
GConnHttp stuff.

Hmmm.....  Wonder how long that'll take to sift down into my Debian/unstable packages lists.....


As for fetching a web page by spawning wget, check out the code
here: http://scentric.net/tmp/spawn-async-with-pipes-gtk.c
(could be improved by using g_child_watch_add() to find out when
wget has finished and to get its exit status).

Taking a look-see...  Hmmm.....  Fits the bill quite nicely.  I'll probably use GConnHttp when it gets 
through, I'm already using the GConn stuff in another little project.  But until then, that piece of code 
should prove to be a huge help.  And who knows.  I may even learn to use those GIOChannel things properly.  :)


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]