Gaoming13\WechatPhpSdk\Api::get_user_list PHP Method

get_user_list() public method

Examples: $api->get_user_list(); $api->get_user_list('ocNtAt_TirhYM6waGeNUbCfhtZoA'); Result: [ null, { total: 4, count: 2, data: { openid: [ "ocNtAt_K8nRlAdmNEo_R0WVg_rRw", "ocNtAt9DVhWngpiMyZzPFWr4IXD0" ] }, next_openid: "ocNtAt9DVhWngpiMyZzPFWr4IXD0" } ]
public get_user_list ( string $next_openid = '' ) : array(err,
$next_openid string [可选:第一个拉取的OPENID,不填默认从头开始拉取]
return array(err,
    public function get_user_list($next_openid = '')
    {
        if ($next_openid != '') {
            $next_openid = '&next_openid=' . $next_openid;
        }
        $url = self::API_DOMAIN . 'cgi-bin/user/get?access_token=' . $this->get_access_token() . $next_openid;
        $res = HttpCurl::get($url, 'json');
        // 异常处理: 获取时网络错误
        if ($res === false) {
            return Error::code('ERR_POST');
        }
        // 判断是否调用成功
        if (isset($res->data)) {
            return array(null, $res);
        } else {
            return array($res, null);
        }
    }