2023 Metin2 private servers
Advertising Campaign

Documentation

English

Vote ID

The player votes on our website, and our platform automatically triggers and signals to your game server, your player's vote in order to reward him.
    • Allows you to verify a vote using your player's account ID
    • API compatible with IPv4 and IPv6 protocol
    • Offers better performance
Go to our platform, in the API configuration of your game server and define the URL according to your environment, in these examples, api-vote is the name of the API script:
  • Example : https://example.com/api-vote.php
  • Example : https://example.com/api-vote/

Voting URL

You must define within your website, a dynamic voting link for your player. This link must imperatively contain the ID of your game server as well as the ID of your player's account within your game server.
  • Example : https://metin2.top/in/game-id-game-seo-name/player-id/

API

You must create a new file, specific to our API for your website, this script must not be in a secure area and must be freely accessible so that our platform can call it after a vote. Our API allows you to reward your player for having made a vote for your game server within our platform, for this you must adapt and add the script of your reward.
<?php

    // Secret key of your game server
    define('GAME_KEY', 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx');

    // Data Verification
    if (!isset($_GET['miaw']) && empty($_GET['miaw'])) {

        // The request is incomplete
        die('GET method is not defined');
    } else {

        // Data decoding
        $_API = json_decode(base64_decode($_GET['miaw']), true, 2, JSON_OBJECT_AS_ARRAY);

        // $_API['key'] => Secret key of your game server
        // $_API['ip'] => Your player's IPv4 or IPv6 address
        // $_API['ipv4'] => Your player's IPv4 address
        // $_API['id'] => Your player's account ID

        if ($_API['key'] == GAME_KEY) {

            // You can reward your player
            // Identify your player using $_API['id']
        } else {

            // The secret keys are not identical
            // The request is probably falsified
            die('Keys do not match');
        }
    }
?>