php根据appid和secret获取微信access_token,php通过curl远程获取微信access_token信息
获取开发者ID(AppID)和开发者密码(AppSecret)【https://mp.weixin.qq.com】
微信企业服务号配置详细教程:http://www.sucaihuo.com/php/3009.html
$appid = 'wx422126b0b6bbfcfc';
$secret = '***';
$url = "https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid=" . $appid . "&secret=" . $secret . "";
$ch = curl_init();
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$result = curl_exec($ch);
curl_close($ch);
print_r(json_decode($result, true));
系统已开启自动识别垃圾评论机制,识别到的自动封号,下载出错或者资源有问题请联系全栈客服QQ 1915635791