From 110e2bc1e4e6759ec3e5f3323d23bf816fc71e4f Mon Sep 17 00:00:00 2001 From: and0rW Date: Fri, 31 Mar 2017 11:10:09 +0800 Subject: [PATCH] post try sodo --- index.php | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 index.php diff --git a/index.php b/index.php new file mode 100644 index 0000000..084f045 --- /dev/null +++ b/index.php @@ -0,0 +1,14 @@ +// 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);