User Guide to OpenTTDLib
Presenting Live OpenTTD Game Data On Your Website
About
OpenTTDLib is a set of PHP5 classes enableing you to query your game server and retrieve live information, which can then be displayed on your website or stored in a database to build more interesting statistics.
The project is based on work by TrueLight, derived from a file which used to be maintained by the OpenTTD developers, though was removed from the project in March 2007 due to maintainablilty / testing problems.
OpenTTDLib is licensed under the GNU General Public License version 2.0.
Requirements
OpenTTDLib is written in PHP5 and makes use of the BCMath functions. These functions are only available if PHP was configured with --enable-bcmath
OpenTTDLib's caching support makes use of the SimpleXML object, available as of PHP 5.1.3
- If you disable the caching functionality, however, you will be able to use an earlier version of PHP5, refer to the Settings documentation, specifically the section on OpenTTDLib::OPTION_CACHE_NEWGRF.
example2.php makes use of PEAR's HTML_Template_Sigma, please refer to http://pear.php.net for information on how to install PEAR and how to install PEAR packages.
The main purpose of example2.php is to show the possibilies one has and to provide an example of how to query a server and how to fetch and make use of the data made available.
Bugs
Please report bugs, problems and feature requests at http://codecubes.org