Warcraft III Replay Parser for PHP

» home » example » sourceforge » contact

Another update after a long time (2010-08-07)

Again, after a very long time I release a small update of Warcraft III Replay Parser. This time I also wanted to make more changes and kept delaying the release.

Many thanks to David Joerg for a donation and Mike Plichta for some fixes.

If you find Warcraft III Replay Parser useful and appreciate my work, you can donate through PayPal (any debit or credit card):



Introduction to Warcraft III Replay Parser

Warcraft III Replay Parser? What is that? Maybe you know or maybe not that Warcraft III (strategy video game) replay files (*.w3g) have much information inside. Almost everything can be pulled out of them: players accounts, races, colours, heroes and units made by each player, chat log and many more. If you are a webmaster of Warcraft III replay site or clan page you know how boring adding new replays can be without automation. This PHP script helps you provide as much information about replays on your site as possible without all the hard work.

You can see how it works at the example page.

How do I use it?

First of all you need to know the basics of PHP language. Generally, Warcraft III Replay Parser is a class with many arrays and variables. It's divided into five sections (arrays): header (basic information about the replay file), game (basic information about the match), teams (who played/observed the game), chat (if it was present in the game) and, since version 2.0, errors (with errors that occured during parsing the replay file). Each section has its own subarrays and variables describing the replay (try print_r() function to see the whole structure). It's only up to you which of them you use.

A comprehensive example, which can be found here (also the link on the top), is also provided in the package. If you experience any problems you may want to take a look at this forum thread at ShadowFlare's Realm, W3G documentation (by Nagger and Blue; included in the package) or at PHP Documentation.

Download

I advise you to use the newest version, download an older one only if the newest works wrong for you. You can report bugs by contacting me via e-mail.
Please place a note with a link to this website on your site if you use this script.

You can download the newest version of Warcraft III Replay Parser at SourceForge.

Starcraft 2 Replay Parser

If you are looking for a Starcraft 2 Replay Parser, you can have a look at phpsc2replay project. I'm not the author but it seems quite similar to my parser.

Changelog

TODO:

2.4 (07.08.10):

2.3 (06.01.08):

2.2 (25.05.05)

2.1 (12.11.04):

2.0 (21.09.04):

1.9 (15.05.04):

1.8c (14.01.04):

1.8b (07.01.04):

1.8 (04.01.04):

1.7 (21.12.03):

1.6 (14.12.03):

1.5 (30.11.03):

1.4 (21.11.03):

1.3 (06.11.03):

1.2 (29.10.03):

1.1 (27.10.03):

SourceForge.net Logo