PHP code example of cretueusebiu / gamecenter-identity-verifier
1. Go to this page and download the library: Download cretueusebiu/gamecenter-identity-verifier 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/ */
cretueusebiu / gamecenter-identity-verifier example snippets
use Eusebiu\GameCenterIdentity\Verifier;
$playerId = 'G:1111111111';
$timestamp = 1469626352131;
$bundleId = 'com.myapp.dev';
$publicKeyURL = 'https://static.gc.apple.com/public-key/gc-prod-2.cer';
$salt = '...';
$signature = '...';
$verifier = new Verifier($signature, $publicKeyURL);
var_dump($verifier->verify($playerId, $bundleId, $timestamp, $salt));