Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/lealife/WeiXin-Private-API
[注意: 该项目已不再维护, 只作参考!!] 微信公众平台私有接口, 发送信息, 得到用户信息, 解析用户fakeId
https://github.com/lealife/WeiXin-Private-API
Last synced: 13 days ago
JSON representation
[注意: 该项目已不再维护, 只作参考!!] 微信公众平台私有接口, 发送信息, 得到用户信息, 解析用户fakeId
- Host: GitHub
- URL: https://github.com/lealife/WeiXin-Private-API
- Owner: lealife
- Archived: true
- Created: 2013-07-26T12:37:14.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2015-09-17T04:45:41.000Z (about 9 years ago)
- Last Synced: 2024-08-01T16:44:09.237Z (3 months ago)
- Language: PHP
- Homepage:
- Size: 279 KB
- Stars: 113
- Watchers: 27
- Forks: 63
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
WeiXin-Private-API
==================-----------------------------------------------------------------------------------------------------------------
**注意** 该项目已不再维护, 只作为参考!! 有问题请不要联系本人.
-----------------------------------------------------------------------------------------------------------------
微信公众平台私有接口, 发送信息, 发送图片, 得到用户信息, 解析用户fakeId
本接口参考[weChat](https://github.com/zscorpio/weChat), 在此基础上作了修改和完善.
使用:
先在conifg.php中配置公众账号信息:
```php
$G_CONFIG["weiXin"] = array(
'account' => '公众平台账号',
'password' => '密码',
'cookiePath' => $G_ROOT. '/cache/cookie', // cookie缓存文件路径
'webTokenPath' => $G_ROOT. '/cache/webToken', // webToken缓存文件路径
);
```test.php:
```php
require "config.php";
require "include/WeiXin.php";$weiXin = new WeiXin($G_CONFIG['weiXin']);
$testFakeId = "1477341522";
$testFakeId2 = "2158620204";
// 发送消息
print_r($weiXin->send($testFakeId, "test"));
// 发送图片, 图片必须要先在公共平台中上传, 得到图片Id
print_r($weiXin->sendImage($testFakeId, "10000001"));
// 批量发送
print_r($weiXin->batSend(array($testFakeId, $testFakeId2), "test batSend"));
// 得到用户信息
print_r($weiXin->getUserInfo($testFakeId));
// 得到最新消息
print_r($weiXin->getLatestMsgs());
```