<?php
//ID 密钥
$appid = "wx5502a933452cecf0";
$appsecret = "c7fd97ec7ce4ec3c5f2766b89d97512c";
$url = "https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid=$appid&secret=$appsecret";
$output = https_request($url);
$jsoninfo = json_decode($output, true);
//返回 一个数组
//7200
var_dump($jsoninfo);
$access_token = $jsoninfo["access_token"];
//d定义菜单的格式
$jsonmenu = '{
"button":[
{
"name":"看科普",
"sub_button":[
{
"type":"view",
"name":"专家讲堂",
"url":"http://m.hao123.com/a/tianqi"
},
{
"type":"view",
"name":"不孕不