bastecklein said:Well you would just use the game data file for the current version. You can find it using the following syntax:
whereby you just change the version number in the URL to reflect the latest release version of the game. The entire file is a JSON object so it should be easy enough to parse.
annoyingly, (using 1.5.0) this does not seem to be the case. if it was JSON I could use
$gamedata = json_decode(file_get_contents('https://www.apewebapps.com/apps/my-colony/1.5.0/game.js'),true)
to get a nice PHP array; as it is I have to use
<script>document.getElementById('data').value = JSON.stringify(window.ColonyGame);</script>
<input type="hidden" id="data" name="data">
submit the form and then
$gamedata = json_decode($_POST['data'],true);
Having an actual JSON file would be quite useful.
My Colony Discord Server - https://discord.gg/dvJSKBB