微信公众平台PHP-SDK

时间:2016-12-10 07:44:06
【文件属性】:
文件名称:微信公众平台PHP-SDK
文件大小:22KB
文件格式:RAR
更新时间:2016-12-10 07:44:06
微信 群发 Wechatext为非官方微信发送API * 注: 用户id为通过getMsg()方法获取的FakeId值 * 主要实现如下功能: * send($id,$content) 向某用户id发送微信文字信息 * getUserList($page,$pagesize,$group) 获取用户信息 * getGroupList($page,$pagesize) 获取群组信息 * sendNews($id,$msgid) 发送图文消息 * getNewsList($page,$pagesize) 获取图文信息列表 * uploadFile($filepath,$type) 上传附件,包括图片/音频/视频 * addPreview($title,$author,$summary,$content,$photoid,$srcurl='') 创建新的图文信息 * getFileList($type,$page,$pagesize) 获取素材库文件列表 * sendImage($id,$fid) 发送图片消息 * sendAudio($id,$fid) 发送音频消息 * sendVideo($id,$fid) 发送视频消息 * getInfo($id) 根据id获取用户资料 * getNewMsgNum($lastid) 获取从$lastid算起新消息的数目 * getTopMsg() 获取最新一条消息的数据, 此方法获取的消息id可以作为检测新消息的$lastid依据 * getMsg($lastid,$offset=0,$perpage=50,$day=0,$today=0,$star=0) 获取最新的消息列表, 列表将返回消息id, 用户id, 消息类型, 文字消息等参数 * 消息返回结构: {"id":"消息id","type":"类型号(1为文字,2为图片,3为语音)","fileId":"0","hasReply":"0","fakeId":"用户uid","nickName":"昵称","dateTime":"时间戳","content":"文字内容"} * getMsgImage($msgid,$mode='large') 若消息type类型为2, 调用此方法获取图片数据 * getMsgVoice($msgid) 若消息type类型为3, 调用此方法获取语音数据
【文件预览】:
wechat
----wechat.class.php(23KB)
----snoopy.class.php(37KB)
----test()
--------test3.php(2KB)
--------test2.php(2KB)
--------test1.php(642B)
----wechat.js(3KB)
----wechatext.class.php(22KB)

网友评论

  • 这个可以用的。
  • 不错。。好用的api
  • 可以用,不过我I自己早做了一个,这个是参考参考
  • wechatauth.class.php这个问题没有啊 我都下了两遍了哦 哈哈 楼主帮忙传给我行吗 542260046@qq.com
  • 很好用呀,公共类
  • 公共类,可以使用.