PHP code example of topmcfrance / api-client
1. Go to this page and download the library: Download topmcfrance/api-client library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
topmcfrance / api-client example snippets
use TopMcFrance\Api\VoteChecker;
use TopMcFrance\Api\ApiException;
$serverId = 1; // Your server Id
$code = '123456789' // Code take by our user after voting;
$voteChecker = new VoteChecker($serverId);
try{
$voteChecker->checkCode($code);
// vote confirmed, you can give so many diamond !
} catch(ApiException $e){
$error = $e->getApiMessage();
// error in check, see ApiException for more option
}