助力高校计算机教育 —— 码云为老师推出免费高校版,高达 200 人的协作团队
Watch Star Fork

mjxjn / WEIXIN_SENDPHP

Sign up for free
Explore and code with more than 2 million developers,Free private repositories !:)
Sign up
最新可用的,微信模拟登录用户消息群发,获取用户fakeid,获取微信分组,获取消息记录等功能
mjxjn authored 修改
Cancel
Notice: Creating folder will generate an empty file .keep, because not support in Git
Loading...
README.md 1.11 KB

WEIXIN_SEND

使用:

  1. 先在conifg.php中配置公共账号信息:
	$G_CONFIG["weiXin"] = array(
		'account' => '微信公告帐号',
		'password' => '微信密码',
		'cookiePath' => $G_ROOT. '/cache/cookie', // cookie缓存文件路径
		'webTokenPath' => $G_ROOT. '/cache/webToken', // webToken缓存文件路径
	);
  1. test.php:
	require "config.php";
	require "include/WeiXin.php";

	$weiXin = new WeiXin($G_CONFIG['weiXin']);
	
	$testFakeId = "30566715"; //用户1的fakeid
	$testFakeId2 = "2593741120";//用户2的fakeid
	
	// 发送消息
	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());

	// 得到用户fakeid
	print_r($weiXin->getFakeid(100)); //分页量

	// 得到用户分组信息
	print_r($weiXin->getGroups());

Comments ( 0 )

You need to Sign in for post a comment

10_float_left_people 10_float_left_close