获得微信账户信息

$params=array(
'grant_type'=>'client_credential',
'appid'=>'xxx',
'secret'=>'xxxxxxx'
);
$url='https://api.weixin.qq.com/cgi-bin/token?'.http_build_query($params);
$result_str=$this->http($url);
$json_r=json_decode($result_str,true);
   logger("QUERY_STRING token:".$result_str);


$params=array(
'access_token'=>$json_r['access_token'],
'openid'=>$openid
);
$url='https://api.weixin.qq.com/cgi-bin/user/info?'.http_build_query($params);
$result_str=$this->http($url);
$json_r=json_decode($result_str,true);

你可能感兴趣的:(获得微信账户信息)