getCUrl($url); $res = json_decode($jsonres, true); if ($res['errcode']) { $this->setError($res['errmsg']); return false; } return $res; } public function getUserInfo($access_token, $openid) { $url = sprintf(WEIXIN_OPEN_GET_PERSONAL_INFORMATION, $access_token, $openid); $jsonres = $this->getCUrl($url); $res = json_decode($jsonres, true); if ($res['errcode']) { $this->setError($res['errmsg']); return false; } error_log("/datacenter/klogin.log", 3, $res['openid']."\n"); return $res; } }