http://tribes.tribalwar.com/vup/Bohica/tv_demo.tar.bz2
Code:
INCLUDED IN THIS RELEASE
- (index.php) Sample demo indexing script
- (tv_demo.php) Demo information extraction code
REQUIREMENTS
- Webserver configured to support PHP (tested on Apache2 and: PHP 4.3.8, PHP
5.0.2)
- Valid T:V recordings
HOW TO USE
Include tv_demo.php in your own script (with include_once("tv_demo.php"), for
example). Call get_demo_info(/path/to/demo/file). On success, returns an
array of format ('map','player','date'). On error, returns false.
EXAMPLE:
See index.php for a complete example. In brief:
include_once("tv_demo.php");
$info = array();
$info = get_demo_info("VuP_vs_FTM_Scrim.dem");
if($info !== false) {
printf("[Map: %s] [Player: %s] [Date/Time: %s]\n",
$info['map'], $info['player'], $info['date']);
} else {
print "Error getting demo information.\n";
}
BUGS / FEATURE REQUESTS
Email bug reports or feature requests to aschorer+bugs@warpedlight.com (yes,
the +bugs should be there). Alternately, you can contact me on IRC: bohica on
irc.dynamix.com in #vup.