Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

Live update on a web page

Options
  • 22-03-2010 6:59pm
    #1
    Registered Users Posts: 24


    I want to extract information from one page and post it on my own.

    Simple example would be a football game:

    I would like the page to change the score from "Ireland 0 : 0 Brazil" to "Ireland 0 : 1 Brazil" when it is updated on their web page.

    Hence if this is a simple procedure I could then go to a different website and add the yellow cards. As soon as a player receives a yellow card my site would then post it, or maby place a picture beside his name(yellow box).

    Just for the record, most for the information being posted into my site will be set at a standard page layout so by doing the Ireland Brazil game, on another page I could do an England game at the same time.

    Thanks for the help in advance guys...


Comments

  • Registered Users Posts: 7,541 ✭✭✭irlrobins


    But what's your question?


  • Registered Users Posts: 24 ReddishClub


    How to do this. I need to know is there software out their to pull the info from one site and automaticly post it on mine.

    Or is this solely programming, and if so what language would be needed.

    Sorry for not being clear enough.


  • Registered Users Posts: 7,541 ✭✭✭irlrobins


    Don't think you'd find software off the shelf to do this, you'd have to write your own program.

    As for language, any would do, just some knowledge of webpage structures and networking would be required. Ideally the program would be able to adapt to any changes in the source site.


  • Moderators, Science, Health & Environment Moderators Posts: 8,954 Mod ✭✭✭✭mewso


    The two most common ways are screen scraping and consuming services. Screen scraping is using your choice of development language to request that page, parse it and use the information. I'm not sure of the legal ramifications here but I would guess unless the site has stated that the content can be used you are courting trouble if you do scrape it,

    The services way is RSS feeds for example. If a site provides their content in RSS feeds then they are by definition making it available to whomever wants to use it since it's designed to facilitate consumption. Again you can do this with your chosen language.

    Finally to make your page update in real time it's good old ajax which is easy with jQuery or other good script library.


  • Closed Accounts Posts: 20,759 ✭✭✭✭dlofnep


    Pretty much what mewso has said. Screen-scraping or feeds is the best way to accomplish it.


  • Advertisement
  • Registered Users Posts: 24 ReddishClub


    Ok then. Lads the info is perfect. I totally understand that rss feeds are better for what Im doing.

    Ive looked into ways to extract info from rss feeds and failed. The only software out there was a feed burner which basicly took incoming feeds and posted multible output feeds, of the exact same text, on my site.

    But this doesnt help me. I would need something to pull out certain info in relation to what I was looking for.

    An example page (but unfortunatly not an rss feed) would be on the skysports website. When a premier league game is playing, they have a running text commentry. The page uploads every minute and new posts arrive by the commentator continuously.

    (I can give you an addresss of the sky sports page if Im aloud to post it here)

    Here I want my program to read the first post and pick out any chosen keywords. Hence preform a task, in relation to changing or adding info on my site.

    I now understand that I need to get back into my programming for this. I currently know HTML and a touch of JavaScript. Which area of programming do you reckon I should move to. Our what should I google.

    Cant understand why there is nothing out there. Must be some software?

    Man I waffle!. Last thing: Lets also take onboard, any info I extract will be done legaly. My website will be working with the company where the info is coming from.


  • Closed Accounts Posts: 20,759 ✭✭✭✭dlofnep


    Screen scraping can accomplish that if you're looking to single out a particular segement of the page.


  • Registered Users Posts: 1,825 ✭✭✭Gambler


    If you have no background it might take you a while to muddle through what you want to do but my first stop would be to look a some sample curl code in PHP. That allows you to fetch the content of other webpages which you would then need to parse to get the specific data you want.

    If you want asp classic then you can use Server.Createobject("MSXML2.ServerXMLHTTP") (Just google that for more info) or in ASP.NET you can use System.Net.WebClient or System.Net.HttpWebRequest. Again with these options you will get the html code of the target page and will have to parse it for the data you want.


  • Registered Users Posts: 24 ReddishClub


    Great. I look into this Screen Scraping.

    Anybody out their with a good webpage for me to start learning everything about it would be excellent.

    Also gotta thank everyone for their comments too


  • Registered Users Posts: 1,825 ✭✭✭Gambler




  • Advertisement
Advertisement