php 获取公众号access_token方法

142 阅读1分钟
$s = file_get_contents("https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid=APPID&secret=SECRET");
$access_token = json_decode($s, true)['access_token'];