Menu

Main Menu
Talk Get Daily Search

Member's Online

    User Name
    Password

    how to access internet data via GTK+/C

    Reply
    jaeezzy | # 1 | 2010-06-26, 11:54 | Report

    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

    Edit | Forward | Quote | Quick Reply | Thanks
    The Following User Says Thank You to jaeezzy For This Useful Post:
    granporculio

     
    farmatito | # 2 | 2010-06-26, 13:46 | Report

    Originally Posted by jaeezzy View Post
    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
    Take a look a the wget source code, there you can find plenty of inspiration.

    PS.: also the busybox wget applet should do it if you like it more compact.

    Edit | Forward | Quote | Quick Reply | Thanks

     
    jaeezzy | # 3 | 2010-07-03, 07:14 | Report

    @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

    Edit | Forward | Quote | Quick Reply | Thanks

     
    Joorin | # 4 | 2010-07-03, 08:22 | Report

    Originally Posted by jaeezzy View Post
    @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
    Some sites supply a specialized API to get or send information via their web server(s), not all.

    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.

    Edit | Forward | Quote | Quick Reply | Thanks
    The Following User Says Thank You to Joorin For This Useful Post:
    jaeezzy

     
    jaeezzy | # 5 | 2010-07-03, 09:40 | Report

    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

    Edit | Forward | Quote | Quick Reply | Thanks

     
    Joorin | # 6 | 2010-07-03, 10:42 | Report

    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.

    Edit | Forward | Quote | Quick Reply | Thanks
    The Following User Says Thank You to Joorin For This Useful Post:
    jaeezzy

     
    dannym | # 7 | 2010-07-12, 16:04 | Report

    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).

    Edit | Forward | Quote | Quick Reply | Thanks
    The Following User Says Thank You to dannym For This Useful Post:
    jaeezzy

     
    granporculio | # 8 | 2010-10-11, 20:00 | Report

    Originally Posted by jaeezzy View Post
    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
    How are you doing in your project you talk about here?, i want to do something similar and i'd be very happy if you could share any information...

    Edit | Forward | Quote | Quick Reply | Thanks

     
    mikecomputing | # 9 | 2010-10-11, 21:10 | Report

    Originally Posted by farmatito View Post
    Take a look a the wget source code, there you can find plenty of inspiration.

    PS.: also the busybox wget applet should do it if you like it more compact.
    if you dont must go with gtk use QT instead and qtnetworkmanager api its ver easy api imho

    Edit | Forward | Quote | Quick Reply | Thanks
    The Following User Says Thank You to mikecomputing For This Useful Post:
    jaeezzy

     
vBulletin® Version 3.8.8
Normal Logout