![]() |
how to access internet data via GTK+/C
Hi, I'm in Australia and was wondering if anyone can suggest me as to how I can access data from the server which some web page is using to provide information. To be specific, I want to write an app for a cityrail in australia but couldn't figureout as to where to start. Thanks
|
Re: how to access internet data via GTK+/C
Quote:
PS.: also the busybox wget applet should do it if you like it more compact. |
Re: how to access internet data via GTK+/C
@farmatito: thanks for the reply, I'll be looking through them. However, I had the impression that provider of such services via internet have a particular API to interact with their data server, don't they? like facebook etc.. thanks
|
Re: how to access internet data via GTK+/C
Quote:
In many cases you are forced to download the HTML, parse it (in one of several ways), extract the information you're looking for and use that. This is sometimes called "site scraping". To supply information, via forms, you need to create the specific GET or POST request and simulate entering data into a form and clicking the "Send" button. |
Re: how to access internet data via GTK+/C
Hi joorin thanks for the reply. if you can suggest me some good guides on this would be great, as its completely new thing for me, however I'm doing my part of googling as well :). thanks
|
Re: how to access internet data via GTK+/C
Have a go with libcurl, it's pretty basic but has some special features:
http://curl.haxx.se/libcurl/c/example.html You'll find an example with HTML parsing too, using libxml. |
Re: how to access internet data via GTK+/C
jaeezzy:
in C: to fetch data from a HTTP server, use libcurl. To use XML-RPC, use libsoup (<http://library.gnome.org/devel/libsoup/stable/libsoup-24-XMLRPC-Support.html>). To automate HTML forms, use libsoup (<http://library.gnome.org/devel/libsoup/stable/libsoup-2.4-HTML-Form-Support.html>). or if you use Python: just use urllib, BeautifulSoup and xmlrpclib (<http://www.crummy.com/software/BeautifulSoup/>) (simpler to use than the above). |
Re: how to access internet data via GTK+/C
Quote:
|
Re: how to access internet data via GTK+/C
Quote:
|
All times are GMT. The time now is 00:12. |
vBulletin® Version 3.8.8