<?php
//请求的url地址
//模拟发送post请求(使用curl)
$ch = curl_init();
//设置curl
curl_setopt($ch, CURLOPT_URL, $url);
//捕获内容但不输出
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
//模拟发送post请求
curl_setopt($ch, CURLOPT_POST, 1);
//发送相关数据
$data = ’ {
“button”:[
{
“type”:“click”,
“name”:“今日歌曲”,
“key”:“V1001_TODAY_MUSIC”
},
{
“name”:“菜单”,
“sub_button”:[
{
“type”:“view”,
“name”:“搜索”,
“url”:“http://www.soso.com/”
},
{
“type”:“miniprogram”,
“name”:“wxa”,
“url”:“http://mp.weixin.qq.com”,
“appid”:“wx286b93c14bbf93aa”,
“pagepath”:“pages/lunar/index”
},
{
“type”:“click”,
“name”:“赞一下我们”,
“key”:“V1001_GOOD”
}]
}]
}’;
//模拟发送post请求时传送数据
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
//禁止服务器端校验SSL
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
//执行curl
$output = curl_exec($ch);
if($output === false){
echo curl_error($ch);
}else{
echo $output;
}
//关闭curl
curl_close($ch);
报这个错误{“errcode”:85005,“errmsg”:“appid not bind weapp hint: [H3q90a0919vr26]”}