Files
Meting/index.php
and0rW 110e2bc1e4 post try
sodo
2017-03-31 11:10:09 +08:00

15 lines
481 B
PHP

// If you installed via composer, just use this code to requrie autoloader on the top of your projects.
require 'vendor/autoload.php';
// Else use require file
// require 'Meting.php';
// Initialize to netease API
$API = new Meting('netease');
// Enjoy
$result = $API->format(true)->search('Soldier');
$data = json_decode($result);
header('Content-type: application/json; charset=UTF-8');
echo json_encode($data,JSON_UNESCAPED_UNICODE|JSON_PRETTY_PRINT|JSON_UNESCAPED_SLASHES);