thinkphp 调用云片查询接口

    /**
     * 云片网的数据查询接口
     */
    public static function Yunpian(){
        $client = new Client;
        $response = $client->request('POST', 'https://sms.yunpian.com/v2/user/get.json', [
            'form_params' => [
                'apikey' => '你的key',
            ]
        ]);
        $body = $response->getBody()->__toString();
        return json_decode($body,TRUE);
    }

 

你可能感兴趣的:(PHP编程)