首页 用户信息 用户信息示例代码 查询用户api接口[PHP]

查询用户api接口示例代码[PHP]

作者: 阅读数:2291 上传时间:2019-07-15

查询用户api接口

<?php
//查询用户接口信息
require_once 'curl.func.php';

$appkey = 'your_appkey_here';//你的appkey

$url = "https://api.jisuapi.com/userinfo/api?pagenum=1&appkey=yourappkey";
$result = curlOpen($url, ['ssl'=>true]);
$jsonarr = json_decode($result, true);

if($jsonarr['status'] != 0)
{
    echo $jsonarr['msg'];
    exit();
}
$userinfo = $jsonarr['result'];
echo $userinfo['total'].' '.$userinfo['pagenum'].' '.$result['pagesize'];
foreach ($userinfo['list'] as $key=> $value) {
	echo $val['apiname'].' '.$val['totalnum'].' '.$val['usednum'].' '.$val['todaynum'].' '.$val['isalarm'];
}