Skip to content

cxw3292008/w3gphp

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build Status

Warcraft III Replay Parser

Based on the W3G-Parser for PHP created by Julas: http://w3rep.sourceforge.net/

This library should be fully compatible with existing versions, only enhancing its functionality. It adds another property called "json_parsed_full" to the PHP class object that allows retrieval of well-defined data structures.

Normalized JSON data structures

Can be accessed by using the json_parsed_full property of the Replay object. Currently still work in progress and not 100% reliable yet.

$this->json_parsed_full["teams"] = $teams;
$this->json_parsed_full["game"]  = $this->game;
$this->json_parsed_full["teams_simple"]  =$teams_simple;
$this->json_parsed_full["julas"] = $this->players;
$this->json_parsed_full["w3gplus"]  =$this->arm;

Example usage in a simplified PHP backend script using an uploaded replay file as source.

if (isset($_FILES['custom_replay'])) {
    $replay = new replay($_FILES["custom_replay"]['tmp_name']);    
    print (json_encode($replay->json_parsed_full));
    die;
}

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • PHP 100.0%