ES
English Български Русский Español Português Türkçe Tiếng Việt 中文 한국어 ไทย Filipino Azərbaycan

Para dueños de servidores

Agrega tu servidor, pon el enlace de votación en tu sitio y recompensa a tus jugadores automáticamente. Tres pasos:

Elige tu juego: la página mostrará exactamente qué configurar.

1. El enlace de votación

Pon este enlace en tu sitio (SERVER_ID está en Mis servidores):

https://mmotop100.com/vote/SERVER_ID?u=PLAYER_NAME

u = el nombre de cuenta de tu jugador (letras, dígitos, _ . @ -, hasta 64). Te vuelve en el postback, así sabes a quién recompensar.

2. Cómo reciben la recompensa tus jugadores

Postback - avisamos a tu sitio que el jugador votó

Después de cada voto contado llamamos a tu dirección de postback (POST, campos de formulario):

CampoSignificado
server_idel número de tu servidor
vote_idel número del voto - único; recompensa cada vote_id UNA SOLA VEZ
userel u de tu enlace de votación
ipla dirección IP del votante
countryel país del votante (dos letras, puede estar vacío)
timecuándo (segundos unix, UTC)
test1 = una prueba desde tu panel, no recompenses
sigfirma: HMAC-SHA256 de "vote_id|server_id|user|ip|time" con tu secreto de postback

¿Tu sitio lee parámetros GET? Pon los marcadores en la dirección y enviaremos un GET con ellos rellenados: {user} {ip} {vote_id} {server_id} {time} {country} {test} {sig}

https://your-site.com/vote_reward.php?name={user}&ip={ip}&id={vote_id}&t={time}&sig={sig}

Responde con cualquier estado 2xx. Si tu sitio no responde, lo intentamos de nuevo después de 1 min, 5 min, 30 min, 2 h y 6 h. Cada intento queda en tu registro de postbacks.

Ejemplo en PHP

<?php
// vote_reward.php - called by MMOTop100 when a player voted
$secret = 'YOUR_POSTBACK_SECRET';            // My servers -> your server -> Keys
$in   = $_POST ?: $_GET;
$user = (string)($in['user'] ?? '');
$ip   = (string)($in['ip'] ?? '');
$vote = (string)($in['vote_id'] ?? '');
$sid  = (string)($in['server_id'] ?? '');
$time = (int)($in['time'] ?? 0);
$sig  = (string)($in['sig'] ?? '');

$want = hash_hmac('sha256', "$vote|$sid|$user|$ip|$time", $secret);
if (!hash_equals($want, $sig) || abs(time() - $time) > 86400) { http_response_code(403); exit('bad signature'); }
if (($in['test'] ?? '0') === '1') { exit('OK test'); }

// pay ONCE per vote_id (the same vote can arrive again if your answer got lost):
// INSERT INTO vote_log (vote_id, ...) with vote_id UNIQUE - if it already exists, do nothing.
// then give the reward to $user
echo 'OK';

3. Claim API: la recompensa de un voto, una sola vez

Para plugins de servidores y bots: la primera llamada por un voto devuelve claimed:true y lo marca como tomado; las siguientes dicen que ya está tomado. Pregunta con la IP y/o el nombre del jugador.

GET https://mmotop100.com/api/claim?server=SERVER_ID&key=API_KEY&ip=1.2.3.4&user=PLAYER_NAME
{"claimed":true,"vote_id":123,"at":1762900000}          = give the reward now (each vote only once)
{"claimed":false,"voted":true,"next":1762943200}        = already taken - can vote again at "next"
{"claimed":false,"voted":false}                         = no vote in the last 12 hours

O pregúntanos (API)

Si tu sitio no puede recibir llamadas, pregunta si una IP o un jugador votó en las últimas 12 horas:

GET https://mmotop100.com/api/voted?server=SERVER_ID&key=API_KEY&ip=1.2.3.4
GET https://mmotop100.com/api/voted?server=SERVER_ID&key=API_KEY&user=PLAYER_NAME

{"voted":true,"at":1762900000,"next":1762943200}   or   {"voted":false}

4. Reglas