PHP port of Phalynx's WoT-Replay-To-JSON