www.webdeveloper.com
Results 1 to 4 of 4

Thread: Getting data from another website

  1. #1
    Join Date
    Jan 2012
    Posts
    1

    Getting data from another website

    How do I gather data from another website and store the information on my own?
    For example, I want to gather the top 10 players on a certain gameworld on an MMORPG game, the link is this:
    http://www.tibia.com/community/?subt...s&world=Antica

    As you can see in the website, it shows a list of 25 player names with their rank, level, and experience. I want to be able to use JavaScript and extract data of the top 10 players and print the rank, name, level, experience of those players on my own website.

    Primarily, I just want to know how to get data from a website and print the data on my own website.

  2. #2
    Join Date
    Nov 2009
    Location
    Timisoara
    Posts
    48
    If you don't want to use old fashioned Excel (even though I think it does the job in your case) Regex will work for you. Check out these tutorials:
    http://office.microsoft.com/en-us/ex...010218472.aspx
    http://www.javamex.com/tutorials/reg...ing_html.shtml

  3. #3
    Join Date
    Dec 2002
    Location
    St. Louis, MO, USA
    Posts
    1,582
    Quote Originally Posted by regans View Post
    If you don't want to use old fashioned Excel (even though I think it does the job in your case) Regex will work for you. Check out these tutorials:
    http://office.microsoft.com/en-us/ex...010218472.aspx
    http://www.javamex.com/tutorials/reg...ing_html.shtml
    Perhaps, but the OP wants this information on his/her own website. Your first suggestion (Excel) would have to be manually run to create the Excel sheet, then the OP would have to have the website access the Excel. Feasible, but cumbersome.

    Your second suggestion (screen-scraping) is not only ethically questionable, but prone to breaking (especially if the site is redesigned) and can't be done in JavaScript - it has to use something called Java I|O, which isn't JavaScript, it's Java (different beast.)

    To my knowledge, you _CAN_ do something like this with AJaX, but (and this is important) not across domains. It's a security issue.

    Can it be done in JavaScript. Perhaps. But it is infinitely easier and more stable to do it with a server-side scripting language, like PHP, ASP, JSP, ColdFusion, etc.

    Just my $0.02.
    |||||
    o . Q
    ___ "You live and you learn; or you don't live long." - Lazarus Long

    ^_^

  4. #4
    Join Date
    Jul 2008
    Location
    urbana, il
    Posts
    2,787

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles