php图文消息带代码详细注释,微信发送图文消息代码整理
生活随笔
收集整理的這篇文章主要介紹了
php图文消息带代码详细注释,微信发送图文消息代码整理
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
微信發送圖文消息代碼整理
這個就不多說什么了, 下單成功后微信提示圖文消息.核心代碼如下
if(!empty($openid)){
$wxinfo=curlgetcontents(“https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid={$appid}&secret={$secret}”);
$wxinfo= json_decode($wxinfo);
$data='{
“touser”:”‘.$openid.'”,
“msgtype”:”news”,
“news”:{
“articles”: [
{
“title”:”訂單完成”,
“description”:”‘.$contentStr.'”,
“url”:””
}
]
}
}’;
curlgetcontents(‘https://api.weixin.qq.com/cgi-bin/message/custom/send?access_token=’.$wxinfo->access_token,$data);
}
標簽:PHP
《新程序員》:云原生和全面數字化實踐50位技術專家共同創作,文字、視頻、音頻交互閱讀總結
以上是生活随笔為你收集整理的php图文消息带代码详细注释,微信发送图文消息代码整理的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: mysql jdbc路径,mysql转存
- 下一篇: binlog2mysql,MySQL 数