Warcraft III Replay Parser for PHP

» home » example » sourceforge » contact

Update, finally!

I know it's been a long time (2.5 year) since I released the 2.2 version of the parser, but I have not abandoned the project. Although the thought of making a new version with lots of extra features came through my mind several times, I lacked the time to realize it.

However, I still want to support the Warcraft III community by providing this script. Consequently, I give you a new version of the parser with a few fixes. Most of them were introduced a long time ago, but waited for a bigger release. The last fix addressing the issues with replays with modified chatlog, made me release the 2.3 version.

Additionally, the site and the whole project is now hosted at SourceForge. This should resolve the problems of downloading files from a Polish server some people experienced.

Finally, if you appreciate my work and can spare some money, I would be glad if you donated to this project through the SourceForge donation system. It requires a SourceForge account (which can be created by filling a very short form and also allows you e.g. to monitor this project). After that it's a standard PayPal donation.

Support This Project

PS I am sorry for not answering all the e-mails I get. I sometimes have no time and forget to answer them later.

Welcome

Warcraft III Replay Parser for PHP? What is that? Maybe you know or maybe not that Warcraft III 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.

How do I use it?

First of all you need to know the basics of PHP language. Generally, PHP 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 at SourceForge.

Changelog

TODO:

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