Merge branch 'master' of https://github.com/shirioko/WhatsAPI
Merge branch 'master' of https://github.com/shirioko/WhatsAPI

--- a/src/php/whatsprot.class.php
+++ b/src/php/whatsprot.class.php
@@ -1427,6 +1427,13 @@
 
                     $mcc = explode("|", $data[2]);
                     $mcc = $mcc[0];
+
+                    //hook:
+                    //fix country code for North America
+                    if(substr($data[1], 0, 1) == "1")
+                    {
+                        $data[1] = "1";
+                    }
 
                     $phone = array(
                         'country' => $data[0],

--- a/tests/whatsapp.php
+++ b/tests/whatsapp.php
@@ -40,15 +40,15 @@
 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);
         }
@@ -82,8 +82,8 @@
 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);
     }