1 Star 0 Fork 1

健宇87/JyWeChat

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
sendgroup.php 1.04 KB
一键复制 编辑 原始数据 按行查看 历史
健宇87 提交于 2018-08-27 11:40 . no commit message
<?php
require_once('class/mysql.class.php');
$db = new class_mysql();
require_once('class/weixin.class.php');
$weixin = new class_weixin();
$mysql_state = "SELECT `id`,`openid`,`heartbeat` FROM `tp_user` WHERE `heartbeat` > ". (time() - 172800);
$result = $db->query($mysql_state);
$content = array();
$content[] = array("Title"=>"多图文1标题", "Description"=>"", "PicUrl"=>"http://discuz.comli.com/weixin/weather/icon/cartoon.jpg", "Url" =>"http://m.cnblogs.com/?u=txw1958");
$content[] = array("Title"=>"多图文2标题", "Description"=>"", "PicUrl"=>"http://d.hiphotos.bdimg.com/wisegame/pic/item/f3529822720e0cf3ac9f1ada0846f21fbe09aaa3.jpg", "Url" =>"http://m.cnblogs.com/?u=txw1958");
$content[] = array("Title"=>"多图文3标题", "Description"=>"", "PicUrl"=>"http://g.hiphotos.bdimg.com/wisegame/pic/item/18cb0a46f21fbe090d338acc6a600c338644adfd.jpg", "Url" =>"http://m.cnblogs.com/?u=txw1958");
for($j = 0; $j < count($result); $j++)
{
$openid = $result[$j]["openid"];
$result = $weixin->send_custom_message($openid, "news", $content);
}
?>
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
PHP
1
https://gitee.com/jianyu/JyWeChat.git
[email protected]:jianyu/JyWeChat.git
jianyu
JyWeChat
JyWeChat
master

搜索帮助