示例#1
0
function get_access_token()
{
    $token = QMC::read("token");
    if (!$token) {
        $authurl = "https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid=wxee6c914fca02f4dd&secret=1d0fe2e4f06a42caf289ab817a56d331";
        $html = file_get_contents($authurl);
        $obj = json_decode($html);
        $token = $obj->access_token;
        $time = $obj->expires_in;
        QMC::store("token", $token, $time - 60);
    }
    return $token;
}
示例#2
0
文件: wx.php 项目: keyidadi/wxbridge
 private function regHandler($user, $devid)
 {
     # code...
     include './qmc.php';
     QMC::store($devid, array($user));
 }