Update Wechat supported

Update Wechat supported
This commit is contained in:
Denny Dai
2015-10-31 20:33:17 +08:00
parent f3d1d90b43
commit 4fdd1535c9
4 changed files with 62 additions and 25 deletions
+14
View File
@@ -0,0 +1,14 @@
<?php
$BOT = new Base;
$GET = $raw = file_get_contents("php://input");
//reply to...
preg_match('/<ToUserName><!\[CDATA\[(.*)\]\]><\/ToUserName>/', $raw, $FromUserName);
$FromUserName = $FromUserName[1];
preg_match('/<FromUserName><!\[CDATA\[(.*)\]\]><\/FromUserName>/', $raw, $ToUserName);
$ToUserName = $ToUserName[1];
preg_match('/<Content><!\[CDATA\[(.*)\]\]><\/Content>/', $raw, $Content);
$Content = $Content[1];
$from = $ToUserName;
$text = $Content;