Serveurs privés 2023 Metin2
Campagne Publicitaire

Documentation

Français

Legacy Vote IP

The player votes on our platform and you can thus reward him at the end of this vote. For this, your player must go to your website to trigger the call to our API.
  • Allows you to verify a vote using an IP address
  • API compatible with IPv4 and IPv6 protocol
  • Requests can be falsified and tricked

Voting URL

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

API

Route https://top-metin2.org/api/verify/id/ip/

Paramètres

Field Type Description
id integer ID of your game server
ip string IP address of your player

Responses

Integer Description
1 Player has voted - Verified vote
0 Player has already voted and / or vote not found

PHP Example

You need to install our API script on one of your pages on your website. It must be installed on a secure area, that is to say, a page where your player must be connected to your website to consult and access said page. Our API allows you to reward your player for having voted for your game server within our platform, for this you must adapt and add the script of your reward.
<?php

    $id = XXX;
    // ID of your game server

    $ip = isset($_SERVER["HTTP_CF_CONNECTING_IP"]) ? $_SERVER["HTTP_CF_CONNECTING_IP"] : $_SERVER['REMOTE_ADDR'];
    // Get your player's IP address

    $api = "https://top-metin2.org/api/verify/{$id}/{$ip}/";
    // Route

    $response = @file_get_contents($api);
    // API Call

    if ($response && ($response != 0)){

        // Vote OK
        // You can donate virtual currencies
    } else {

        // [OR] The vote has already been verified
        // [OR] No votes were found
        // [OR] An error has occurred
    }
?>
Top Metin2