Skip to content

Commit

Permalink
Minor syntax fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
shirioko committed Aug 27, 2013
1 parent 5e9b458 commit 9e00d11
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions tests/whatsapp.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,15 @@ function fgets_u($pStdn)
echo "[] Logging in as '$nickname' ($sender)\n";
$wa = new WhatsProt($sender, $imei, $nickname, TRUE);

$wa->Connect();
$wa->LoginWithPassword($password);
$wa->connect();
$wa->loginWithPassword($password);

if ($_SERVER['argv'][1] == "-i") {
echo "\n[] Interactive conversation with $dst:\n";
stream_set_timeout(STDIN,1);
while (TRUE) {
$wa->PollMessages();
$buff = $wa->GetMessages();
$wa->pollMessages();
$buff = $wa->getMessages();
if (!empty($buff)) {
print_r($buff);
}
Expand Down Expand Up @@ -82,8 +82,8 @@ function fgets_u($pStdn)
if ($_SERVER['argv'][1] == "-l") {
echo "\n[] Listen mode:\n";
while (TRUE) {
$wa->PollMessages();
$data = $wa->GetMessages();
$wa->pollMessages();
$data = $wa->getMessages();
if(!empty($data)) print_r($data);
sleep(1);
}
Expand Down

0 comments on commit 9e00d11

Please sign in to comment.