Permalink
Browse files

Update whatsapp.php.

  • Loading branch information...
1 parent 6cc039f commit 25604109334486bd2e43fe07a1237dba47fea199 @facine facine committed Feb 18, 2013
Showing with 1 addition and 11 deletions.
  1. +1 −11 tests/whatsapp.php
View
@@ -19,9 +19,6 @@ function fgets_u($pStdn)
$sender = ""; // Mobile number with country code (but without + or 00)
$imei = ""; // MAC Address for iOS IMEI for other platform (Android/etc)
-$countrycode = substr($sender, 0, 2);
-$phonenumber=substr($sender, 2);
-
if ($argc < 2) {
echo "USAGE: ".$_SERVER['argv'][0]." [-l] [-s <phone> <message>] [-i <phone>] [-set <status>]\n";
echo "\tphone: full number including country code, without '+' or '00'\n";
@@ -39,14 +36,7 @@ function fgets_u($pStdn)
}
echo "[] Logging in as '$nickname' ($sender)\n";
-$wa = new WhatsProt($sender, $imei, $nickname, true);
-
-$url = "https://r.whatsapp.net/v1/exist.php?cc=".$countrycode."&in=".$phonenumber."&udid=".$wa->encryptPassword();
-$content = file_get_contents($url);
-if (stristr($content,'status="ok"') === false) {
- echo "Wrong Password\n";
- exit(0);
-}
+$wa = new WhatsProt($sender, $imei, $nickname, TRUE);
$wa->Connect();
$wa->Login();

0 comments on commit 2560410

Please sign in to comment.