What is incentive voting?
By default, the RSPS list is ordered by vote count. The more votes a server has, the higher it will rank. To keep your players motivated to vote for your server, you will most likely need to reward them for their votes. This is what we use to call ‘incentive voting’.
How does incentive voting work?
The idea of incentive voting is quite simple. You send your players to a unique voting URL, the players vote and then we notify your system to let you know the player has successfully voted. It’s up to you to decide what you’re going to do next. How are you going to reward your player?
How can you install incentive voting?
1. Setting a Callback URL
The first step is providing us with a so-called ‘Callback URL’. This is a hidden page on your website which we will load (‘call’) once a player has voted. You can provide your Callback URL in your server settings.
Note: Using CloudFlare? We recommend disabling it on your callback URL, as it might block the callback.
2. Send your players to your voting page at RuneLocus
While this step might seem straight forward, you do need to pay close attention. You’ll want to make sure the voting page URL has the right formatting, a correct example is:
https://www.runelocus.com/top-rsps-list/hamsterscape/vote?callback=CONTENTHERE
In the example above, the base URL is bold. You can find your server’s base URL in your account.
We completed the base URL with “/vote?callback=CONTENTHERE“, you’ll need to do the same. The ‘CONTENTHERE’ in our example can be anything unique of your choice, to help you identify your player (e.g. player name, session ID, IP address, etc). We will pass this back to your Callback URL after a successful vote.
3. Processing successful votes on your system
For this example, we will uses the following callback URL: https://www.yourdomain.com/voteprocessing
We send the following variables to your callback URL (using both $_POST and $_GET):
- callback – the aforementioned URL parameter (in our example ‘CONTENTHERE’).
- ip – the voter’s IP address (might be useful for some servers).
The final callback URL we would call is: https://www.yourdomain.com/voteprocessing?callback=CONTENTHERE&ip=VOTERIP
How you’re going to process these variables is completely up to your own imagination. Below, you will find a quick PHP snippet. Use it on your callback page to log all votes in a MySQL table, or use it as starting point or inspiration to create your own script.
4. Testing the callback
Have you finished setting up the callback and the rest of the incentive voting process? Use our Callback Tester to test whether everything works.