Documentation
EnglishCallback URL
The player votes on our platform, and, at the end of this vote, is redirected to your website using a specific parameter in our URL. You must first install our Vote API.
- A GET type parameter must be passed to our URL
- Parameter value must be URL encoded
- Failing to vote, the parameter will be lost if the player consults our platform
The first step is to encode your redirect URL, for this there is a function in PHP allowing you to do this:
<?php
urlencode('https://top-dofus.fr/test.php');
// Result // https%3A%2F%2Ftop-dofus.fr%2Ftest.php
?>
Some examples of URL's on which you can redirect your player with an automatic redirection at the end of the vote:
- URL of your game server record
- Voting URL to customize according to API
Example
https://top-dofus.fr/game/3-core-top/?callback=https%3A%2F%2Ftop-dofus.fr%2Ftest.php
Example
https://top-dofus.fr/in/3/336699-core-top/?callback=https%3A%2F%2Ftop-dofus.fr%2Ftest.php
PHP Example
<a href="https://top-dofus.fr/game/3-core-top/?callback=<?= urlencode('https://top-dofus.fr/test.php') ?>" title="Vote on Top-Dofus.fr">Vote on Top-Dofus.fr</a>
<a href="https://top-dofus.fr/in/3-core-top/<?= $playerid ?>/?callback=<?= urlencode('https://top-dofus.fr/test.php') ?>" title="Vote on Top-Dofus.fr">Vote on Top-Dofus.fr</a>