PHP code example of xchenhao / maoergame-sdk-phpclient
1. Go to this page and download the library: Download xchenhao/maoergame-sdk-phpclient 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/ */
xchenhao / maoergame-sdk-phpclient example snippets
use MissEvanGame\Client;
// 初始化配置
$client = new Client('app_id', 'merchant_id', 'access_id', 'access_secret');
// 设置网关地址
$client->setGatewayURL('getway_url');
// 请求 API
$result = $client->queryUserInfo(['token' => 'xxxxxx']);
print_r($result);