Author Topic: Content Retrieval - Player Stats  (Read 618 times)

Offline MrSpanky

  • Zinc Member
  • *
  • Posts: 97
Content Retrieval - Player Stats
« on: August 31, 2006, 01:55:42 PM »
I want to post certain stats from the current tour on our website.  Lets say for instance I wanted to post the Kill/Death ratio of my fellow hams.  Does anyone have any idea if you can retrieve those stats with code?

Offline Dace

  • Silver Member
  • ****
  • Posts: 1443
Content Retrieval - Player Stats
« Reply #1 on: August 31, 2006, 04:10:41 PM »
At the top of the page got to "Community/Scores".

Offline Schatzi

  • Platinum Member
  • ******
  • Posts: 5729
      • http://www.slowcat.de
Content Retrieval - Player Stats
« Reply #2 on: August 31, 2006, 04:30:07 PM »
If i understand correctly, you want to write a program that retrieves said stats automatically at the end of each tour?
21 is only half the truth.

Offline MrSpanky

  • Zinc Member
  • *
  • Posts: 97
Content Retrieval - Player Stats
« Reply #3 on: September 01, 2006, 05:38:20 AM »
Yep, sorry if that was confusing. :(

Offline Spatula

  • Silver Member
  • ****
  • Posts: 1486
Content Retrieval - Player Stats
« Reply #4 on: September 04, 2006, 06:04:41 PM »
I made myself a stats retrieving, compiling and viewing application. It  screen-scrapes from 3 HTC scores/stats pages and saves its all in in XML. You can do gnarley things with it - does cool graphs, group-bys, sort-bys etc to view data in many ways.
The bottom line is if you want your data in XML - i can get it for as many tours as you want - just check my signature...
Airborne Kitchen Utensil Assault Group

Offline MrSpanky

  • Zinc Member
  • *
  • Posts: 97
Content Retrieval - Player Stats
« Reply #5 on: September 06, 2006, 05:14:34 PM »
Thats awesome.  I've never worked with xml.  Is there a way to take the xml files in the data file and post them on a website?  It seems like right now the xml files can only be displayed through the program.

Offline Spatula

  • Silver Member
  • ****
  • Posts: 1486
Content Retrieval - Player Stats
« Reply #6 on: September 06, 2006, 05:33:16 PM »
The short answer is you can use XML data however you like, so yes, there's no reason you couldnt use the XML files with a PHP script or an XSLT sheet to transform it into a web page.

Do some research on XSLT or have a look at what PHP can offer you as far as reading from an XML file and rendering a web page dynamically. try http://www.php.net and take a look at the XMLReader class.

There may be 3rd party php scripts which have already been written which may do this for you automatically.

Sorry i cant be of anymore help - as im no php guru.
Airborne Kitchen Utensil Assault Group

Offline Spatula

  • Silver Member
  • ****
  • Posts: 1486
Content Retrieval - Player Stats
« Reply #7 on: September 06, 2006, 05:50:43 PM »
The XSLT transforming is probably the simplest way of going about generating pages from that XML data. Try this page for some quick and dirty examples and explanations:
http://www.brics.dk/~amoeller/XML/xslt.html

Mind you that would probably lead to a maintenance nightmare over time. So maybe the PHP route is better in the long run? Try searching for SimpleXML
« Last Edit: September 06, 2006, 06:24:46 PM by Spatula »
Airborne Kitchen Utensil Assault Group