Aces High Bulletin Board
Squadron Forums => Squadrons => Topic started by: MrSpanky 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?
-
At the top of the page got to "Community/Scores".
-
If i understand correctly, you want to write a program that retrieves said stats automatically at the end of each tour?
-
Yep, sorry if that was confusing. :(
-
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...
-
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.
-
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.
-
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