Comments (10)
I have the same Problem in the PHP Version with my Login. After 30 Seconds the limit is exceeded. Also removing UTF-8 from the auth function is not working.
from whatsapi.
so any log whats happening in background, I use android version of whatsapp when register.
I see login is successfull, but after it cause long delay,
352308622 -> account_info
account_info
Array(
[status] => active
[kind] => free
[creation] => 1305220622
[expiration] => 1352308622
)
after sending this command : end next ?t??a?
Ahmed Mohd?HC?:??{?M??Ua$HC?2?:??????
and long delay is wait for read sock command.
how about you ?
from whatsapi.
The issue is that the login code as is had areas with 2 reads in a row, they are just blindly reading from the socket, but there might not be any data on that socket (for example all of the data may have been read on the first read), and when that happens the socket blocks. I agree this area should be improved.
from whatsapi.
thanks cdesjardins , I see this last command cause long delay
$next = "\x00\x12\xf8\x05\x74\xa2\xa3\x61\xfc\x0a\x41\x68\x6d\x65\x64\x20\x4d\x6f\x68\x64\x00\x15\xf8\x06\x48\x43\x05\xa2\x3a\xf8\x01\xf8\x04\x7b\xbd\x4d\xf8\x01\xf8\x03\x55\x61\x24\x00\x12\xf8\x08\x48\x43\xfc\x01\x32\xa2\x3a\xa0\x8a\xf8\x01\xf8\x03\x1f\xbd\xb1";
$stream = $this->send($next);
$this->read(); // LONG DELAY is this Command
I dont know what is that command in hex used to ? any idea ?
from whatsapi.
dear cdesjardins, I see now your explanation, there is 2 read in a row means, when I remove one, looks like delay gone.
When I remove thoose line, so last line in Login() method is :$rBuffer =$this->read();
but when I send msg $wa->Message(time()."-1","62214421XXXX","test message");
I got
�t8��+���
]8���Server�C�15567���
1345005817�������New version of WhatsApp Messenger is now available. Please visit http://www.whatsapp.com/appstore/ and upgrade to the latest version. Your upgrade will be free and will bring bug fixes and new features such as Group Icons!
at first read, I dont know, I tought its Android, why is appstore ?
from whatsapi.
The reason it redirects you to the app store is because the php code logs in to WhatsApp as an iPhone-2.6.9. Furthermore be aware that just removing one of those reads might not always work either. This area of the code is not really well done... Typically this type of thing is done with a "read" thread that pulls data off the wire and queues it locally for the main thread to manipulate. In this case you would want to check the local queue for the expected responses, and if they do not arrive after some short but reasonable timeout then an error should be produced... But of course that is a big pain in the neck...
from whatsapi.
ok I see when "read" thread that pulls data (wait so long), I send message to that whatsapp account, they indeed receive data and print it as "message", which means receive message working. but I dont know how send work, I ve changed the
iPhone-2.6.9 to Android-2.34-5222 which has the same length string,
I see this code messed up, maybe I want to port it to java socket programming, maybe if I have time.
from whatsapi.
You can change iPhone-2.6.9-5222 to iPhone-2.8.2-5222.
from whatsapi.
finally, this solution from dsfgdsfg fix long delay at login. but still send message fail, I will find out why
--- >
Well I would agree with you if I would not get the account_info message with [status] => active and [kind] => free.
Here is my code which replaces lines 204-206 in whatsapp.v2.php:
$authData=base64_encode($ResData);
$authLen=strlen($authData);
$wholeLen=$authLen+9;
$wholeLen=chr($wholeLen>>8).chr($wholeLen&0xff);
$authLen=chr($authLen>>8).chr($authLen&0xff);
$Response = $wholeLen."\xf8\x04\x86\xbd\xa7\xfd\x00".$authLen.$authData;
$this->send($Response);
from whatsapi.
hi, looks like long login delay is fixed, see my other comment. but still cant send message, read can receive message.
I closed this issue, message me if there is person also has this issue.
from whatsapi.
Related Issues (20)
- Problem Login LoginWithPassword HOT 4
- Bad token HOT 1
- Bots
- Fatal error: Maximum execution time of 30 seconds exceeded in /opt/lampp/htdocs/whatsapp/whatsapi/src/whatsprot.class.php on line 306 HOT 3
- Can anyone edit GB WhatsApp source code in such a way that it also shows toast when someone sees your profile picture or profile, like it shows toast when someone sees your story
- WART 1.8.2.2 HOT 6
- is there a python script that can filter whatsapp numbers only
- Problem Login LoginWithPassword in WhatsAPI
- Help HOT 3
- How did it go for venomous0x? HOT 3
- مهم
- e6cf5a59474a624086d4f966ded240ecb73bc2ad
- What's
- Get banned HOT 1
- WhatsApp and Voice Call API and Automation HOT 1
- +628988155422 HOT 1
- Howdy Modi
- G
- b
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from whatsapi.