whatsapp PHP API - 无法接收消息 - 接收编码消息

时间:2015-12-15 14:11:27

标签: whatsapi

我正在使用whatsapp api函数 用于向过去3个月的近亲客户发送和接收消息 。它的工作时间可以追溯到2015年12月4日至2015年12月。从第5起起i 我无法向他人发送和接收消息,所以我下载了 来自github的最新版本的api文件 (https://github.com/WHAnonymous/Chat-API)并添加到我的主机。后 我能够向他人发送信息,但我无法接受按摩 来自其他人。请帮助我从别人那里得到消息。我有 附上我的编码和结果

 $username='91735xxxxxx';
 $identity='xxxxxxxxxxxxxxxxxxxxxxxx';
 $nickname='prathis';
 $debug=false;
 $password='xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx';

 function onMessage($mynumber, $from, $id, $type, $time, $name, $body)
 {
 echo "Message from $name:\n$body\n\n";
 }

 $w = new WhatsProt($userPhone, $userIdentity, $userName, false);

 $events = new MyEvents($w);

 $w->eventManager()->bind("onGetMessage", "onMessage");

 $w->eventManager()->bind("onGetImage", "Onmedia");


 $w->Connect();
 $w->loginWithPassword($password);
 for($i = 0; $i < 10; $i++)
 {
 $w->pollMessage();
 }

我的结果如下

tx  <stream:features>
tx    <readreceipts></readreceipts>
tx    <groups_v2></groups_v2>
tx    <privacy></privacy>
tx    <presence></presence>
tx  </stream:features>

tx  <auth mechanism="WAUTH-2" user="917358559232">Àˆ   Ý917358559232_åðñüu+V‹jÉ›H:TÆD)à1450186878</auth>

rx  <start from="s.whatsapp.net"></start>

rx  <stream:features></stream:features>

rx  <challenge>âCê¦Ìù²àMf ¿7K㊑½@</challenge>

tx  <response>Л×Ðî_’é@@k•¸¡­H¼tú𬧈*½0l·¯œC§J</response>

rx  <success t="1450186880" props="4" kind="free" status="active"  creation="1436001708" expiration="1467537708">}eäl¾{d`S€ÆdœpÐ </success>

 tx  <presence name="f90xj0A5.0CF5A3169CBA5DE4329BFB1E9"></presence>

 rx  <message from="919659878706@s.whatsapp.net" type="text" id="75C870981298EBAE290" offline="3" t="1450186328" notify="A....s.....p">
 rx    <enc v="1" type="msg">3 !«ÎTÒÐ{üÕ¸-¿Ï½Mƒä‚Z.yÈÂ~•x6Æ"ǵ±#r°×üëi^¨¦BSA<</enc>
 rx  </message>

  rx  <message from="919659878706@s.whatsapp.net" type="text"   id="75C870981298EBAE291" offline="1" t="1450186831" notify="A....s.....p">
  rx    <enc v="1" type="msg">3 !«ÎTÒÐ{üÕ¸-¿Ï½Mƒä‚Z.yÈÂ~•x6Æ"©¤wah‚Â2¦kÑjCðŠKWÅz{</enc>
 rx  </message>

 rx  <ib from="s.whatsapp.net">
 rx    <offline count="2"></offline>
 rx  </ib>

 rx  <presence from="917358559232@s.whatsapp.net"></presence>

 rx  <presence from="919659878706@s.whatsapp.net"></presence>

2 个答案:

答案 0 :(得分:1)

WhatsApp现在支持端到端加密,因此您需要安装protobuf和curve25519

看看这里: https://github.com/mgp25/Chat-API/wiki/Dependencies

答案 1 :(得分:0)

此库的状态为:支持结束。您必须修复doLogin函数问题,然后再次使用此库。如果你这样做,请告诉我,因为我有同样的问题。

相关问题