Browse Source

update with 微信公众平台

we only use the function of sending  text  information, fix it only for
the moment.
童中波 11 years ago
parent
commit
dfb3bf3d78
2 changed files with 2 additions and 2 deletions
  1. 1 1
      Thinkphp/Wechatext.class.php
  2. 1 1
      wechatext.class.php

+ 1 - 1
Thinkphp/Wechatext.class.php

@@ -64,7 +64,7 @@ class Wechatext
 		$post['token'] = $this->_token;
 		$post['content'] = $content;
 		$post['ajax'] = 1;
-        $send_snoopy->referer = "http://mp.weixin.qq.com/cgi-bin/singlemsgpage?fromfakeid={$id}&msgid=&source=&count=20&t=wxm-singlechat&lang=zh_CN";
+        $send_snoopy->referer = "https://mp.weixin.qq.com/cgi-bin/singlesendpage?t=message/send&action=index&tofakeid=$id&token={$this->_token}&lang=zh_CN";
 		$send_snoopy->rawheaders['Cookie']= $this->cookie;
 		$submit = "http://mp.weixin.qq.com/cgi-bin/singlesend?t=ajax-response";
 		$send_snoopy->submit($submit,$post);

+ 1 - 1
wechatext.class.php

@@ -65,7 +65,7 @@ class Wechatext
 		$post['token'] = $this->_token;
 		$post['content'] = $content;
 		$post['ajax'] = 1;
-        $send_snoopy->referer = "https://mp.weixin.qq.com/cgi-bin/singlemsgpage?fromfakeid={$id}&msgid=&source=&count=20&t=wxm-singlechat&lang=zh_CN";
+        $send_snoopy->referer = "https://mp.weixin.qq.com/cgi-bin/singlesendpage?t=message/send&action=index&tofakeid=$id&token={$this->_token}&lang=zh_CN";
 		$send_snoopy->rawheaders['Cookie']= $this->cookie;
 		$submit = "https://mp.weixin.qq.com/cgi-bin/singlesend?t=ajax-response";
 		$send_snoopy->submit($submit,$post);