check if maniacode has been executed with PHP problem

If you have anything to say - or advice to give - on the creation or publishing of ManiaLinks, here is the place to do it!

Moderator: TM-Patrol

Post Reply
wheelbarrow operator
wheelbarrow operator
Posts: 22
Joined: 23 Sep 2013 11:10
Owned TM-games: TMUF

check if maniacode has been executed with PHP problem

Post by jonasredant » 11 Sep 2014 09:26


I'm adding a simple poker game to my manialink (for Trackmania United Forever)
using PHP 5.2. The idea is that users can buy credits to play with coppers.
Suppose you have a quad like this:

<quad posn="0 0 0" sizen="12 6" style="Bgs1" substyle="BgIconBorder" manialink="buyCreditsForGame"></quad>

with buyCreditsForGame a registered maniacode that charges the user 50 coppers and points to an xml file
with the maniacode:

Code: Select all

<?xml version="1.0" encoding="UTF-8" ?>
<message>You've bought 5 credits.</message>
The PHP script has to check whether the maniacode has been executed and if so connect to a MySQL database
and increment credits by 5, update the jackpot,... Is there a way to check with PHP that the above maniacode
has indeed been executed? Remember: the manialink is for Trackmania United Forever, not for maniaplanet/Trackmania 2.



Post Reply