How best to fetch a web page...




I've been trying to use g_spawn_async_with_pipes to run wget, and have it write the page to stdout (with 
output going to stderr along with anything that would normally go there), and then syphon these off.  The 
output I was hoping to display in a little GtkTextView log window (hidden inside an extender), while the 
fetched page (which is just a text file containing a list of variable=value pairs, some of which I'll be 
displaying in a dialog box) would be parsed as it came in over the spawned wget's stdout.

This is not working for me.  I'm not even going to bother posting my code, because it's a total cock-up.  
Does anyone have any examples I could look at, or hints on how to do this kind of thing (running a program 
and capturing both output channels) properly?


And as an alternative, any suggestions on fundamentally better ways of fetching a web page asynchonously?  
I'm more than willing to do something drastically simple instead but dastedly effective, and forgo the whole 
g_spawn_* experience for now just to have a working program instead.


Advice either way would be much appreciated,
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]