Loading...
Loading...
All examples and the tester below will update based on your selection.
When a player votes, we send a simple GET request to your callback URL:
The player's username is appended directly to your URL. Just read the URL parameter.
Example in PHP:
$username = $_GET['i'];1<?php
2// Simple Legacy Callback Handler
3// URL: https://yoursite.com/vote.php?i=
4
5$username = $_GET['i'] ?? '';
6
7if (empty($username)) {
8 http_response_code(400);
9 die('Missing username');
10}
11
12// Sanitize the username
13$username = preg_replace('/[^a-zA-Z0-9_-]/', '', $username);
14
15// Optional: Prevent duplicate votes (check database)
16// $exists = checkIfVotedRecently($username);
17// if ($exists) { die('Already voted'); }
18
19// Reward the player
20// Your reward logic here...
21// Example: addVoteReward($username);
22
23http_response_code(200);
24echo "OK";Test your endpoint before going live
URL should end with = (e.g., ?i= or ?user=). We'll append the test username.
Copy this prompt and paste it into ChatGPT, Claude, or any AI assistant to get a complete implementation for your setup:
I need help setting up a LEGACY vote callback endpoint for rsps.dev. ## My Setup - Language/Framework: [PHP/Node.js/Python/Java/etc.] - Web Server: [Apache/Nginx/etc.] ## Requirements 1. Create a simple callback endpoint that: - Receives GET requests with the player username as a URL parameter - Example: https://mysite.com/vote?i=PlayerName - Returns HTTP 200 on success - Prevents duplicate processing (optional - track voted users) 2. How to connect it to my game server for rewards This is a LEGACY/Simple callback - no signature verification needed. Please provide complete, production-ready code.
Send players to your unique vote URL. Replace PLAYER_USERNAME with their in-game name:
https://rsps.dev/servers/YOUR_SERVER_ID/vote?callback=PLAYER_USERNAMEReplace YOUR_SERVER_ID with your server's numeric ID (found in your dashboard)
For Legacy mode: Make sure your callback URL in the dashboard ends with = (e.g., https://yoursite.com/vote?i=)
Configure your callback in the dashboard and test it with our built-in tester.
Go to Dashboard