From 4c12950ec88dfbc17bc648078e1da61c2f23ab91 Mon Sep 17 00:00:00 2001 From: Stefan Smorra Date: Sat, 4 Oct 2014 14:58:39 +0200 Subject: [PATCH 001/436] fixed token no. 4 (ack) --- src/protocol.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/protocol.class.php b/src/protocol.class.php index ed352483..d4852111 100755 --- a/src/protocol.class.php +++ b/src/protocol.class.php @@ -318,7 +318,7 @@ protected function readString($token) if ($token == -1) { throw new Exception("BinTreeNodeReader->readString: Invalid token $token"); } - if (($token > 4) && ($token < 0xf5)) { + if (($token >= 4) && ($token < 0xf5)) { $ret = $this->getToken($token); } elseif ($token == 0) { $ret = ""; From 2c2c464723bedbcfa10eadf1a2cdaed35d9d8954 Mon Sep 17 00:00:00 2001 From: CODeRUS Date: Mon, 6 Oct 2014 13:56:53 +0600 Subject: [PATCH 002/436] fixed readString --- src/protocol.class.php | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/protocol.class.php b/src/protocol.class.php index d4852111..67a717f0 100755 --- a/src/protocol.class.php +++ b/src/protocol.class.php @@ -318,7 +318,7 @@ protected function readString($token) if ($token == -1) { throw new Exception("BinTreeNodeReader->readString: Invalid token $token"); } - if (($token >= 4) && ($token < 0xf5)) { + if (($token > 2) && ($token < 0xf5)) { $ret = $this->getToken($token); } elseif ($token == 0) { $ret = ""; @@ -328,9 +328,6 @@ protected function readString($token) } elseif ($token == 0xfd) { $size = $this->readInt24(); $ret = $this->fillArray($size); - } elseif ($token == 0xfe) { - $token = $this->readInt8(); - $ret = $this->getToken($token + 0xf5); } elseif ($token == 0xfa) { $user = $this->readString($this->readInt8()); $server = $this->readString($this->readInt8()); From 1ad16997c8e857f12f68bd55504be0a3ce7cf6fa Mon Sep 17 00:00:00 2001 From: Amirjan Date: Mon, 6 Oct 2014 13:01:35 +0330 Subject: [PATCH 003/436] Update func.php Duplicate array --- src/func.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/func.php b/src/func.php index f62c346b..60b70dcf 100755 --- a/src/func.php +++ b/src/func.php @@ -164,7 +164,7 @@ function videoThumbnail() //Generate Array of Emojis iOS2, iOS5 and iOS7 function ArrayEmojis(){ - return array(array('iOS2' => '','iOS5' => '๐Ÿ˜„','iOS7' => '','Hex' => '1F604'), array('iOS2' => '','iOS5' => '๐Ÿ˜ƒ','iOS7' => '','Hex' => '1F603'), array('iOS2' => '','iOS5' => '๐Ÿ˜€','iOS7' => '','Hex' => '1F600'), array('iOS2' => '','iOS5' => '๐Ÿ˜Š','iOS7' => '','Hex' => '1F60A'), array('iOS2' => '','iOS5' => 'โ˜บ','iOS7' => 'โ˜บ๏ธ','Hex' => '263A'), array('iOS2' => '','iOS5' => '๐Ÿ˜‰','iOS7' => '','Hex' => '1F609'), array('iOS2' => '','iOS5' => '๐Ÿ˜','iOS7' => '','Hex' => '1F60D'), array('iOS2' => '','iOS5' => '๐Ÿ˜˜','iOS7' => '','Hex' => '1F618'), array('iOS2' => '','iOS5' => '๐Ÿ˜š','iOS7' => '','Hex' => '1F61A'), array('iOS2' => '','iOS5' => '๐Ÿ˜—','iOS7' => '','Hex' => '1F617'), array('iOS2' => '','iOS5' => '๐Ÿ˜™','iOS7' => '','Hex' => '1F619'), array('iOS2' => '','iOS5' => '๐Ÿ˜œ','iOS7' => '','Hex' => '1F61C'), array('iOS2' => '','iOS5' => '๐Ÿ˜','iOS7' => '','Hex' => '1F61D'), array('iOS2' => '','iOS5' => '๐Ÿ˜›','iOS7' => '','Hex' => '1F61B'), array('iOS2' => '','iOS5' => '๐Ÿ˜ณ','iOS7' => '','Hex' => '1F633'), array('iOS2' => '','iOS5' => '๐Ÿ˜','iOS7' => '','Hex' => '1F601'), array('iOS2' => '','iOS5' => '๐Ÿ˜”','iOS7' => '','Hex' => '1F614'), array('iOS2' => '','iOS5' => '๐Ÿ˜Œ','iOS7' => '','Hex' => '1F60C'), array('iOS2' => '','iOS5' => '๐Ÿ˜’','iOS7' => '','Hex' => '1F612'), array('iOS2' => '','iOS5' => '๐Ÿ˜ž','iOS7' => '','Hex' => '1F61E'), array('iOS2' => '','iOS5' => '๐Ÿ˜ฃ','iOS7' => '','Hex' => '1F623'), array('iOS2' => '','iOS5' => '๐Ÿ˜ข','iOS7' => '','Hex' => '1F622'), array('iOS2' => '','iOS5' => '๐Ÿ˜‚','iOS7' => '','Hex' => '1F602'), array('iOS2' => '','iOS5' => '๐Ÿ˜ญ','iOS7' => '','Hex' => '1F62D'), array('iOS2' => '','iOS5' => '๐Ÿ˜ช','iOS7' => '','Hex' => '1F62A'), array('iOS2' => '','iOS5' => '๐Ÿ˜ฅ','iOS7' => '','Hex' => '1F625'), array('iOS2' => '','iOS5' => '๐Ÿ˜ฐ','iOS7' => '','Hex' => '1F630'), array('iOS2' => '','iOS5' => '๐Ÿ˜…','iOS7' => '','Hex' => '1F605'), array('iOS2' => '','iOS5' => '๐Ÿ˜“','iOS7' => '','Hex' => '1F613'), array('iOS2' => '','iOS5' => '๐Ÿ˜ฉ','iOS7' => '','Hex' => '1F629'), array('iOS2' => '','iOS5' => '๐Ÿ˜ซ','iOS7' => '','Hex' => '1F62B'), array('iOS2' => '','iOS5' => '๐Ÿ˜จ','iOS7' => '','Hex' => '1F628'), array('iOS2' => '','iOS5' => '๐Ÿ˜ฑ','iOS7' => '','Hex' => '1F631'), array('iOS2' => '','iOS5' => '๐Ÿ˜ ','iOS7' => '','Hex' => '1F620'), array('iOS2' => '','iOS5' => '๐Ÿ˜ก','iOS7' => '','Hex' => '1F621'), array('iOS2' => '','iOS5' => '๐Ÿ˜ค','iOS7' => '','Hex' => '1F624'), array('iOS2' => '','iOS5' => '๐Ÿ˜–','iOS7' => '','Hex' => '1F616'), array('iOS2' => '','iOS5' => '๐Ÿ˜†','iOS7' => '','Hex' => '1F606'), array('iOS2' => '','iOS5' => '๐Ÿ˜‹','iOS7' => '','Hex' => '1F60B'), array('iOS2' => '','iOS5' => '๐Ÿ˜ท','iOS7' => '','Hex' => '1F637'), array('iOS2' => '','iOS5' => '๐Ÿ˜Ž','iOS7' => '','Hex' => '1F60E'), array('iOS2' => '','iOS5' => '๐Ÿ˜ด','iOS7' => '','Hex' => '1F634'), array('iOS2' => '','iOS5' => '๐Ÿ˜ต','iOS7' => '','Hex' => '1F635'), array('iOS2' => '','iOS5' => '๐Ÿ˜ฒ','iOS7' => '','Hex' => '1F632'), array('iOS2' => '','iOS5' => '๐Ÿ˜Ÿ','iOS7' => '','Hex' => '1F61F'), array('iOS2' => '','iOS5' => '๐Ÿ˜ฆ','iOS7' => '','Hex' => '1F626'), array('iOS2' => '','iOS5' => '๐Ÿ˜ง','iOS7' => '','Hex' => '1F627'), array('iOS2' => '','iOS5' => '๐Ÿ˜ˆ','iOS7' => '','Hex' => '1F608'), array('iOS2' => '','iOS5' => '๐Ÿ‘ฟ','iOS7' => '','Hex' => '1F47F'), array('iOS2' => '','iOS5' => '๐Ÿ˜ฎ','iOS7' => '','Hex' => '1F62E'), array('iOS2' => '','iOS5' => '๐Ÿ˜ฌ','iOS7' => '','Hex' => '1F62C'), array('iOS2' => '','iOS5' => '๐Ÿ˜','iOS7' => '','Hex' => '1F610'), array('iOS2' => '','iOS5' => '๐Ÿ˜•','iOS7' => '','Hex' => '1F615'), array('iOS2' => '','iOS5' => '๐Ÿ˜ฏ','iOS7' => '','Hex' => '1F62F'), array('iOS2' => '','iOS5' => '๐Ÿ˜ถ','iOS7' => '','Hex' => '1F636'), array('iOS2' => '','iOS5' => '๐Ÿ˜‡','iOS7' => '','Hex' => '1F607'), array('iOS2' => '','iOS5' => '๐Ÿ˜','iOS7' => '','Hex' => '1F60F'), array('iOS2' => '','iOS5' => '๐Ÿ˜‘','iOS7' => '','Hex' => '1F611'), array('iOS2' => '','iOS5' => '๐Ÿ‘ฒ','iOS7' => '','Hex' => '1F472'), array('iOS2' => '','iOS5' => '๐Ÿ‘ณ','iOS7' => '','Hex' => '1F473'), array('iOS2' => '','iOS5' => '๐Ÿ‘ฎ','iOS7' => '','Hex' => '1F46E'), array('iOS2' => '','iOS5' => '๐Ÿ‘ท','iOS7' => '','Hex' => '1F477'), array('iOS2' => '','iOS5' => '๐Ÿ’‚','iOS7' => '','Hex' => '1F482'), array('iOS2' => '','iOS5' => '๐Ÿ‘ถ','iOS7' => '','Hex' => '1F476'), array('iOS2' => '','iOS5' => '๐Ÿ‘ฆ','iOS7' => '','Hex' => '1F466'), array('iOS2' => '','iOS5' => '๐Ÿ‘ง','iOS7' => '','Hex' => '1F467'), array('iOS2' => '','iOS5' => '๐Ÿ‘จ','iOS7' => '','Hex' => '1F468'), array('iOS2' => '','iOS5' => '๐Ÿ‘ฉ','iOS7' => '','Hex' => '1F469'), array('iOS2' => '','iOS5' => '๐Ÿ‘ด','iOS7' => '','Hex' => '1F474'), array('iOS2' => '','iOS5' => '๐Ÿ‘ต','iOS7' => '','Hex' => '1F475'), array('iOS2' => '','iOS5' => '๐Ÿ‘ฑ','iOS7' => '','Hex' => '1F471'), array('iOS2' => '','iOS5' => '๐Ÿ‘ผ','iOS7' => '','Hex' => '1F47C'), array('iOS2' => '','iOS5' => '๐Ÿ‘ธ','iOS7' => '','Hex' => '1F478'), array('iOS2' => '','iOS5' => '๐Ÿ˜บ','iOS7' => '','Hex' => '1F63A'), array('iOS2' => '','iOS5' => '๐Ÿ˜ธ','iOS7' => '','Hex' => '1F638'), array('iOS2' => '','iOS5' => '๐Ÿ˜ป','iOS7' => '','Hex' => '1F63B'), array('iOS2' => '','iOS5' => '๐Ÿ˜ฝ','iOS7' => '','Hex' => '1F63D'), array('iOS2' => '','iOS5' => '๐Ÿ˜ผ','iOS7' => '','Hex' => '1F63C'), array('iOS2' => '','iOS5' => '๐Ÿ™€','iOS7' => '','Hex' => '1F640'), array('iOS2' => '','iOS5' => '๐Ÿ˜ฟ','iOS7' => '','Hex' => '1F63F'), array('iOS2' => '','iOS5' => '๐Ÿ˜น','iOS7' => '','Hex' => '1F639'), array('iOS2' => '','iOS5' => '๐Ÿ˜พ','iOS7' => '','Hex' => '1F63E'), array('iOS2' => '','iOS5' => '๐Ÿ‘น','iOS7' => '','Hex' => '1F479'), array('iOS2' => '','iOS5' => '๐Ÿ‘บ','iOS7' => '','Hex' => '1F47A'), array('iOS2' => '','iOS5' => '๐Ÿ™ˆ','iOS7' => '','Hex' => '1F648'), array('iOS2' => '','iOS5' => '๐Ÿ™‰','iOS7' => '','Hex' => '1F649'), array('iOS2' => '','iOS5' => '๐Ÿ™Š','iOS7' => '','Hex' => '1F64A'), array('iOS2' => '','iOS5' => '๐Ÿ’€','iOS7' => '','Hex' => '1F480'), array('iOS2' => '','iOS5' => '๐Ÿ‘ฝ','iOS7' => '','Hex' => '1F47D'), array('iOS2' => '','iOS5' => '๐Ÿ’ฉ','iOS7' => '','Hex' => '1F4A9'), array('iOS2' => '','iOS5' => '๐Ÿ”ฅ','iOS7' => '','Hex' => '1F525'), array('iOS2' => '','iOS5' => 'โœจ','iOS7' => '','Hex' => '2728'), array('iOS2' => '','iOS5' => '๐ŸŒŸ','iOS7' => '','Hex' => '1F31F'), array('iOS2' => '','iOS5' => '๐Ÿ’ซ','iOS7' => '','Hex' => '1F4AB'), array('iOS2' => '','iOS5' => '๐Ÿ’ฅ','iOS7' => '','Hex' => '1F4A5'), array('iOS2' => '','iOS5' => '๐Ÿ’ข','iOS7' => '','Hex' => '1F4A2'), array('iOS2' => '','iOS5' => '๐Ÿ’ฆ','iOS7' => '','Hex' => '1F4A6'), array('iOS2' => '','iOS5' => '๐Ÿ’ง','iOS7' => '','Hex' => '1F4A7'), array('iOS2' => '','iOS5' => '๐Ÿ’ค','iOS7' => '','Hex' => '1F4A4'), array('iOS2' => '','iOS5' => '๐Ÿ’จ','iOS7' => '','Hex' => '1F4A8'), array('iOS2' => '','iOS5' => '๐Ÿ‘‚','iOS7' => '','Hex' => '1F442'), array('iOS2' => '','iOS5' => '๐Ÿ‘€','iOS7' => '','Hex' => '1F440'), array('iOS2' => '','iOS5' => '๐Ÿ‘ƒ','iOS7' => '','Hex' => '1F443'), array('iOS2' => '','iOS5' => '๐Ÿ‘…','iOS7' => '','Hex' => '1F445'), array('iOS2' => '','iOS5' => '๐Ÿ‘„','iOS7' => '','Hex' => '1F444'), array('iOS2' => '','iOS5' => '๐Ÿ‘','iOS7' => '','Hex' => '1F44D'), array('iOS2' => '','iOS5' => '๐Ÿ‘Ž','iOS7' => '','Hex' => '1F44E'), array('iOS2' => '','iOS5' => '๐Ÿ‘Œ','iOS7' => '','Hex' => '1F44C'), array('iOS2' => '','iOS5' => '๐Ÿ‘Š','iOS7' => '','Hex' => '1F44A'), array('iOS2' => '','iOS5' => 'โœŠ','iOS7' => '','Hex' => '270A'), array('iOS2' => '','iOS5' => 'โœŒ','iOS7' => 'โœŒ๏ธ','Hex' => '270C'), array('iOS2' => '','iOS5' => '๐Ÿ‘‹','iOS7' => '','Hex' => '1F44B'), array('iOS2' => '','iOS5' => 'โœ‹','iOS7' => '','Hex' => '270B'), array('iOS2' => '','iOS5' => '๐Ÿ‘','iOS7' => '','Hex' => '1F450'), array('iOS2' => '','iOS5' => '๐Ÿ‘†','iOS7' => '','Hex' => '1F446'), array('iOS2' => '','iOS5' => '๐Ÿ‘‡','iOS7' => '','Hex' => '1F447'), array('iOS2' => '','iOS5' => '๐Ÿ‘‰','iOS7' => '','Hex' => '1F449'), array('iOS2' => '','iOS5' => '๐Ÿ‘ˆ','iOS7' => '','Hex' => '1F448'), array('iOS2' => '','iOS5' => '๐Ÿ™Œ','iOS7' => '','Hex' => '1F64C'), array('iOS2' => '','iOS5' => '๐Ÿ™','iOS7' => '','Hex' => '1F64F'), array('iOS2' => '','iOS5' => 'โ˜','iOS7' => 'โ˜๏ธ','Hex' => '261D'), array('iOS2' => '','iOS5' => '๐Ÿ‘','iOS7' => '','Hex' => '1F44F'), array('iOS2' => '','iOS5' => '๐Ÿ’ช','iOS7' => '','Hex' => '1F4AA'), array('iOS2' => '','iOS5' => '๐Ÿšถ','iOS7' => '','Hex' => '1F6B6'), array('iOS2' => '','iOS5' => '๐Ÿƒ','iOS7' => '','Hex' => '1F3C3'), array('iOS2' => '','iOS5' => '๐Ÿ’ƒ','iOS7' => '','Hex' => '1F483'), array('iOS2' => '','iOS5' => '๐Ÿ‘ซ','iOS7' => '','Hex' => '1F46B'), array('iOS2' => '','iOS5' => '๐Ÿ‘ช','iOS7' => '','Hex' => '1F46A'), array('iOS2' => '','iOS5' => '๐Ÿ‘ฌ','iOS7' => '','Hex' => '1F46C'), array('iOS2' => '','iOS5' => '๐Ÿ‘ญ','iOS7' => '','Hex' => '1F46D'), array('iOS2' => '','iOS5' => '๐Ÿ’','iOS7' => '','Hex' => '1F48F'), array('iOS2' => '','iOS5' => '๐Ÿ’‘','iOS7' => '','Hex' => '1F491'), array('iOS2' => '','iOS5' => '๐Ÿ‘ฏ','iOS7' => '','Hex' => '1F46F'), array('iOS2' => '','iOS5' => '๐Ÿ™†','iOS7' => '','Hex' => '1F646'), array('iOS2' => '','iOS5' => '๐Ÿ™…','iOS7' => '','Hex' => '1F645'), array('iOS2' => '','iOS5' => '๐Ÿ’','iOS7' => '','Hex' => '1F481'), array('iOS2' => '','iOS5' => '๐Ÿ™‹','iOS7' => '','Hex' => '1F64B'), array('iOS2' => '','iOS5' => '๐Ÿ’†','iOS7' => '','Hex' => '1F486'), array('iOS2' => '','iOS5' => '๐Ÿ’‡','iOS7' => '','Hex' => '1F487'), array('iOS2' => '','iOS5' => '๐Ÿ’…','iOS7' => '','Hex' => '1F485'), array('iOS2' => '','iOS5' => '๐Ÿ‘ฐ','iOS7' => '','Hex' => '1F470'), array('iOS2' => '','iOS5' => '๐Ÿ™Ž','iOS7' => '','Hex' => '1F64E'), array('iOS2' => '','iOS5' => '๐Ÿ™','iOS7' => '','Hex' => '1F64D'), array('iOS2' => '','iOS5' => '๐Ÿ™‡','iOS7' => '','Hex' => '1F647'), array('iOS2' => '','iOS5' => '๐ŸŽฉ','iOS7' => '','Hex' => '1F3A9'), array('iOS2' => '','iOS5' => '๐Ÿ‘‘','iOS7' => '','Hex' => '1F451'), array('iOS2' => '','iOS5' => '๐Ÿ‘’','iOS7' => '','Hex' => '1F452'), array('iOS2' => '','iOS5' => '๐Ÿ‘Ÿ','iOS7' => '','Hex' => '1F45F'), array('iOS2' => '','iOS5' => '๐Ÿ‘ž','iOS7' => '','Hex' => '1F45E'), array('iOS2' => '','iOS5' => '๐Ÿ‘ก','iOS7' => '','Hex' => '1F461'), array('iOS2' => '','iOS5' => '๐Ÿ‘ ','iOS7' => '','Hex' => '1F460'), array('iOS2' => '','iOS5' => '๐Ÿ‘ข','iOS7' => '','Hex' => '1F462'), array('iOS2' => '','iOS5' => '๐Ÿ‘•','iOS7' => '','Hex' => '1F455'), array('iOS2' => '','iOS5' => '๐Ÿ‘”','iOS7' => '','Hex' => '1F454'), array('iOS2' => '','iOS5' => '๐Ÿ‘š','iOS7' => '','Hex' => '1F45A'), array('iOS2' => '','iOS5' => '๐Ÿ‘—','iOS7' => '','Hex' => '1F457'), array('iOS2' => '','iOS5' => '๐ŸŽฝ','iOS7' => '','Hex' => '1F3BD'), array('iOS2' => '','iOS5' => '๐Ÿ‘–','iOS7' => '','Hex' => '1F456'), array('iOS2' => '','iOS5' => '๐Ÿ‘˜','iOS7' => '','Hex' => '1F458'), array('iOS2' => '','iOS5' => '๐Ÿ‘™','iOS7' => '','Hex' => '1F459'), array('iOS2' => '','iOS5' => '๐Ÿ’ผ','iOS7' => '','Hex' => '1F4BC'), array('iOS2' => '','iOS5' => '๐Ÿ‘œ','iOS7' => '','Hex' => '1F45C'), array('iOS2' => '','iOS5' => '๐Ÿ‘','iOS7' => '','Hex' => '1F45D'), array('iOS2' => '','iOS5' => '๐Ÿ‘›','iOS7' => '','Hex' => '1F45B'), array('iOS2' => '','iOS5' => '๐Ÿ‘“','iOS7' => '','Hex' => '1F453'), array('iOS2' => '','iOS5' => '๐ŸŽ€','iOS7' => '','Hex' => '1F380'), array('iOS2' => '','iOS5' => '๐ŸŒ‚','iOS7' => '','Hex' => '1F302'), array('iOS2' => '','iOS5' => '๐Ÿ’„','iOS7' => '','Hex' => '1F484'), array('iOS2' => '','iOS5' => '๐Ÿ’›','iOS7' => '','Hex' => '1F49B'), array('iOS2' => '','iOS5' => '๐Ÿ’™','iOS7' => '','Hex' => '1F499'), array('iOS2' => '','iOS5' => '๐Ÿ’œ','iOS7' => '','Hex' => '1F49C'), array('iOS2' => '','iOS5' => '๐Ÿ’š','iOS7' => '','Hex' => '1F49A'), array('iOS2' => '','iOS5' => 'โค','iOS7' => 'โค๏ธ','Hex' => '2764'), array('iOS2' => '','iOS5' => '๐Ÿ’”','iOS7' => '','Hex' => '1F494'), array('iOS2' => '','iOS5' => '๐Ÿ’—','iOS7' => '','Hex' => '1F497'), array('iOS2' => '','iOS5' => '๐Ÿ’“','iOS7' => '','Hex' => '1F493'), array('iOS2' => '','iOS5' => '๐Ÿ’•','iOS7' => '','Hex' => '1F495'), array('iOS2' => '','iOS5' => '๐Ÿ’–','iOS7' => '','Hex' => '1F496'), array('iOS2' => '','iOS5' => '๐Ÿ’ž','iOS7' => '','Hex' => '1F49E'), array('iOS2' => '','iOS5' => '๐Ÿ’˜','iOS7' => '','Hex' => '1F498'), array('iOS2' => '','iOS5' => '๐Ÿ’Œ','iOS7' => '','Hex' => '1F48C'), array('iOS2' => '','iOS5' => '๐Ÿ’‹','iOS7' => '','Hex' => '1F48B'), array('iOS2' => '','iOS5' => '๐Ÿ’','iOS7' => '','Hex' => '1F48D'), array('iOS2' => '','iOS5' => '๐Ÿ’Ž','iOS7' => '','Hex' => '1F48E'), array('iOS2' => '','iOS5' => '๐Ÿ‘ค','iOS7' => '','Hex' => '1F464'), array('iOS2' => '','iOS5' => '๐Ÿ‘ฅ','iOS7' => '','Hex' => '1F465'), array('iOS2' => '','iOS5' => '๐Ÿ’ฌ','iOS7' => '','Hex' => '1F4AC'), array('iOS2' => '','iOS5' => '๐Ÿ‘ฃ','iOS7' => '','Hex' => '1F463'), array('iOS2' => '','iOS5' => '๐Ÿ’ญ','iOS7' => '','Hex' => '1F4AD'), array('iOS2' => '','iOS5' => '๐Ÿ ','iOS7' => '','Hex' => '1F3E0'), array('iOS2' => '','iOS5' => '๐Ÿก','iOS7' => '','Hex' => '1F3E1'), array('iOS2' => '','iOS5' => '๐Ÿซ','iOS7' => '','Hex' => '1F3EB'), array('iOS2' => '','iOS5' => '๐Ÿข','iOS7' => '','Hex' => '1F3E2'), array('iOS2' => '','iOS5' => '๐Ÿฃ','iOS7' => '','Hex' => '1F3E3'), array('iOS2' => '','iOS5' => '๐Ÿฅ','iOS7' => '','Hex' => '1F3E5'), array('iOS2' => '','iOS5' => '๐Ÿฆ','iOS7' => '','Hex' => '1F3E6'), array('iOS2' => '','iOS5' => '๐Ÿช','iOS7' => '','Hex' => '1F3EA'), array('iOS2' => '','iOS5' => '๐Ÿฉ','iOS7' => '','Hex' => '1F3E9'), array('iOS2' => '','iOS5' => '๐Ÿจ','iOS7' => '','Hex' => '1F3E8'), array('iOS2' => '','iOS5' => '๐Ÿ’’','iOS7' => '','Hex' => '1F492'), array('iOS2' => '','iOS5' => 'โ›ช','iOS7' => 'โ›ช๏ธ','Hex' => '26EA'), array('iOS2' => '','iOS5' => '๐Ÿฌ','iOS7' => '','Hex' => '1F3EC'), array('iOS2' => '','iOS5' => '๐Ÿค','iOS7' => '','Hex' => '1F3E4'), array('iOS2' => '','iOS5' => '๐ŸŒ‡','iOS7' => '','Hex' => '1F307'), array('iOS2' => '','iOS5' => '๐ŸŒ†','iOS7' => '','Hex' => '1F306'), array('iOS2' => '','iOS5' => '๐Ÿฏ','iOS7' => '','Hex' => '1F3EF'), array('iOS2' => '','iOS5' => '๐Ÿฐ','iOS7' => '','Hex' => '1F3F0'), array('iOS2' => '','iOS5' => 'โ›บ','iOS7' => 'โ›บ๏ธ','Hex' => '26FA'), array('iOS2' => '','iOS5' => '๐Ÿญ','iOS7' => '','Hex' => '1F3ED'), array('iOS2' => '','iOS5' => '๐Ÿ—ผ','iOS7' => '','Hex' => '1F5FC'), array('iOS2' => '','iOS5' => '๐Ÿ—พ','iOS7' => '','Hex' => '1F5FE'), array('iOS2' => '','iOS5' => '๐Ÿ—ป','iOS7' => '','Hex' => '1F5FB'), array('iOS2' => '','iOS5' => '๐ŸŒ„','iOS7' => '','Hex' => '1F304'), array('iOS2' => '','iOS5' => '๐ŸŒ…','iOS7' => '','Hex' => '1F305'), array('iOS2' => '','iOS5' => '๐ŸŒƒ','iOS7' => '','Hex' => '1F303'), array('iOS2' => '','iOS5' => '๐Ÿ—ฝ','iOS7' => '','Hex' => '1F5FD'), array('iOS2' => '','iOS5' => '๐ŸŒ‰','iOS7' => '','Hex' => '1F309'), array('iOS2' => '','iOS5' => '๐ŸŽ ','iOS7' => '','Hex' => '1F3A0'), array('iOS2' => '','iOS5' => '๐ŸŽก','iOS7' => '','Hex' => '1F3A1'), array('iOS2' => '','iOS5' => 'โ›ฒ','iOS7' => 'โ›ฒ๏ธ','Hex' => '26F2'), array('iOS2' => '','iOS5' => '๐ŸŽข','iOS7' => '','Hex' => '1F3A2'), array('iOS2' => '','iOS5' => '๐Ÿšข','iOS7' => '','Hex' => '1F6A2'), array('iOS2' => '','iOS5' => 'โ›ต','iOS7' => 'โ›ต๏ธ','Hex' => '26F5'), array('iOS2' => '','iOS5' => '๐Ÿšค','iOS7' => '','Hex' => '1F6A4'), array('iOS2' => '','iOS5' => '๐Ÿšฃ','iOS7' => '','Hex' => '1F6A3'), array('iOS2' => '','iOS5' => 'โš“','iOS7' => 'โš“๏ธ','Hex' => '2693'), array('iOS2' => '','iOS5' => '๐Ÿš€','iOS7' => '','Hex' => '1F680'), array('iOS2' => '','iOS5' => 'โœˆ','iOS7' => 'โœˆ๏ธ','Hex' => '2708'), array('iOS2' => '','iOS5' => '๐Ÿ’บ','iOS7' => '','Hex' => '1F4BA'), array('iOS2' => '','iOS5' => '๐Ÿš','iOS7' => '','Hex' => '1F681'), array('iOS2' => '','iOS5' => '๐Ÿš‚','iOS7' => '','Hex' => '1F682'), array('iOS2' => '','iOS5' => '๐ŸšŠ','iOS7' => '','Hex' => '1F68A'), array('iOS2' => '','iOS5' => '๐Ÿš‰','iOS7' => '','Hex' => '1F689'), array('iOS2' => '','iOS5' => '๐Ÿšž','iOS7' => '','Hex' => '1F69E'), array('iOS2' => '','iOS5' => '๐Ÿš†','iOS7' => '','Hex' => '1F686'), array('iOS2' => '','iOS5' => '๐Ÿš„','iOS7' => '','Hex' => '1F684'), array('iOS2' => '','iOS5' => '๐Ÿš…','iOS7' => '','Hex' => '1F685'), array('iOS2' => '','iOS5' => '๐Ÿšˆ','iOS7' => '','Hex' => '1F688'), array('iOS2' => '','iOS5' => '๐Ÿš‡','iOS7' => '','Hex' => '1F687'), array('iOS2' => '','iOS5' => '๐Ÿš','iOS7' => '','Hex' => '1F69D'), array('iOS2' => '','iOS5' => '๐Ÿš‹','iOS7' => '','Hex' => '1F68B'), array('iOS2' => '','iOS5' => '๐Ÿšƒ','iOS7' => '','Hex' => '1F683'), array('iOS2' => '','iOS5' => '๐ŸšŽ','iOS7' => '','Hex' => '1F68E'), array('iOS2' => '','iOS5' => '๐ŸšŒ','iOS7' => '','Hex' => '1F68C'), array('iOS2' => '','iOS5' => '๐Ÿš','iOS7' => '','Hex' => '1F68D'), array('iOS2' => '','iOS5' => '๐Ÿš™','iOS7' => '','Hex' => '1F699'), array('iOS2' => '','iOS5' => '๐Ÿš˜','iOS7' => '','Hex' => '1F698'), array('iOS2' => '','iOS5' => '๐Ÿš—','iOS7' => '','Hex' => '1F697'), array('iOS2' => '','iOS5' => '๐Ÿš•','iOS7' => '','Hex' => '1F695'), array('iOS2' => '','iOS5' => '๐Ÿš–','iOS7' => '','Hex' => '1F696'), array('iOS2' => '','iOS5' => '๐Ÿš›','iOS7' => '','Hex' => '1F69B'), array('iOS2' => '','iOS5' => '๐Ÿšš','iOS7' => '','Hex' => '1F69A'), array('iOS2' => '','iOS5' => '๐Ÿšจ','iOS7' => '','Hex' => '1F6A8'), array('iOS2' => '','iOS5' => '๐Ÿš“','iOS7' => '','Hex' => '1F693'), array('iOS2' => '','iOS5' => '๐Ÿš”','iOS7' => '','Hex' => '1F694'), array('iOS2' => '','iOS5' => '๐Ÿš’','iOS7' => '','Hex' => '1F692'), array('iOS2' => '','iOS5' => '๐Ÿš‘','iOS7' => '','Hex' => '1F691'), array('iOS2' => '','iOS5' => '๐Ÿš','iOS7' => '','Hex' => '1F690'), array('iOS2' => '','iOS5' => '๐Ÿšฒ','iOS7' => '','Hex' => '1F6B2'), array('iOS2' => '','iOS5' => '๐Ÿšก','iOS7' => '','Hex' => '1F6A1'), array('iOS2' => '','iOS5' => '๐ŸšŸ','iOS7' => '','Hex' => '1F69F'), array('iOS2' => '','iOS5' => '๐Ÿš ','iOS7' => '','Hex' => '1F6A0'), array('iOS2' => '','iOS5' => '๐Ÿšœ','iOS7' => '','Hex' => '1F69C'), array('iOS2' => '','iOS5' => '๐Ÿ’ˆ','iOS7' => '','Hex' => '1F488'), array('iOS2' => '','iOS5' => '๐Ÿš','iOS7' => '','Hex' => '1F68F'), array('iOS2' => '','iOS5' => '๐ŸŽซ','iOS7' => '','Hex' => '1F3AB'), array('iOS2' => '','iOS5' => '๐Ÿšฆ','iOS7' => '','Hex' => '1F6A6'), array('iOS2' => '','iOS5' => '๐Ÿšฅ','iOS7' => '','Hex' => '1F6A5'), array('iOS2' => '','iOS5' => 'โš ','iOS7' => 'โš ๏ธ','Hex' => '26A0'), array('iOS2' => '','iOS5' => '๐Ÿšง','iOS7' => '','Hex' => '1F6A7'), array('iOS2' => '','iOS5' => '๐Ÿ”ฐ','iOS7' => '','Hex' => '1F530'), array('iOS2' => '','iOS5' => 'โ›ฝ','iOS7' => 'โ›ฝ๏ธ','Hex' => '26FD'), array('iOS2' => '','iOS5' => '๐Ÿฎ','iOS7' => '','Hex' => '1F3EE'), array('iOS2' => '','iOS5' => '๐ŸŽฐ','iOS7' => '','Hex' => '1F3B0'), array('iOS2' => '','iOS5' => 'โ™จ','iOS7' => 'โ™จ๏ธ','Hex' => '2668'), array('iOS2' => '','iOS5' => '๐Ÿ—ฟ','iOS7' => '','Hex' => '1F5FF'), array('iOS2' => '','iOS5' => '๐ŸŽช','iOS7' => '','Hex' => '1F3AA'), array('iOS2' => '','iOS5' => '๐ŸŽญ','iOS7' => '','Hex' => '1F3AD'), array('iOS2' => '','iOS5' => '๐Ÿ“','iOS7' => '','Hex' => '1F4CD'), array('iOS2' => '','iOS5' => '๐Ÿšฉ','iOS7' => '','Hex' => '1F6A9'), array('iOS2' => '','iOS5' => '๐Ÿ‡ฏ๐Ÿ‡ต','iOS7' => '','Hex' => '1F1EF_1F1F5'), array('iOS2' => '','iOS5' => '๐Ÿ‡ฐ๐Ÿ‡ท','iOS7' => '','Hex' => '1F1F0_1F1F7'), array('iOS2' => '','iOS5' => '๐Ÿ‡ฉ๐Ÿ‡ช','iOS7' => '','Hex' => '1F1E9_1F1EA'), array('iOS2' => '','iOS5' => '๐Ÿ‡จ๐Ÿ‡ณ','iOS7' => '','Hex' => '1F1E8_1F1F3'), array('iOS2' => '','iOS5' => '๐Ÿ‡บ๐Ÿ‡ธ','iOS7' => '','Hex' => '1F1FA_1F1F8'), array('iOS2' => '','iOS5' => '๐Ÿ‡ซ๐Ÿ‡ท','iOS7' => '','Hex' => '1F1EB_1F1F7'), array('iOS2' => '','iOS5' => '๐Ÿ‡ช๐Ÿ‡ธ','iOS7' => '','Hex' => '1F1EA_1F1F8'), array('iOS2' => '','iOS5' => '๐Ÿ‡ฎ๐Ÿ‡น','iOS7' => '','Hex' => '1F1EE_1F1F9'), array('iOS2' => '','iOS5' => '๐Ÿ‡ท๐Ÿ‡บ','iOS7' => '','Hex' => '1F1F7_1F1FA'), array('iOS2' => '','iOS5' => '๐Ÿ‡ฌ๐Ÿ‡ง','iOS7' => '','Hex' => '1F1EC_1F1E7'), array('iOS2' => '','iOS5' => '','iOS7' => '','Hex' => ''), array('iOS2' => '','iOS5' => '๐Ÿถ','iOS7' => '','Hex' => '1F436'), array('iOS2' => '','iOS5' => '๐Ÿบ','iOS7' => '','Hex' => '1F43A'), array('iOS2' => '','iOS5' => '๐Ÿฑ','iOS7' => '','Hex' => '1F431'), array('iOS2' => '','iOS5' => '๐Ÿญ','iOS7' => '','Hex' => '1F42D'), array('iOS2' => '','iOS5' => '๐Ÿน','iOS7' => '','Hex' => '1F439'), array('iOS2' => '','iOS5' => '๐Ÿฐ','iOS7' => '','Hex' => '1F430'), array('iOS2' => '','iOS5' => '๐Ÿธ','iOS7' => '','Hex' => '1F438'), array('iOS2' => '','iOS5' => '๐Ÿฏ','iOS7' => '','Hex' => '1F42F'), array('iOS2' => '','iOS5' => '๐Ÿจ','iOS7' => '','Hex' => '1F428'), array('iOS2' => '','iOS5' => '๐Ÿป','iOS7' => '','Hex' => '1F43B'), array('iOS2' => '','iOS5' => '๐Ÿท','iOS7' => '','Hex' => '1F437'), array('iOS2' => '','iOS5' => '๐Ÿฝ','iOS7' => '','Hex' => '1F43D'), array('iOS2' => '','iOS5' => '๐Ÿฎ','iOS7' => '','Hex' => '1F42E'), array('iOS2' => '','iOS5' => '๐Ÿ—','iOS7' => '','Hex' => '1F417'), array('iOS2' => '','iOS5' => '๐Ÿต','iOS7' => '','Hex' => '1F435'), array('iOS2' => '','iOS5' => '๐Ÿ’','iOS7' => '','Hex' => '1F412'), array('iOS2' => '','iOS5' => '๐Ÿด','iOS7' => '','Hex' => '1F434'), array('iOS2' => '','iOS5' => '๐Ÿ‘','iOS7' => '','Hex' => '1F411'), array('iOS2' => '','iOS5' => '๐Ÿ˜','iOS7' => '','Hex' => '1F418'), array('iOS2' => '','iOS5' => '๐Ÿผ','iOS7' => '','Hex' => '1F43C'), array('iOS2' => '','iOS5' => '๐Ÿง','iOS7' => '','Hex' => '1F427'), array('iOS2' => '','iOS5' => '๐Ÿฆ','iOS7' => '','Hex' => '1F426'), array('iOS2' => '','iOS5' => '๐Ÿค','iOS7' => '','Hex' => '1F424'), array('iOS2' => '','iOS5' => '๐Ÿฅ','iOS7' => '','Hex' => '1F425'), array('iOS2' => '','iOS5' => '๐Ÿฃ','iOS7' => '','Hex' => '1F423'), array('iOS2' => '','iOS5' => '๐Ÿ”','iOS7' => '','Hex' => '1F414'), array('iOS2' => '','iOS5' => '๐Ÿ','iOS7' => '','Hex' => '1F40D'), array('iOS2' => '','iOS5' => '๐Ÿข','iOS7' => '','Hex' => '1F422'), array('iOS2' => '','iOS5' => '๐Ÿ›','iOS7' => '','Hex' => '1F41B'), array('iOS2' => '','iOS5' => '๐Ÿ','iOS7' => '','Hex' => '1F41D'), array('iOS2' => '','iOS5' => '๐Ÿœ','iOS7' => '','Hex' => '1F41C'), array('iOS2' => '','iOS5' => '๐Ÿž','iOS7' => '','Hex' => '1F41E'), array('iOS2' => '','iOS5' => '๐ŸŒ','iOS7' => '','Hex' => '1F40C'), array('iOS2' => '','iOS5' => '๐Ÿ™','iOS7' => '','Hex' => '1F419'), array('iOS2' => '','iOS5' => '๐Ÿš','iOS7' => '','Hex' => '1F41A'), array('iOS2' => '','iOS5' => '๐Ÿ ','iOS7' => '','Hex' => '1F420'), array('iOS2' => '','iOS5' => '๐ŸŸ','iOS7' => '','Hex' => '1F41F'), array('iOS2' => '','iOS5' => '๐Ÿฌ','iOS7' => '','Hex' => '1F42C'), array('iOS2' => '','iOS5' => '๐Ÿณ','iOS7' => '','Hex' => '1F433'), array('iOS2' => '','iOS5' => '๐Ÿ‹','iOS7' => '','Hex' => '1F40B'), array('iOS2' => '','iOS5' => '๐Ÿ„','iOS7' => '','Hex' => '1F404'), array('iOS2' => '','iOS5' => '๐Ÿ','iOS7' => '','Hex' => '1F40F'), array('iOS2' => '','iOS5' => '๐Ÿ€','iOS7' => '','Hex' => '1F400'), array('iOS2' => '','iOS5' => '๐Ÿƒ','iOS7' => '','Hex' => '1F403'), array('iOS2' => '','iOS5' => '๐Ÿ…','iOS7' => '','Hex' => '1F405'), array('iOS2' => '','iOS5' => '๐Ÿ‡','iOS7' => '','Hex' => '1F407'), array('iOS2' => '','iOS5' => '๐Ÿ‰','iOS7' => '','Hex' => '1F409'), array('iOS2' => '','iOS5' => '๐ŸŽ','iOS7' => '','Hex' => '1F40E'), array('iOS2' => '','iOS5' => '๐Ÿ','iOS7' => '','Hex' => '1F410'), array('iOS2' => '','iOS5' => '๐Ÿ“','iOS7' => '','Hex' => '1F413'), array('iOS2' => '','iOS5' => '๐Ÿ•','iOS7' => '','Hex' => '1F415'), array('iOS2' => '','iOS5' => '๐Ÿ–','iOS7' => '','Hex' => '1F416'), array('iOS2' => '','iOS5' => '๐Ÿ','iOS7' => '','Hex' => '1F401'), array('iOS2' => '','iOS5' => '๐Ÿ‚','iOS7' => '','Hex' => '1F402'), array('iOS2' => '','iOS5' => '๐Ÿฒ','iOS7' => '','Hex' => '1F432'), array('iOS2' => '','iOS5' => '๐Ÿก','iOS7' => '','Hex' => '1F421'), array('iOS2' => '','iOS5' => '๐ŸŠ','iOS7' => '','Hex' => '1F40A'), array('iOS2' => '','iOS5' => '๐Ÿซ','iOS7' => '','Hex' => '1F42B'), array('iOS2' => '','iOS5' => '๐Ÿช','iOS7' => '','Hex' => '1F42A'), array('iOS2' => '','iOS5' => '๐Ÿ†','iOS7' => '','Hex' => '1F406'), array('iOS2' => '','iOS5' => '๐Ÿˆ','iOS7' => '','Hex' => '1F408'), array('iOS2' => '','iOS5' => '๐Ÿฉ','iOS7' => '','Hex' => '1F429'), array('iOS2' => '','iOS5' => '๐Ÿพ','iOS7' => '','Hex' => '1F43E'), array('iOS2' => '','iOS5' => '๐Ÿ’','iOS7' => '','Hex' => '1F490'), array('iOS2' => '','iOS5' => '๐ŸŒธ','iOS7' => '','Hex' => '1F338'), array('iOS2' => '','iOS5' => '๐ŸŒท','iOS7' => '','Hex' => '1F337'), array('iOS2' => '','iOS5' => '๐Ÿ€','iOS7' => '','Hex' => '1F340'), array('iOS2' => '','iOS5' => '๐ŸŒน','iOS7' => '','Hex' => '1F339'), array('iOS2' => '','iOS5' => '๐ŸŒป','iOS7' => '','Hex' => '1F33B'), array('iOS2' => '','iOS5' => '๐ŸŒบ','iOS7' => '','Hex' => '1F33A'), array('iOS2' => '','iOS5' => '๐Ÿ','iOS7' => '','Hex' => '1F341'), array('iOS2' => '','iOS5' => '๐Ÿƒ','iOS7' => '','Hex' => '1F343'), array('iOS2' => '','iOS5' => '๐Ÿ‚','iOS7' => '','Hex' => '1F342'), array('iOS2' => '','iOS5' => '๐ŸŒฟ','iOS7' => '','Hex' => '1F33F'), array('iOS2' => '','iOS5' => '๐ŸŒพ','iOS7' => '','Hex' => '1F33E'), array('iOS2' => '','iOS5' => '๐Ÿ„','iOS7' => '','Hex' => '1F344'), array('iOS2' => '','iOS5' => '๐ŸŒต','iOS7' => '','Hex' => '1F335'), array('iOS2' => '','iOS5' => '๐ŸŒด','iOS7' => '','Hex' => '1F334'), array('iOS2' => '','iOS5' => '๐ŸŒฒ','iOS7' => '','Hex' => '1F332'), array('iOS2' => '','iOS5' => '๐ŸŒณ','iOS7' => '','Hex' => '1F333'), array('iOS2' => '','iOS5' => '๐ŸŒฐ','iOS7' => '','Hex' => '1F330'), array('iOS2' => '','iOS5' => '๐ŸŒฑ','iOS7' => '','Hex' => '1F331'), array('iOS2' => '','iOS5' => '๐ŸŒผ','iOS7' => '','Hex' => '1F33C'), array('iOS2' => '','iOS5' => '๐ŸŒ','iOS7' => '','Hex' => '1F310'), array('iOS2' => '','iOS5' => '๐ŸŒž','iOS7' => '','Hex' => '1F31E'), array('iOS2' => '','iOS5' => '๐ŸŒ','iOS7' => '','Hex' => '1F31D'), array('iOS2' => '','iOS5' => '๐ŸŒš','iOS7' => '','Hex' => '1F31A'), array('iOS2' => '','iOS5' => '๐ŸŒ‘','iOS7' => '','Hex' => '1F311'), array('iOS2' => '','iOS5' => '๐ŸŒ’','iOS7' => '','Hex' => '1F312'), array('iOS2' => '','iOS5' => '๐ŸŒ“','iOS7' => '','Hex' => '1F313'), array('iOS2' => '','iOS5' => '๐ŸŒ”','iOS7' => '','Hex' => '1F314'), array('iOS2' => '','iOS5' => '๐ŸŒ•','iOS7' => '','Hex' => '1F315'), array('iOS2' => '','iOS5' => '๐ŸŒ–','iOS7' => '','Hex' => '1F316'), array('iOS2' => '','iOS5' => '๐ŸŒ—','iOS7' => '','Hex' => '1F317'), array('iOS2' => '','iOS5' => '๐ŸŒ˜','iOS7' => '','Hex' => '1F318'), array('iOS2' => '','iOS5' => '๐ŸŒœ','iOS7' => '','Hex' => '1F31C'), array('iOS2' => '','iOS5' => '๐ŸŒ›','iOS7' => '','Hex' => '1F31B'), array('iOS2' => '','iOS5' => '๐ŸŒ™','iOS7' => '','Hex' => '1F319'), array('iOS2' => '','iOS5' => '๐ŸŒ','iOS7' => '','Hex' => '1F30D'), array('iOS2' => '','iOS5' => '๐ŸŒŽ','iOS7' => '','Hex' => '1F30E'), array('iOS2' => '','iOS5' => '๐ŸŒ','iOS7' => '','Hex' => '1F30F'), array('iOS2' => '','iOS5' => '๐ŸŒ‹','iOS7' => '','Hex' => '1F30B'), array('iOS2' => '','iOS5' => '๐ŸŒŒ','iOS7' => '','Hex' => '1F30C'), array('iOS2' => '','iOS5' => '๐ŸŒ ','iOS7' => '','Hex' => '1F320'), array('iOS2' => '','iOS5' => 'โญ','iOS7' => 'โญ๏ธ','Hex' => '2B50'), array('iOS2' => '','iOS5' => 'โ˜€','iOS7' => 'โ˜€๏ธ','Hex' => '2600'), array('iOS2' => '','iOS5' => 'โ›…','iOS7' => 'โ›…๏ธ','Hex' => '26C5'), array('iOS2' => '','iOS5' => 'โ˜','iOS7' => 'โ˜๏ธ','Hex' => '2601'), array('iOS2' => '','iOS5' => 'โšก','iOS7' => 'โšก๏ธ','Hex' => '26A1'), array('iOS2' => '','iOS5' => 'โ˜”','iOS7' => 'โ˜”๏ธ','Hex' => '2614'), array('iOS2' => '','iOS5' => 'โ„','iOS7' => 'โ„๏ธ','Hex' => '2744'), array('iOS2' => '','iOS5' => 'โ›„','iOS7' => 'โ›„๏ธ','Hex' => '26C4'), array('iOS2' => '','iOS5' => '๐ŸŒ€','iOS7' => '๐ŸŒ€','Hex' => '1F300'), array('iOS2' => '','iOS5' => '๐ŸŒ','iOS7' => '','Hex' => '1F301'), array('iOS2' => '','iOS5' => '๐ŸŒˆ','iOS7' => '','Hex' => '1F308'), array('iOS2' => '','iOS5' => '๐ŸŒŠ','iOS7' => '','Hex' => '1F30A'), array('iOS2' => '','iOS5' => '๐ŸŽ','iOS7' => '','Hex' => '1F38D'), array('iOS2' => '','iOS5' => '๐Ÿ’','iOS7' => '','Hex' => '1F49D'), array('iOS2' => '','iOS5' => '๐ŸŽŽ','iOS7' => '','Hex' => '1F38E'), array('iOS2' => '','iOS5' => '๐ŸŽ’','iOS7' => '','Hex' => '1F392'), array('iOS2' => '','iOS5' => '๐ŸŽ“','iOS7' => '','Hex' => '1F393'), array('iOS2' => '','iOS5' => '๐ŸŽ','iOS7' => '','Hex' => '1F38F'), array('iOS2' => '','iOS5' => '๐ŸŽ†','iOS7' => '','Hex' => '1F386'), array('iOS2' => '','iOS5' => '๐ŸŽ‡','iOS7' => '','Hex' => '1F387'), array('iOS2' => '','iOS5' => '๐ŸŽ','iOS7' => '','Hex' => '1F390'), array('iOS2' => '','iOS5' => '๐ŸŽ‘','iOS7' => '','Hex' => '1F391'), array('iOS2' => '','iOS5' => '๐ŸŽƒ','iOS7' => '','Hex' => '1F383'), array('iOS2' => '','iOS5' => '๐Ÿ‘ป','iOS7' => '','Hex' => '1F47B'), array('iOS2' => '','iOS5' => '๐ŸŽ…','iOS7' => '','Hex' => '1F385'), array('iOS2' => '','iOS5' => '๐ŸŽ„','iOS7' => '','Hex' => '1F384'), array('iOS2' => '','iOS5' => '๐ŸŽ','iOS7' => '','Hex' => '1F381'), array('iOS2' => '','iOS5' => '๐ŸŽ‹','iOS7' => '','Hex' => '1F38B'), array('iOS2' => '','iOS5' => '๐ŸŽ‰','iOS7' => '','Hex' => '1F389'), array('iOS2' => '','iOS5' => '๐ŸŽŠ','iOS7' => '','Hex' => '1F38A'), array('iOS2' => '','iOS5' => '๐ŸŽˆ','iOS7' => '','Hex' => '1F388'), array('iOS2' => '','iOS5' => '๐ŸŽŒ','iOS7' => '','Hex' => '1F38C'), array('iOS2' => '','iOS5' => '๐Ÿ”ฎ','iOS7' => '','Hex' => '1F52E'), array('iOS2' => '','iOS5' => '๐ŸŽฅ','iOS7' => '','Hex' => '1F3A5'), array('iOS2' => '','iOS5' => '๐Ÿ“ท','iOS7' => '','Hex' => '1F4F7'), array('iOS2' => '','iOS5' => '๐Ÿ“น','iOS7' => '','Hex' => '1F4F9'), array('iOS2' => '','iOS5' => '๐Ÿ“ผ','iOS7' => '','Hex' => '1F4FC'), array('iOS2' => '','iOS5' => '๐Ÿ’ฟ','iOS7' => '','Hex' => '1F4BF'), array('iOS2' => '','iOS5' => '๐Ÿ“€','iOS7' => '','Hex' => '1F4C0'), array('iOS2' => '','iOS5' => '๐Ÿ’ฝ','iOS7' => '','Hex' => '1F4BD'), array('iOS2' => '','iOS5' => '๐Ÿ’พ','iOS7' => '','Hex' => '1F4BE'), array('iOS2' => '','iOS5' => '๐Ÿ’ป','iOS7' => '','Hex' => '1F4BB'), array('iOS2' => '','iOS5' => '๐Ÿ“ฑ','iOS7' => '','Hex' => '1F4F1'), array('iOS2' => '','iOS5' => 'โ˜Ž','iOS7' => 'โ˜Ž๏ธ','Hex' => '260E'), array('iOS2' => '','iOS5' => '๐Ÿ“ž','iOS7' => '','Hex' => '1F4DE'), array('iOS2' => '','iOS5' => '๐Ÿ“Ÿ','iOS7' => '','Hex' => '1F4DF'), array('iOS2' => '','iOS5' => '๐Ÿ“ ','iOS7' => '','Hex' => '1F4E0'), array('iOS2' => '','iOS5' => '๐Ÿ“ก','iOS7' => '','Hex' => '1F4E1'), array('iOS2' => '','iOS5' => '๐Ÿ“บ','iOS7' => '','Hex' => '1F4FA'), array('iOS2' => '','iOS5' => '๐Ÿ“ป','iOS7' => '','Hex' => '1F4FB'), array('iOS2' => '','iOS5' => '๐Ÿ”Š','iOS7' => '','Hex' => '1F50A'), array('iOS2' => '','iOS5' => '๐Ÿ”‰','iOS7' => '','Hex' => '1F509'), array('iOS2' => '','iOS5' => '๐Ÿ”ˆ','iOS7' => '','Hex' => '1F508'), array('iOS2' => '','iOS5' => '๐Ÿ”‡','iOS7' => '','Hex' => '1F507'), array('iOS2' => '','iOS5' => '๐Ÿ””','iOS7' => '','Hex' => '1F514'), array('iOS2' => '','iOS5' => '๐Ÿ”•','iOS7' => '','Hex' => '1F515'), array('iOS2' => '','iOS5' => '๐Ÿ“ข','iOS7' => '','Hex' => '1F4E2'), array('iOS2' => '','iOS5' => '๐Ÿ“ฃ','iOS7' => '','Hex' => '1F4E3'), array('iOS2' => '','iOS5' => 'โณ','iOS7' => '','Hex' => '23F3'), array('iOS2' => '','iOS5' => 'โŒ›','iOS7' => 'โŒ›๏ธ','Hex' => '231B'), array('iOS2' => '','iOS5' => 'โฐ','iOS7' => 'โฐ','Hex' => '23F0'), array('iOS2' => '','iOS5' => 'โŒš','iOS7' => 'โŒš๏ธ','Hex' => '231A'), array('iOS2' => '','iOS5' => '๐Ÿ”“','iOS7' => '','Hex' => '1F513'), array('iOS2' => '','iOS5' => '๐Ÿ”’','iOS7' => '','Hex' => '1F512'), array('iOS2' => '','iOS5' => '๐Ÿ”','iOS7' => '','Hex' => '1F50F'), array('iOS2' => '','iOS5' => '๐Ÿ”','iOS7' => '','Hex' => '1F510'), array('iOS2' => '','iOS5' => '๐Ÿ”‘','iOS7' => '','Hex' => '1F511'), array('iOS2' => '','iOS5' => '๐Ÿ”Ž','iOS7' => '','Hex' => '1F50E'), array('iOS2' => '','iOS5' => '๐Ÿ’ก','iOS7' => '','Hex' => '1F4A1'), array('iOS2' => '','iOS5' => '๐Ÿ”ฆ','iOS7' => '','Hex' => '1F526'), array('iOS2' => '','iOS5' => '๐Ÿ”†','iOS7' => '','Hex' => '1F506'), array('iOS2' => '','iOS5' => '๐Ÿ”…','iOS7' => '','Hex' => '1F505'), array('iOS2' => '','iOS5' => '๐Ÿ”Œ','iOS7' => '','Hex' => '1F50C'), array('iOS2' => '','iOS5' => '๐Ÿ”‹','iOS7' => '','Hex' => '1F50B'), array('iOS2' => '','iOS5' => '๐Ÿ”','iOS7' => '','Hex' => '1F50D'), array('iOS2' => '','iOS5' => '๐Ÿ›','iOS7' => '','Hex' => '1F6C1'), array('iOS2' => '','iOS5' => '๐Ÿ›€','iOS7' => '','Hex' => '1F6C0'), array('iOS2' => '','iOS5' => '๐Ÿšฟ','iOS7' => '','Hex' => '1F6BF'), array('iOS2' => '','iOS5' => '๐Ÿšฝ','iOS7' => '','Hex' => '1F6BD'), array('iOS2' => '','iOS5' => '๐Ÿ”ง','iOS7' => '','Hex' => '1F527'), array('iOS2' => '','iOS5' => '๐Ÿ”ฉ','iOS7' => '','Hex' => '1F529'), array('iOS2' => '','iOS5' => '๐Ÿ”จ','iOS7' => '','Hex' => '1F528'), array('iOS2' => '','iOS5' => '๐Ÿšช','iOS7' => '','Hex' => '1F6AA'), array('iOS2' => '','iOS5' => '๐Ÿšฌ','iOS7' => '','Hex' => '1F6AC'), array('iOS2' => '','iOS5' => '๐Ÿ’ฃ','iOS7' => '','Hex' => '1F4A3'), array('iOS2' => '','iOS5' => '๐Ÿ”ซ','iOS7' => '','Hex' => '1F52B'), array('iOS2' => '','iOS5' => '๐Ÿ”ช','iOS7' => '','Hex' => '1F52A'), array('iOS2' => '','iOS5' => '๐Ÿ’Š','iOS7' => '','Hex' => '1F48A'), array('iOS2' => '','iOS5' => '๐Ÿ’‰','iOS7' => '','Hex' => '1F489'), array('iOS2' => '','iOS5' => '๐Ÿ’ฐ','iOS7' => '','Hex' => '1F4B0'), array('iOS2' => '','iOS5' => '๐Ÿ’ด','iOS7' => '','Hex' => '1F4B4'), array('iOS2' => '','iOS5' => '๐Ÿ’ต','iOS7' => '','Hex' => '1F4B5'), array('iOS2' => '','iOS5' => '๐Ÿ’ท','iOS7' => '','Hex' => '1F4B7'), array('iOS2' => '','iOS5' => '๐Ÿ’ถ','iOS7' => '','Hex' => '1F4B6'), array('iOS2' => '','iOS5' => '๐Ÿ’ณ','iOS7' => '','Hex' => '1F4B3'), array('iOS2' => '','iOS5' => '๐Ÿ’ธ','iOS7' => '','Hex' => '1F4B8'), array('iOS2' => '','iOS5' => '๐Ÿ“ฒ','iOS7' => '','Hex' => '1F4F2'), array('iOS2' => '','iOS5' => '๐Ÿ“ง','iOS7' => '','Hex' => '1F4E7'), array('iOS2' => '','iOS5' => '๐Ÿ“ฅ','iOS7' => '','Hex' => '1F4E5'), array('iOS2' => '','iOS5' => '๐Ÿ“ค','iOS7' => '','Hex' => '1F4E4'), array('iOS2' => '','iOS5' => 'โœ‰','iOS7' => 'โœ‰๏ธ','Hex' => '2709'), array('iOS2' => '','iOS5' => '๐Ÿ“ฉ','iOS7' => '','Hex' => '1F4E9'), array('iOS2' => '','iOS5' => '๐Ÿ“จ','iOS7' => '','Hex' => '1F4E8'), array('iOS2' => '','iOS5' => '๐Ÿ“ฏ','iOS7' => '','Hex' => '1F4EF'), array('iOS2' => '','iOS5' => '๐Ÿ“ซ','iOS7' => '','Hex' => '1F4EB'), array('iOS2' => '','iOS5' => '๐Ÿ“ช','iOS7' => '','Hex' => '1F4EA'), array('iOS2' => '','iOS5' => '๐Ÿ“ฌ','iOS7' => '','Hex' => '1F4EC'), array('iOS2' => '','iOS5' => '๐Ÿ“ญ','iOS7' => '','Hex' => '1F4ED'), array('iOS2' => '','iOS5' => '๐Ÿ“ฎ','iOS7' => '','Hex' => '1F4EE'), array('iOS2' => '','iOS5' => '๐Ÿ“ฆ','iOS7' => '','Hex' => '1F4E6'), array('iOS2' => '','iOS5' => '๐Ÿ“','iOS7' => '','Hex' => '1F4DD'), array('iOS2' => '','iOS5' => '๐Ÿ“„','iOS7' => '','Hex' => '1F4C4'), array('iOS2' => '','iOS5' => '๐Ÿ“ƒ','iOS7' => '','Hex' => '1F4C3'), array('iOS2' => '','iOS5' => '๐Ÿ“‘','iOS7' => '','Hex' => '1F4D1'), array('iOS2' => '','iOS5' => '๐Ÿ“Š','iOS7' => '','Hex' => '1F4CA'), array('iOS2' => '','iOS5' => '๐Ÿ“ˆ','iOS7' => '','Hex' => '1F4C8'), array('iOS2' => '','iOS5' => '๐Ÿ“‰','iOS7' => '','Hex' => '1F4C9'), array('iOS2' => '','iOS5' => '๐Ÿ“œ','iOS7' => '','Hex' => '1F4DC'), array('iOS2' => '','iOS5' => '๐Ÿ“‹','iOS7' => '','Hex' => '1F4CB'), array('iOS2' => '','iOS5' => '๐Ÿ“…','iOS7' => '','Hex' => '1F4C5'), array('iOS2' => '','iOS5' => '๐Ÿ“†','iOS7' => '','Hex' => '1F4C6'), array('iOS2' => '','iOS5' => '๐Ÿ“‡','iOS7' => '','Hex' => '1F4C7'), array('iOS2' => '','iOS5' => '๐Ÿ“','iOS7' => '','Hex' => '1F4C1'), array('iOS2' => '','iOS5' => '๐Ÿ“‚','iOS7' => '','Hex' => '1F4C2'), array('iOS2' => '','iOS5' => 'โœ‚','iOS7' => 'โœ‚๏ธ','Hex' => '2702'), array('iOS2' => '','iOS5' => '๐Ÿ“Œ','iOS7' => '','Hex' => '1F4CC'), array('iOS2' => '','iOS5' => '๐Ÿ“Ž','iOS7' => '','Hex' => '1F4CE'), array('iOS2' => '','iOS5' => 'โœ’','iOS7' => 'โœ’๏ธ','Hex' => '2712'), array('iOS2' => '','iOS5' => 'โœ','iOS7' => 'โœ๏ธ','Hex' => '270F'), array('iOS2' => '','iOS5' => '๐Ÿ“','iOS7' => '','Hex' => '1F4CF'), array('iOS2' => '','iOS5' => '๐Ÿ“','iOS7' => '','Hex' => '1F4D0'), array('iOS2' => '','iOS5' => '๐Ÿ“•','iOS7' => '','Hex' => '1F4D5'), array('iOS2' => '','iOS5' => '๐Ÿ“—','iOS7' => '','Hex' => '1F4D7'), array('iOS2' => '','iOS5' => '๐Ÿ“˜','iOS7' => '','Hex' => '1F4D8'), array('iOS2' => '','iOS5' => '๐Ÿ“™','iOS7' => '','Hex' => '1F4D9'), array('iOS2' => '','iOS5' => '๐Ÿ““','iOS7' => '','Hex' => '1F4D3'), array('iOS2' => '','iOS5' => '๐Ÿ“”','iOS7' => '','Hex' => '1F4D4'), array('iOS2' => '','iOS5' => '๐Ÿ“’','iOS7' => '','Hex' => '1F4D2'), array('iOS2' => '','iOS5' => '๐Ÿ“š','iOS7' => '','Hex' => '1F4DA'), array('iOS2' => '','iOS5' => '๐Ÿ“–','iOS7' => '','Hex' => '1F4D6'), array('iOS2' => '','iOS5' => '๐Ÿ”–','iOS7' => '','Hex' => '1F516'), array('iOS2' => '','iOS5' => '๐Ÿ“›','iOS7' => '','Hex' => '1F4DB'), array('iOS2' => '','iOS5' => '๐Ÿ”ฌ','iOS7' => '','Hex' => '1F52C'), array('iOS2' => '','iOS5' => '๐Ÿ”ญ','iOS7' => '','Hex' => '1F52D'), array('iOS2' => '','iOS5' => '๐Ÿ“ฐ','iOS7' => '','Hex' => '1F4F0'), array('iOS2' => '','iOS5' => '๐ŸŽจ','iOS7' => '','Hex' => '1F3A8'), array('iOS2' => '','iOS5' => '๐ŸŽฌ','iOS7' => '','Hex' => '1F3AC'), array('iOS2' => '','iOS5' => '๐ŸŽค','iOS7' => '','Hex' => '1F3A4'), array('iOS2' => '','iOS5' => '๐ŸŽง','iOS7' => '','Hex' => '1F3A7'), array('iOS2' => '','iOS5' => '๐ŸŽผ','iOS7' => '','Hex' => '1F3BC'), array('iOS2' => '','iOS5' => '๐ŸŽต','iOS7' => '','Hex' => '1F3B5'), array('iOS2' => '','iOS5' => '๐ŸŽถ','iOS7' => '','Hex' => '1F3B6'), array('iOS2' => '','iOS5' => '๐ŸŽน','iOS7' => '','Hex' => '1F3B9'), array('iOS2' => '','iOS5' => '๐ŸŽป','iOS7' => '','Hex' => '1F3BB'), array('iOS2' => '','iOS5' => '๐ŸŽบ','iOS7' => '','Hex' => '1F3BA'), array('iOS2' => '','iOS5' => '๐ŸŽท','iOS7' => '','Hex' => '1F3B7'), array('iOS2' => '','iOS5' => '๐ŸŽธ','iOS7' => '','Hex' => '1F3B8'), array('iOS2' => '','iOS5' => '๐Ÿ‘พ','iOS7' => '','Hex' => '1F47E'), array('iOS2' => '','iOS5' => '๐ŸŽฎ','iOS7' => '','Hex' => '1F3AE'), array('iOS2' => '','iOS5' => '๐Ÿƒ','iOS7' => '','Hex' => '1F0CF'), array('iOS2' => '','iOS5' => '๐ŸŽด','iOS7' => '','Hex' => '1F3B4'), array('iOS2' => '','iOS5' => '๐Ÿ€„','iOS7' => '๐Ÿ€„๏ธ','Hex' => '1F004'), array('iOS2' => '','iOS5' => '๐ŸŽฒ','iOS7' => '','Hex' => '1F3B2'), array('iOS2' => '','iOS5' => '๐ŸŽฏ','iOS7' => '','Hex' => '1F3AF'), array('iOS2' => '','iOS5' => '๐Ÿˆ','iOS7' => '','Hex' => '1F3C8'), array('iOS2' => '','iOS5' => '๐Ÿ€','iOS7' => '','Hex' => '1F3C0'), array('iOS2' => '','iOS5' => 'โšฝ','iOS7' => 'โšฝ๏ธ','Hex' => '26BD'), array('iOS2' => '','iOS5' => 'โšพ','iOS7' => 'โšพ๏ธ','Hex' => '26BE'), array('iOS2' => '','iOS5' => '๐ŸŽพ','iOS7' => '','Hex' => '1F3BE'), array('iOS2' => '','iOS5' => '๐ŸŽฑ','iOS7' => '','Hex' => '1F3B1'), array('iOS2' => '','iOS5' => '๐Ÿ‰','iOS7' => '','Hex' => '1F3C9'), array('iOS2' => '','iOS5' => '๐ŸŽณ','iOS7' => '','Hex' => '1F3B3'), array('iOS2' => '','iOS5' => 'โ›ณ','iOS7' => 'โ›ณ๏ธ','Hex' => '26F3'), array('iOS2' => '','iOS5' => '๐Ÿšต','iOS7' => '','Hex' => '1F6B5'), array('iOS2' => '','iOS5' => '๐Ÿšด','iOS7' => '','Hex' => '1F6B4'), array('iOS2' => '','iOS5' => '๐Ÿ','iOS7' => '','Hex' => '1F3C1'), array('iOS2' => '','iOS5' => '๐Ÿ‡','iOS7' => '','Hex' => '1F3C7'), array('iOS2' => '','iOS5' => '๐Ÿ†','iOS7' => '','Hex' => '1F3C6'), array('iOS2' => '','iOS5' => '๐ŸŽฟ','iOS7' => '','Hex' => '1F3BF'), array('iOS2' => '','iOS5' => '๐Ÿ‚','iOS7' => '','Hex' => '1F3C2'), array('iOS2' => '','iOS5' => '๐ŸŠ','iOS7' => '','Hex' => '1F3CA'), array('iOS2' => '','iOS5' => '๐Ÿ„','iOS7' => '','Hex' => '1F3C4'), array('iOS2' => '','iOS5' => '๐ŸŽฃ','iOS7' => '','Hex' => '1F3A3'), array('iOS2' => '','iOS5' => 'โ˜•','iOS7' => 'โ˜•๏ธ','Hex' => '2615'), array('iOS2' => '','iOS5' => '๐Ÿต','iOS7' => '','Hex' => '1F375'), array('iOS2' => '','iOS5' => '๐Ÿถ','iOS7' => '','Hex' => '1F376'), array('iOS2' => '','iOS5' => '๐Ÿผ','iOS7' => '','Hex' => '1F37C'), array('iOS2' => '','iOS5' => '๐Ÿบ','iOS7' => '','Hex' => '1F37A'), array('iOS2' => '','iOS5' => '๐Ÿป','iOS7' => '','Hex' => '1F37B'), array('iOS2' => '','iOS5' => '๐Ÿธ','iOS7' => '','Hex' => '1F378'), array('iOS2' => '','iOS5' => '๐Ÿน','iOS7' => '','Hex' => '1F379'), array('iOS2' => '','iOS5' => '๐Ÿท','iOS7' => '','Hex' => '1F377'), array('iOS2' => '','iOS5' => '๐Ÿด','iOS7' => '','Hex' => '1F374'), array('iOS2' => '','iOS5' => '๐Ÿ•','iOS7' => '','Hex' => '1F355'), array('iOS2' => '','iOS5' => '๐Ÿ”','iOS7' => '','Hex' => '1F354'), array('iOS2' => '','iOS5' => '๐ŸŸ','iOS7' => '','Hex' => '1F35F'), array('iOS2' => '','iOS5' => '๐Ÿ—','iOS7' => '','Hex' => '1F357'), array('iOS2' => '','iOS5' => '๐Ÿ–','iOS7' => '','Hex' => '1F356'), array('iOS2' => '','iOS5' => '๐Ÿ','iOS7' => '','Hex' => '1F35D'), array('iOS2' => '','iOS5' => '๐Ÿ›','iOS7' => '','Hex' => '1F35B'), array('iOS2' => '','iOS5' => '๐Ÿค','iOS7' => '','Hex' => '1F364'), array('iOS2' => '','iOS5' => '๐Ÿฑ','iOS7' => '','Hex' => '1F371'), array('iOS2' => '','iOS5' => '๐Ÿฃ','iOS7' => '','Hex' => '1F363'), array('iOS2' => '','iOS5' => '๐Ÿฅ','iOS7' => '','Hex' => '1F365'), array('iOS2' => '','iOS5' => '๐Ÿ™','iOS7' => '','Hex' => '1F359'), array('iOS2' => '','iOS5' => '๐Ÿ˜','iOS7' => '','Hex' => '1F358'), array('iOS2' => '','iOS5' => '๐Ÿš','iOS7' => '','Hex' => '1F35A'), array('iOS2' => '','iOS5' => '๐Ÿœ','iOS7' => '','Hex' => '1F35C'), array('iOS2' => '','iOS5' => '๐Ÿฒ','iOS7' => '','Hex' => '1F372'), array('iOS2' => '','iOS5' => '๐Ÿข','iOS7' => '','Hex' => '1F362'), array('iOS2' => '','iOS5' => '๐Ÿก','iOS7' => '','Hex' => '1F361'), array('iOS2' => '','iOS5' => '๐Ÿณ','iOS7' => '','Hex' => '1F373'), array('iOS2' => '','iOS5' => '๐Ÿž','iOS7' => '','Hex' => '1F35E'), array('iOS2' => '','iOS5' => '๐Ÿฉ','iOS7' => '','Hex' => '1F369'), array('iOS2' => '','iOS5' => '๐Ÿฎ','iOS7' => '','Hex' => '1F36E'), array('iOS2' => '','iOS5' => '๐Ÿฆ','iOS7' => '','Hex' => '1F366'), array('iOS2' => '','iOS5' => '๐Ÿจ','iOS7' => '','Hex' => '1F368'), array('iOS2' => '','iOS5' => '๐Ÿง','iOS7' => '','Hex' => '1F367'), array('iOS2' => '','iOS5' => '๐ŸŽ‚','iOS7' => '','Hex' => '1F382'), array('iOS2' => '','iOS5' => '๐Ÿฐ','iOS7' => '','Hex' => '1F370'), array('iOS2' => '','iOS5' => '๐Ÿช','iOS7' => '','Hex' => '1F36A'), array('iOS2' => '','iOS5' => '๐Ÿซ','iOS7' => '','Hex' => '1F36B'), array('iOS2' => '','iOS5' => '๐Ÿฌ','iOS7' => '','Hex' => '1F36C'), array('iOS2' => '','iOS5' => '๐Ÿญ','iOS7' => '','Hex' => '1F36D'), array('iOS2' => '','iOS5' => '๐Ÿฏ','iOS7' => '','Hex' => '1F36F'), array('iOS2' => '','iOS5' => '๐ŸŽ','iOS7' => '','Hex' => '1F34E'), array('iOS2' => '','iOS5' => '๐Ÿ','iOS7' => '','Hex' => '1F34F'), array('iOS2' => '','iOS5' => '๐ŸŠ','iOS7' => '','Hex' => '1F34A'), array('iOS2' => '','iOS5' => '๐Ÿ‹','iOS7' => '','Hex' => '1F34B'), array('iOS2' => '','iOS5' => '๐Ÿ’','iOS7' => '','Hex' => '1F352'), array('iOS2' => '','iOS5' => '๐Ÿ‡','iOS7' => '','Hex' => '1F347'), array('iOS2' => '','iOS5' => '๐Ÿ‰','iOS7' => '','Hex' => '1F349'), array('iOS2' => '','iOS5' => '๐Ÿ“','iOS7' => '','Hex' => '1F353'), array('iOS2' => '','iOS5' => '๐Ÿ‘','iOS7' => '','Hex' => '1F351'), array('iOS2' => '','iOS5' => '๐Ÿˆ','iOS7' => '','Hex' => '1F348'), array('iOS2' => '','iOS5' => '๐ŸŒ','iOS7' => '','Hex' => '1F34C'), array('iOS2' => '','iOS5' => '๐Ÿ','iOS7' => '','Hex' => '1F350'), array('iOS2' => '','iOS5' => '๐Ÿ','iOS7' => '','Hex' => '1F34D'), array('iOS2' => '','iOS5' => '๐Ÿ ','iOS7' => '','Hex' => '1F360'), array('iOS2' => '','iOS5' => '๐Ÿ†','iOS7' => '','Hex' => '1F346'), array('iOS2' => '','iOS5' => '๐Ÿ…','iOS7' => '','Hex' => '1F345'), array('iOS2' => '','iOS5' => '๐ŸŒฝ','iOS7' => '','Hex' => '1F33D'), array('iOS2' => '','iOS5' => '1โƒฃ','iOS7' => '','Hex' => '0031_20E3'), array('iOS2' => '','iOS5' => '2โƒฃ','iOS7' => '','Hex' => '0032_20E3'), array('iOS2' => '','iOS5' => '3โƒฃ','iOS7' => '','Hex' => '0033_20E3'), array('iOS2' => '','iOS5' => '4โƒฃ','iOS7' => '','Hex' => '0034_20E3'), array('iOS2' => '','iOS5' => '2โƒฃ','iOS7' => '','Hex' => '0032_20E3'), array('iOS2' => '','iOS5' => '0โƒฃ','iOS7' => '','Hex' => '0030_20E3'), array('iOS2' => '','iOS5' => '5โƒฃ','iOS7' => '','Hex' => '0035_20E3'), array('iOS2' => '','iOS5' => '6โƒฃ','iOS7' => '','Hex' => '0036_20E3'), array('iOS2' => '','iOS5' => '7โƒฃ','iOS7' => '','Hex' => '0037_20E3'), array('iOS2' => '','iOS5' => '8โƒฃ','iOS7' => '','Hex' => '0038_20E3'), array('iOS2' => '','iOS5' => '9โƒฃ','iOS7' => '','Hex' => '0039_20E3'), array('iOS2' => '','iOS5' => '๐Ÿ”Ÿ','iOS7' => '','Hex' => '1F51F'), array('iOS2' => '','iOS5' => '๐Ÿ”ข','iOS7' => '','Hex' => '1F522'), array('iOS2' => '','iOS5' => '#โƒฃ','iOS7' => '','Hex' => '0023_20E3'), array('iOS2' => '','iOS5' => '๐Ÿ”ฃ','iOS7' => '','Hex' => '1F523'), array('iOS2' => '','iOS5' => 'โฌ†','iOS7' => 'โฌ†๏ธ','Hex' => '2B06'), array('iOS2' => '','iOS5' => 'โฌ‡','iOS7' => 'โฌ‡๏ธ','Hex' => '2B07'), array('iOS2' => '','iOS5' => 'โฌ…','iOS7' => 'โฌ…๏ธ','Hex' => '2B05'), array('iOS2' => '','iOS5' => 'โžก','iOS7' => 'โžก๏ธ','Hex' => '27A1'), array('iOS2' => '','iOS5' => '๐Ÿ” ','iOS7' => '','Hex' => '1F520'), array('iOS2' => '','iOS5' => '๐Ÿ”ก','iOS7' => '','Hex' => '1F521'), array('iOS2' => '','iOS5' => '๐Ÿ”ค','iOS7' => '','Hex' => '1F524'), array('iOS2' => '','iOS5' => 'โ†—','iOS7' => 'โ†—๏ธ','Hex' => '2197'), array('iOS2' => '','iOS5' => 'โ†–','iOS7' => 'โ†–๏ธ','Hex' => '2196'), array('iOS2' => '','iOS5' => 'โ†˜','iOS7' => 'โ†˜๏ธ','Hex' => '2198'), array('iOS2' => '','iOS5' => 'โ†™','iOS7' => 'โ†™๏ธ','Hex' => '2199'), array('iOS2' => '','iOS5' => 'โ†”','iOS7' => 'โ†”๏ธ','Hex' => '2194'), array('iOS2' => '','iOS5' => 'โ†•','iOS7' => 'โ†•๏ธ','Hex' => '2195'), array('iOS2' => '','iOS5' => '๐Ÿ”„','iOS7' => '','Hex' => '1F504'), array('iOS2' => '','iOS5' => 'โ—€','iOS7' => 'โ—€๏ธ','Hex' => '25C0'), array('iOS2' => '','iOS5' => 'โ–ถ','iOS7' => 'โ–ถ๏ธ','Hex' => '25B6'), array('iOS2' => '','iOS5' => '๐Ÿ”ผ','iOS7' => '','Hex' => '1F53C'), array('iOS2' => '','iOS5' => '๐Ÿ”ฝ','iOS7' => '','Hex' => '1F53D'), array('iOS2' => '','iOS5' => 'โ†ฉ','iOS7' => 'โ†ฉ๏ธ','Hex' => '21A9'), array('iOS2' => '','iOS5' => 'โ†ช','iOS7' => 'โ†ช๏ธ','Hex' => '21AA'), array('iOS2' => '','iOS5' => 'โ„น','iOS7' => 'โ„น๏ธ','Hex' => '2139'), array('iOS2' => '','iOS5' => 'โช','iOS7' => '','Hex' => '23EA'), array('iOS2' => '','iOS5' => 'โฉ','iOS7' => '','Hex' => '23E9'), array('iOS2' => '','iOS5' => 'โซ','iOS7' => '','Hex' => '23EB'), array('iOS2' => '','iOS5' => 'โฌ','iOS7' => '','Hex' => '23EC'), array('iOS2' => '','iOS5' => 'โคต','iOS7' => 'โคต๏ธ','Hex' => '2935'), array('iOS2' => '','iOS5' => 'โคด','iOS7' => 'โคด๏ธ','Hex' => '2934'), array('iOS2' => '','iOS5' => '๐Ÿ†—','iOS7' => '','Hex' => '1F197'), array('iOS2' => '','iOS5' => '๐Ÿ”€','iOS7' => '','Hex' => '1F500'), array('iOS2' => '','iOS5' => '๐Ÿ”','iOS7' => '','Hex' => '1F501'), array('iOS2' => '','iOS5' => '๐Ÿ”‚','iOS7' => '','Hex' => '1F502'), array('iOS2' => '','iOS5' => '๐Ÿ†•','iOS7' => '','Hex' => '1F195'), array('iOS2' => '','iOS5' => '๐Ÿ†™','iOS7' => '','Hex' => '1F199'), array('iOS2' => '','iOS5' => '๐Ÿ†’','iOS7' => '','Hex' => '1F192'), array('iOS2' => '','iOS5' => '๐Ÿ†“','iOS7' => '','Hex' => '1F193'), array('iOS2' => '','iOS5' => '๐Ÿ†–','iOS7' => '','Hex' => '1F196'), array('iOS2' => '','iOS5' => '๐Ÿ“ถ','iOS7' => '','Hex' => '1F4F6'), array('iOS2' => '','iOS5' => '๐ŸŽฆ','iOS7' => '','Hex' => '1F3A6'), array('iOS2' => '','iOS5' => '๐Ÿˆ','iOS7' => '','Hex' => '1F201'), array('iOS2' => '','iOS5' => '๐Ÿˆฏ','iOS7' => '๐Ÿˆฏ๏ธ','Hex' => '1F22F'), array('iOS2' => '','iOS5' => '๐Ÿˆณ','iOS7' => '','Hex' => '1F233'), array('iOS2' => '','iOS5' => '๐Ÿˆต','iOS7' => '','Hex' => '1F235'), array('iOS2' => '','iOS5' => '๐Ÿˆด','iOS7' => '','Hex' => '1F234'), array('iOS2' => '','iOS5' => '๐Ÿˆฒ','iOS7' => '','Hex' => '1F232'), array('iOS2' => '','iOS5' => '๐Ÿ‰','iOS7' => '','Hex' => '1F250'), array('iOS2' => '','iOS5' => '๐Ÿˆน','iOS7' => '','Hex' => '1F239'), array('iOS2' => '','iOS5' => '๐Ÿˆบ','iOS7' => '','Hex' => '1F23A'), array('iOS2' => '','iOS5' => '๐Ÿˆถ','iOS7' => '','Hex' => '1F236'), array('iOS2' => '','iOS5' => '๐Ÿˆš','iOS7' => '๐Ÿˆš๏ธ','Hex' => '1F21A'), array('iOS2' => '','iOS5' => '๐Ÿšป','iOS7' => '','Hex' => '1F6BB'), array('iOS2' => '','iOS5' => '๐Ÿšน','iOS7' => '','Hex' => '1F6B9'), array('iOS2' => '','iOS5' => '๐Ÿšบ','iOS7' => '','Hex' => '1F6BA'), array('iOS2' => '','iOS5' => '๐Ÿšผ','iOS7' => '','Hex' => '1F6BC'), array('iOS2' => '','iOS5' => '๐Ÿšพ','iOS7' => '','Hex' => '1F6BE'), array('iOS2' => '','iOS5' => '๐Ÿšฐ','iOS7' => '','Hex' => '1F6B0'), array('iOS2' => '','iOS5' => '๐Ÿšฎ','iOS7' => '','Hex' => '1F6AE'), array('iOS2' => '','iOS5' => '๐Ÿ…ฟ','iOS7' => '๐Ÿ…ฟ๏ธ','Hex' => '1F17F'), array('iOS2' => '','iOS5' => 'โ™ฟ','iOS7' => 'โ™ฟ๏ธ','Hex' => '267F'), array('iOS2' => '','iOS5' => '๐Ÿšญ','iOS7' => '','Hex' => '1F6AD'), array('iOS2' => '','iOS5' => '๐Ÿˆท','iOS7' => '','Hex' => '1F237'), array('iOS2' => '','iOS5' => '๐Ÿˆธ','iOS7' => '','Hex' => '1F238'), array('iOS2' => '','iOS5' => '๐Ÿˆ‚','iOS7' => '','Hex' => '1F202'), array('iOS2' => '','iOS5' => 'โ“‚','iOS7' => 'โ“‚๏ธ','Hex' => '24C2'), array('iOS2' => '','iOS5' => '๐Ÿ›‚','iOS7' => '','Hex' => '1F6C2'), array('iOS2' => '','iOS5' => '๐Ÿ›„','iOS7' => '','Hex' => '1F6C4'), array('iOS2' => '','iOS5' => '๐Ÿ›…','iOS7' => '','Hex' => '1F6C5'), array('iOS2' => '','iOS5' => '๐Ÿ›ƒ','iOS7' => '','Hex' => '1F6C3'), array('iOS2' => '','iOS5' => '๐Ÿ‰‘','iOS7' => '','Hex' => '1F251'), array('iOS2' => '','iOS5' => 'ใŠ™','iOS7' => 'ใŠ™๏ธ','Hex' => '3299'), array('iOS2' => '','iOS5' => 'ใŠ—','iOS7' => 'ใŠ—๏ธ','Hex' => '3297'), array('iOS2' => '','iOS5' => '๐Ÿ†‘','iOS7' => '','Hex' => '1F191'), array('iOS2' => '','iOS5' => '๐Ÿ†˜','iOS7' => '','Hex' => '1F198'), array('iOS2' => '','iOS5' => '๐Ÿ†”','iOS7' => '','Hex' => '1F194'), array('iOS2' => '','iOS5' => '๐Ÿšซ','iOS7' => '','Hex' => '1F6AB'), array('iOS2' => '','iOS5' => '๐Ÿ”ž','iOS7' => '','Hex' => '1F51E'), array('iOS2' => '','iOS5' => '๐Ÿ“ต','iOS7' => '','Hex' => '1F4F5'), array('iOS2' => '','iOS5' => '๐Ÿšฏ','iOS7' => '','Hex' => '1F6AF'), array('iOS2' => '','iOS5' => '๐Ÿšฑ','iOS7' => '','Hex' => '1F6B1'), array('iOS2' => '','iOS5' => '๐Ÿšณ','iOS7' => '','Hex' => '1F6B3'), array('iOS2' => '','iOS5' => '๐Ÿšท','iOS7' => '','Hex' => '1F6B7'), array('iOS2' => '','iOS5' => '๐Ÿšธ','iOS7' => '','Hex' => '1F6B8'), array('iOS2' => '','iOS5' => 'โ›”','iOS7' => 'โ›”๏ธ','Hex' => '26D4'), array('iOS2' => '','iOS5' => 'โœณ','iOS7' => 'โœณ๏ธ','Hex' => '2733'), array('iOS2' => '','iOS5' => 'โ‡','iOS7' => 'โ‡๏ธ','Hex' => '2747'), array('iOS2' => '','iOS5' => 'โŽ','iOS7' => '','Hex' => '274E'), array('iOS2' => '','iOS5' => 'โœ…','iOS7' => '','Hex' => '2705'), array('iOS2' => '','iOS5' => 'โœด','iOS7' => 'โœด๏ธ','Hex' => '2734'), array('iOS2' => '','iOS5' => '๐Ÿ’Ÿ','iOS7' => '','Hex' => '1F49F'), array('iOS2' => '','iOS5' => '๐Ÿ†š','iOS7' => '','Hex' => '1F19A'), array('iOS2' => '','iOS5' => '๐Ÿ“ณ','iOS7' => '','Hex' => '1F4F3'), array('iOS2' => '','iOS5' => '๐Ÿ“ด','iOS7' => '','Hex' => '1F4F4'), array('iOS2' => '','iOS5' => '๐Ÿ…ฐ','iOS7' => '','Hex' => '1F170'), array('iOS2' => '','iOS5' => '๐Ÿ…ฑ','iOS7' => '','Hex' => '1F171'), array('iOS2' => '','iOS5' => '๐Ÿ†Ž','iOS7' => '','Hex' => '1F18E'), array('iOS2' => '','iOS5' => '๐Ÿ…พ','iOS7' => '','Hex' => '1F17E'), array('iOS2' => '','iOS5' => '๐Ÿ’ ','iOS7' => '','Hex' => '1F4A0'), array('iOS2' => '','iOS5' => 'โžฟ','iOS7' => '','Hex' => '27BF'), array('iOS2' => '','iOS5' => 'โ™ป','iOS7' => 'โ™ป๏ธ','Hex' => '267B'), array('iOS2' => '','iOS5' => 'โ™ˆ','iOS7' => 'โ™ˆ๏ธ','Hex' => '2648'), array('iOS2' => '','iOS5' => 'โ™‰','iOS7' => 'โ™‰๏ธ','Hex' => '2649'), array('iOS2' => '','iOS5' => 'โ™Š','iOS7' => 'โ™Š๏ธ','Hex' => '264A'), array('iOS2' => '','iOS5' => 'โ™‹','iOS7' => 'โ™‹๏ธ','Hex' => '264B'), array('iOS2' => '','iOS5' => 'โ™Œ','iOS7' => 'โ™Œ๏ธ','Hex' => '264C'), array('iOS2' => '','iOS5' => 'โ™','iOS7' => 'โ™๏ธ','Hex' => '264D'), array('iOS2' => '','iOS5' => 'โ™Ž','iOS7' => 'โ™Ž๏ธ','Hex' => '264E'), array('iOS2' => '','iOS5' => 'โ™','iOS7' => 'โ™๏ธ','Hex' => '264F'), array('iOS2' => '','iOS5' => 'โ™','iOS7' => 'โ™๏ธ','Hex' => '2650'), array('iOS2' => '','iOS5' => 'โ™‘','iOS7' => 'โ™‘๏ธ','Hex' => '2651'), array('iOS2' => '','iOS5' => 'โ™’','iOS7' => 'โ™’๏ธ','Hex' => '2652'), array('iOS2' => '','iOS5' => 'โ™“','iOS7' => 'โ™“๏ธ','Hex' => '2653'), array('iOS2' => '','iOS5' => 'โ›Ž','iOS7' => '','Hex' => '26CE'), array('iOS2' => '','iOS5' => '๐Ÿ”ฏ','iOS7' => '','Hex' => '1F52F'), array('iOS2' => '','iOS5' => '๐Ÿง','iOS7' => '','Hex' => '1F3E7'), array('iOS2' => '','iOS5' => '๐Ÿ’น','iOS7' => '','Hex' => '1F4B9'), array('iOS2' => '','iOS5' => '๐Ÿ’ฒ','iOS7' => '','Hex' => '1F4B2'), array('iOS2' => '','iOS5' => '๐Ÿ’ฑ','iOS7' => '','Hex' => '1F4B1'), array('iOS2' => 'ยฉ','iOS5' => 'ยฉ','iOS7' => '','Hex' => '00A9'), array('iOS2' => 'ยฎ','iOS5' => 'ยฎ','iOS7' => '','Hex' => '00AE'), array('iOS2' => 'โ„ข','iOS5' => 'โ„ข','iOS7' => '','Hex' => '2122'), array('iOS2' => '','iOS5' => 'ใ€ฝ','iOS7' => 'ใ€ฝ๏ธ','Hex' => '303D'), array('iOS2' => '','iOS5' => 'ใ€ฐ','iOS7' => '','Hex' => '3030'), array('iOS2' => '','iOS5' => '๐Ÿ”','iOS7' => '','Hex' => '1F51D'), array('iOS2' => '','iOS5' => '๐Ÿ”š','iOS7' => '','Hex' => '1F51A'), array('iOS2' => '','iOS5' => '๐Ÿ”™','iOS7' => '','Hex' => '1F519'), array('iOS2' => '','iOS5' => '๐Ÿ”›','iOS7' => '','Hex' => '1F51B'), array('iOS2' => '','iOS5' => '๐Ÿ”œ','iOS7' => '','Hex' => '1F51C'), array('iOS2' => '','iOS5' => 'โŒ','iOS7' => '','Hex' => '274C'), array('iOS2' => '','iOS5' => 'โญ•','iOS7' => 'โญ•๏ธ','Hex' => '2B55'), array('iOS2' => '','iOS5' => 'โ—','iOS7' => 'โ—๏ธ','Hex' => '2757'), array('iOS2' => '','iOS5' => 'โ“','iOS7' => '','Hex' => '2753'), array('iOS2' => '','iOS5' => 'โ•','iOS7' => '','Hex' => '2755'), array('iOS2' => '','iOS5' => 'โ”','iOS7' => '','Hex' => '2754'), array('iOS2' => '','iOS5' => '๐Ÿ”ƒ','iOS7' => '','Hex' => '1F503'), array('iOS2' => '','iOS5' => '๐Ÿ•›','iOS7' => '','Hex' => '1F55B'), array('iOS2' => '','iOS5' => '๐Ÿ•ง','iOS7' => '','Hex' => '1F567'), array('iOS2' => '','iOS5' => '๐Ÿ•','iOS7' => '','Hex' => '1F550'), array('iOS2' => '','iOS5' => '๐Ÿ•œ','iOS7' => '','Hex' => '1F55C'), array('iOS2' => '','iOS5' => '๐Ÿ•‘','iOS7' => '','Hex' => '1F551'), array('iOS2' => '','iOS5' => '๐Ÿ•','iOS7' => '','Hex' => '1F55D'), array('iOS2' => '','iOS5' => '๐Ÿ•’','iOS7' => '','Hex' => '1F552'), array('iOS2' => '','iOS5' => '๐Ÿ•ž','iOS7' => '','Hex' => '1F55E'), array('iOS2' => '','iOS5' => '๐Ÿ•“','iOS7' => '','Hex' => '1F553'), array('iOS2' => '','iOS5' => '๐Ÿ•Ÿ','iOS7' => '','Hex' => '1F55F'), array('iOS2' => '','iOS5' => '๐Ÿ•”','iOS7' => '','Hex' => '1F554'), array('iOS2' => '','iOS5' => '๐Ÿ• ','iOS7' => '','Hex' => '1F560'), array('iOS2' => '','iOS5' => '๐Ÿ••','iOS7' => '','Hex' => '1F555'), array('iOS2' => '','iOS5' => '๐Ÿ•–','iOS7' => '','Hex' => '1F556'), array('iOS2' => '','iOS5' => '๐Ÿ•—','iOS7' => '','Hex' => '1F557'), array('iOS2' => '','iOS5' => '๐Ÿ•˜','iOS7' => '','Hex' => '1F558'), array('iOS2' => '','iOS5' => '๐Ÿ•™','iOS7' => '','Hex' => '1F559'), array('iOS2' => '','iOS5' => '๐Ÿ•š','iOS7' => '','Hex' => '1F55A'), array('iOS2' => '','iOS5' => '๐Ÿ•ก','iOS7' => '','Hex' => '1F561'), array('iOS2' => '','iOS5' => '๐Ÿ•ข','iOS7' => '','Hex' => '1F562'), array('iOS2' => '','iOS5' => '๐Ÿ•ฃ','iOS7' => '','Hex' => '1F563'), array('iOS2' => '','iOS5' => '๐Ÿ•ค','iOS7' => '','Hex' => '1F564'), array('iOS2' => '','iOS5' => '๐Ÿ•ฅ','iOS7' => '','Hex' => '1F565'), array('iOS2' => '','iOS5' => '๐Ÿ•ฆ','iOS7' => '','Hex' => '1F566'), array('iOS2' => '','iOS5' => 'โœ–','iOS7' => 'โœ–๏ธ','Hex' => '2716'), array('iOS2' => '','iOS5' => 'โž•','iOS7' => '','Hex' => '2795'), array('iOS2' => '','iOS5' => 'โž–','iOS7' => '','Hex' => '2796'), array('iOS2' => '','iOS5' => 'โž—','iOS7' => '','Hex' => '2797'), array('iOS2' => '','iOS5' => 'โ™ ','iOS7' => 'โ™ ๏ธ','Hex' => '2660'), array('iOS2' => '','iOS5' => 'โ™ฅ','iOS7' => 'โ™ฅ๏ธ','Hex' => '2665'), array('iOS2' => '','iOS5' => 'โ™ฃ','iOS7' => 'โ™ฃ๏ธ','Hex' => '2663'), array('iOS2' => '','iOS5' => 'โ™ฆ','iOS7' => 'โ™ฆ๏ธ','Hex' => '2666'), array('iOS2' => '','iOS5' => '๐Ÿ’ฎ','iOS7' => '','Hex' => '1F4AE'), array('iOS2' => '','iOS5' => '๐Ÿ’ฏ','iOS7' => '','Hex' => '1F4AF'), array('iOS2' => '','iOS5' => 'โœ”','iOS7' => 'โœ”๏ธ','Hex' => '2714'), array('iOS2' => '','iOS5' => 'โ˜‘','iOS7' => 'โ˜‘๏ธ','Hex' => '2611'), array('iOS2' => '','iOS5' => '๐Ÿ”˜','iOS7' => '','Hex' => '1F518'), array('iOS2' => '','iOS5' => '๐Ÿ”—','iOS7' => '','Hex' => '1F517'), array('iOS2' => '','iOS5' => 'โžฐ','iOS7' => '','Hex' => '27B0'), array('iOS2' => '','iOS5' => '๐Ÿ”ฑ','iOS7' => '','Hex' => '1F531'), array('iOS2' => '','iOS5' => '๐Ÿ”ฒ','iOS7' => '','Hex' => '1F532'), array('iOS2' => '','iOS5' => '๐Ÿ”ณ','iOS7' => '','Hex' => '1F533'), array('iOS2' => '','iOS5' => 'โ—ผ','iOS7' => 'โ—ผ๏ธ','Hex' => '25FC'), array('iOS2' => '','iOS5' => 'โ—ป','iOS7' => 'โ—ป๏ธ','Hex' => '25FB'), array('iOS2' => '','iOS5' => 'โ—พ','iOS7' => 'โ—พ๏ธ','Hex' => '25FE'), array('iOS2' => '','iOS5' => 'โ—ฝ','iOS7' => 'โ—ฝ๏ธ','Hex' => '25FD'), array('iOS2' => '','iOS5' => 'โ–ช','iOS7' => 'โ–ช๏ธ','Hex' => '25AA'), array('iOS2' => '','iOS5' => 'โ–ซ','iOS7' => 'โ–ซ๏ธ','Hex' => '25AB'), array('iOS2' => '','iOS5' => '๐Ÿ”บ','iOS7' => '','Hex' => '1F53A'), array('iOS2' => '','iOS5' => 'โฌœ','iOS7' => 'โฌœ๏ธ','Hex' => '2B1C'), array('iOS2' => '','iOS5' => 'โฌ›','iOS7' => 'โฌ›๏ธ','Hex' => '2B1B'), array('iOS2' => '','iOS5' => 'โšซ','iOS7' => 'โšซ๏ธ','Hex' => '26AB'), array('iOS2' => '','iOS5' => 'โšช','iOS7' => 'โšช๏ธ','Hex' => '26AA'), array('iOS2' => '','iOS5' => '๐Ÿ”ด','iOS7' => '','Hex' => '1F534'), array('iOS2' => '','iOS5' => '๐Ÿ”ต','iOS7' => '','Hex' => '1F535'), array('iOS2' => '','iOS5' => '๐Ÿ”ป','iOS7' => '','Hex' => '1F53B'), array('iOS2' => '','iOS5' => '๐Ÿ”ถ','iOS7' => '','Hex' => '1F536'), array('iOS2' => '','iOS5' => '๐Ÿ”ท','iOS7' => '','Hex' => '1F537'), array('iOS2' => '','iOS5' => '๐Ÿ”ธ','iOS7' => '','Hex' => '1F538'), array('iOS2' => '','iOS5' => '๐Ÿ”น','iOS7' => '','Hex' => '1F539'), array('iOS2' => '','iOS5' => 'โ‰','iOS7' => 'โ‰๏ธ','Hex' => '2049'), array('iOS2' => '','iOS5' => 'โ€ผ','iOS7' => 'โ€ผ๏ธ','Hex' => '203C')); + return array(array('iOS2' => '','iOS5' => '๐Ÿ˜„','iOS7' => '','Hex' => '1F604'), array('iOS2' => '','iOS5' => '๐Ÿ˜ƒ','iOS7' => '','Hex' => '1F603'), array('iOS2' => '','iOS5' => '๐Ÿ˜€','iOS7' => '','Hex' => '1F600'), array('iOS2' => '','iOS5' => '๐Ÿ˜Š','iOS7' => '','Hex' => '1F60A'), array('iOS2' => '','iOS5' => 'โ˜บ','iOS7' => 'โ˜บ๏ธ','Hex' => '263A'), array('iOS2' => '','iOS5' => '๐Ÿ˜‰','iOS7' => '','Hex' => '1F609'), array('iOS2' => '','iOS5' => '๐Ÿ˜','iOS7' => '','Hex' => '1F60D'), array('iOS2' => '','iOS5' => '๐Ÿ˜˜','iOS7' => '','Hex' => '1F618'), array('iOS2' => '','iOS5' => '๐Ÿ˜š','iOS7' => '','Hex' => '1F61A'), array('iOS2' => '','iOS5' => '๐Ÿ˜—','iOS7' => '','Hex' => '1F617'), array('iOS2' => '','iOS5' => '๐Ÿ˜™','iOS7' => '','Hex' => '1F619'), array('iOS2' => '','iOS5' => '๐Ÿ˜œ','iOS7' => '','Hex' => '1F61C'), array('iOS2' => '','iOS5' => '๐Ÿ˜','iOS7' => '','Hex' => '1F61D'), array('iOS2' => '','iOS5' => '๐Ÿ˜›','iOS7' => '','Hex' => '1F61B'), array('iOS2' => '','iOS5' => '๐Ÿ˜ณ','iOS7' => '','Hex' => '1F633'), array('iOS2' => '','iOS5' => '๐Ÿ˜','iOS7' => '','Hex' => '1F601'), array('iOS2' => '','iOS5' => '๐Ÿ˜”','iOS7' => '','Hex' => '1F614'), array('iOS2' => '','iOS5' => '๐Ÿ˜Œ','iOS7' => '','Hex' => '1F60C'), array('iOS2' => '','iOS5' => '๐Ÿ˜’','iOS7' => '','Hex' => '1F612'), array('iOS2' => '','iOS5' => '๐Ÿ˜ž','iOS7' => '','Hex' => '1F61E'), array('iOS2' => '','iOS5' => '๐Ÿ˜ฃ','iOS7' => '','Hex' => '1F623'), array('iOS2' => '','iOS5' => '๐Ÿ˜ข','iOS7' => '','Hex' => '1F622'), array('iOS2' => '','iOS5' => '๐Ÿ˜‚','iOS7' => '','Hex' => '1F602'), array('iOS2' => '','iOS5' => '๐Ÿ˜ญ','iOS7' => '','Hex' => '1F62D'), array('iOS2' => '','iOS5' => '๐Ÿ˜ช','iOS7' => '','Hex' => '1F62A'), array('iOS2' => '','iOS5' => '๐Ÿ˜ฅ','iOS7' => '','Hex' => '1F625'), array('iOS2' => '','iOS5' => '๐Ÿ˜ฐ','iOS7' => '','Hex' => '1F630'), array('iOS2' => '','iOS5' => '๐Ÿ˜…','iOS7' => '','Hex' => '1F605'), array('iOS2' => '','iOS5' => '๐Ÿ˜“','iOS7' => '','Hex' => '1F613'), array('iOS2' => '','iOS5' => '๐Ÿ˜ฉ','iOS7' => '','Hex' => '1F629'), array('iOS2' => '','iOS5' => '๐Ÿ˜ซ','iOS7' => '','Hex' => '1F62B'), array('iOS2' => '','iOS5' => '๐Ÿ˜จ','iOS7' => '','Hex' => '1F628'), array('iOS2' => '','iOS5' => '๐Ÿ˜ฑ','iOS7' => '','Hex' => '1F631'), array('iOS2' => '','iOS5' => '๐Ÿ˜ ','iOS7' => '','Hex' => '1F620'), array('iOS2' => '','iOS5' => '๐Ÿ˜ก','iOS7' => '','Hex' => '1F621'), array('iOS2' => '','iOS5' => '๐Ÿ˜ค','iOS7' => '','Hex' => '1F624'), array('iOS2' => '','iOS5' => '๐Ÿ˜–','iOS7' => '','Hex' => '1F616'), array('iOS2' => '','iOS5' => '๐Ÿ˜†','iOS7' => '','Hex' => '1F606'), array('iOS2' => '','iOS5' => '๐Ÿ˜‹','iOS7' => '','Hex' => '1F60B'), array('iOS2' => '','iOS5' => '๐Ÿ˜ท','iOS7' => '','Hex' => '1F637'), array('iOS2' => '','iOS5' => '๐Ÿ˜Ž','iOS7' => '','Hex' => '1F60E'), array('iOS2' => '','iOS5' => '๐Ÿ˜ด','iOS7' => '','Hex' => '1F634'), array('iOS2' => '','iOS5' => '๐Ÿ˜ต','iOS7' => '','Hex' => '1F635'), array('iOS2' => '','iOS5' => '๐Ÿ˜ฒ','iOS7' => '','Hex' => '1F632'), array('iOS2' => '','iOS5' => '๐Ÿ˜Ÿ','iOS7' => '','Hex' => '1F61F'), array('iOS2' => '','iOS5' => '๐Ÿ˜ฆ','iOS7' => '','Hex' => '1F626'), array('iOS2' => '','iOS5' => '๐Ÿ˜ง','iOS7' => '','Hex' => '1F627'), array('iOS2' => '','iOS5' => '๐Ÿ˜ˆ','iOS7' => '','Hex' => '1F608'), array('iOS2' => '','iOS5' => '๐Ÿ‘ฟ','iOS7' => '','Hex' => '1F47F'), array('iOS2' => '','iOS5' => '๐Ÿ˜ฎ','iOS7' => '','Hex' => '1F62E'), array('iOS2' => '','iOS5' => '๐Ÿ˜ฌ','iOS7' => '','Hex' => '1F62C'), array('iOS2' => '','iOS5' => '๐Ÿ˜','iOS7' => '','Hex' => '1F610'), array('iOS2' => '','iOS5' => '๐Ÿ˜•','iOS7' => '','Hex' => '1F615'), array('iOS2' => '','iOS5' => '๐Ÿ˜ฏ','iOS7' => '','Hex' => '1F62F'), array('iOS2' => '','iOS5' => '๐Ÿ˜ถ','iOS7' => '','Hex' => '1F636'), array('iOS2' => '','iOS5' => '๐Ÿ˜‡','iOS7' => '','Hex' => '1F607'), array('iOS2' => '','iOS5' => '๐Ÿ˜','iOS7' => '','Hex' => '1F60F'), array('iOS2' => '','iOS5' => '๐Ÿ˜‘','iOS7' => '','Hex' => '1F611'), array('iOS2' => '','iOS5' => '๐Ÿ‘ฒ','iOS7' => '','Hex' => '1F472'), array('iOS2' => '','iOS5' => '๐Ÿ‘ณ','iOS7' => '','Hex' => '1F473'), array('iOS2' => '','iOS5' => '๐Ÿ‘ฎ','iOS7' => '','Hex' => '1F46E'), array('iOS2' => '','iOS5' => '๐Ÿ‘ท','iOS7' => '','Hex' => '1F477'), array('iOS2' => '','iOS5' => '๐Ÿ’‚','iOS7' => '','Hex' => '1F482'), array('iOS2' => '','iOS5' => '๐Ÿ‘ถ','iOS7' => '','Hex' => '1F476'), array('iOS2' => '','iOS5' => '๐Ÿ‘ฆ','iOS7' => '','Hex' => '1F466'), array('iOS2' => '','iOS5' => '๐Ÿ‘ง','iOS7' => '','Hex' => '1F467'), array('iOS2' => '','iOS5' => '๐Ÿ‘จ','iOS7' => '','Hex' => '1F468'), array('iOS2' => '','iOS5' => '๐Ÿ‘ฉ','iOS7' => '','Hex' => '1F469'), array('iOS2' => '','iOS5' => '๐Ÿ‘ด','iOS7' => '','Hex' => '1F474'), array('iOS2' => '','iOS5' => '๐Ÿ‘ต','iOS7' => '','Hex' => '1F475'), array('iOS2' => '','iOS5' => '๐Ÿ‘ฑ','iOS7' => '','Hex' => '1F471'), array('iOS2' => '','iOS5' => '๐Ÿ‘ผ','iOS7' => '','Hex' => '1F47C'), array('iOS2' => '','iOS5' => '๐Ÿ‘ธ','iOS7' => '','Hex' => '1F478'), array('iOS2' => '','iOS5' => '๐Ÿ˜บ','iOS7' => '','Hex' => '1F63A'), array('iOS2' => '','iOS5' => '๐Ÿ˜ธ','iOS7' => '','Hex' => '1F638'), array('iOS2' => '','iOS5' => '๐Ÿ˜ป','iOS7' => '','Hex' => '1F63B'), array('iOS2' => '','iOS5' => '๐Ÿ˜ฝ','iOS7' => '','Hex' => '1F63D'), array('iOS2' => '','iOS5' => '๐Ÿ˜ผ','iOS7' => '','Hex' => '1F63C'), array('iOS2' => '','iOS5' => '๐Ÿ™€','iOS7' => '','Hex' => '1F640'), array('iOS2' => '','iOS5' => '๐Ÿ˜ฟ','iOS7' => '','Hex' => '1F63F'), array('iOS2' => '','iOS5' => '๐Ÿ˜น','iOS7' => '','Hex' => '1F639'), array('iOS2' => '','iOS5' => '๐Ÿ˜พ','iOS7' => '','Hex' => '1F63E'), array('iOS2' => '','iOS5' => '๐Ÿ‘น','iOS7' => '','Hex' => '1F479'), array('iOS2' => '','iOS5' => '๐Ÿ‘บ','iOS7' => '','Hex' => '1F47A'), array('iOS2' => '','iOS5' => '๐Ÿ™ˆ','iOS7' => '','Hex' => '1F648'), array('iOS2' => '','iOS5' => '๐Ÿ™‰','iOS7' => '','Hex' => '1F649'), array('iOS2' => '','iOS5' => '๐Ÿ™Š','iOS7' => '','Hex' => '1F64A'), array('iOS2' => '','iOS5' => '๐Ÿ’€','iOS7' => '','Hex' => '1F480'), array('iOS2' => '','iOS5' => '๐Ÿ‘ฝ','iOS7' => '','Hex' => '1F47D'), array('iOS2' => '','iOS5' => '๐Ÿ’ฉ','iOS7' => '','Hex' => '1F4A9'), array('iOS2' => '','iOS5' => '๐Ÿ”ฅ','iOS7' => '','Hex' => '1F525'), array('iOS2' => '','iOS5' => 'โœจ','iOS7' => '','Hex' => '2728'), array('iOS2' => '','iOS5' => '๐ŸŒŸ','iOS7' => '','Hex' => '1F31F'), array('iOS2' => '','iOS5' => '๐Ÿ’ซ','iOS7' => '','Hex' => '1F4AB'), array('iOS2' => '','iOS5' => '๐Ÿ’ฅ','iOS7' => '','Hex' => '1F4A5'), array('iOS2' => '','iOS5' => '๐Ÿ’ข','iOS7' => '','Hex' => '1F4A2'), array('iOS2' => '','iOS5' => '๐Ÿ’ฆ','iOS7' => '','Hex' => '1F4A6'), array('iOS2' => '','iOS5' => '๐Ÿ’ง','iOS7' => '','Hex' => '1F4A7'), array('iOS2' => '','iOS5' => '๐Ÿ’ค','iOS7' => '','Hex' => '1F4A4'), array('iOS2' => '','iOS5' => '๐Ÿ’จ','iOS7' => '','Hex' => '1F4A8'), array('iOS2' => '','iOS5' => '๐Ÿ‘‚','iOS7' => '','Hex' => '1F442'), array('iOS2' => '','iOS5' => '๐Ÿ‘€','iOS7' => '','Hex' => '1F440'), array('iOS2' => '','iOS5' => '๐Ÿ‘ƒ','iOS7' => '','Hex' => '1F443'), array('iOS2' => '','iOS5' => '๐Ÿ‘…','iOS7' => '','Hex' => '1F445'), array('iOS2' => '','iOS5' => '๐Ÿ‘„','iOS7' => '','Hex' => '1F444'), array('iOS2' => '','iOS5' => '๐Ÿ‘','iOS7' => '','Hex' => '1F44D'), array('iOS2' => '','iOS5' => '๐Ÿ‘Ž','iOS7' => '','Hex' => '1F44E'), array('iOS2' => '','iOS5' => '๐Ÿ‘Œ','iOS7' => '','Hex' => '1F44C'), array('iOS2' => '','iOS5' => '๐Ÿ‘Š','iOS7' => '','Hex' => '1F44A'), array('iOS2' => '','iOS5' => 'โœŠ','iOS7' => '','Hex' => '270A'), array('iOS2' => '','iOS5' => 'โœŒ','iOS7' => 'โœŒ๏ธ','Hex' => '270C'), array('iOS2' => '','iOS5' => '๐Ÿ‘‹','iOS7' => '','Hex' => '1F44B'), array('iOS2' => '','iOS5' => 'โœ‹','iOS7' => '','Hex' => '270B'), array('iOS2' => '','iOS5' => '๐Ÿ‘','iOS7' => '','Hex' => '1F450'), array('iOS2' => '','iOS5' => '๐Ÿ‘†','iOS7' => '','Hex' => '1F446'), array('iOS2' => '','iOS5' => '๐Ÿ‘‡','iOS7' => '','Hex' => '1F447'), array('iOS2' => '','iOS5' => '๐Ÿ‘‰','iOS7' => '','Hex' => '1F449'), array('iOS2' => '','iOS5' => '๐Ÿ‘ˆ','iOS7' => '','Hex' => '1F448'), array('iOS2' => '','iOS5' => '๐Ÿ™Œ','iOS7' => '','Hex' => '1F64C'), array('iOS2' => '','iOS5' => '๐Ÿ™','iOS7' => '','Hex' => '1F64F'), array('iOS2' => '','iOS5' => 'โ˜','iOS7' => 'โ˜๏ธ','Hex' => '261D'), array('iOS2' => '','iOS5' => '๐Ÿ‘','iOS7' => '','Hex' => '1F44F'), array('iOS2' => '','iOS5' => '๐Ÿ’ช','iOS7' => '','Hex' => '1F4AA'), array('iOS2' => '','iOS5' => '๐Ÿšถ','iOS7' => '','Hex' => '1F6B6'), array('iOS2' => '','iOS5' => '๐Ÿƒ','iOS7' => '','Hex' => '1F3C3'), array('iOS2' => '','iOS5' => '๐Ÿ’ƒ','iOS7' => '','Hex' => '1F483'), array('iOS2' => '','iOS5' => '๐Ÿ‘ซ','iOS7' => '','Hex' => '1F46B'), array('iOS2' => '','iOS5' => '๐Ÿ‘ช','iOS7' => '','Hex' => '1F46A'), array('iOS2' => '','iOS5' => '๐Ÿ‘ฌ','iOS7' => '','Hex' => '1F46C'), array('iOS2' => '','iOS5' => '๐Ÿ‘ญ','iOS7' => '','Hex' => '1F46D'), array('iOS2' => '','iOS5' => '๐Ÿ’','iOS7' => '','Hex' => '1F48F'), array('iOS2' => '','iOS5' => '๐Ÿ’‘','iOS7' => '','Hex' => '1F491'), array('iOS2' => '','iOS5' => '๐Ÿ‘ฏ','iOS7' => '','Hex' => '1F46F'), array('iOS2' => '','iOS5' => '๐Ÿ™†','iOS7' => '','Hex' => '1F646'), array('iOS2' => '','iOS5' => '๐Ÿ™…','iOS7' => '','Hex' => '1F645'), array('iOS2' => '','iOS5' => '๐Ÿ’','iOS7' => '','Hex' => '1F481'), array('iOS2' => '','iOS5' => '๐Ÿ™‹','iOS7' => '','Hex' => '1F64B'), array('iOS2' => '','iOS5' => '๐Ÿ’†','iOS7' => '','Hex' => '1F486'), array('iOS2' => '','iOS5' => '๐Ÿ’‡','iOS7' => '','Hex' => '1F487'), array('iOS2' => '','iOS5' => '๐Ÿ’…','iOS7' => '','Hex' => '1F485'), array('iOS2' => '','iOS5' => '๐Ÿ‘ฐ','iOS7' => '','Hex' => '1F470'), array('iOS2' => '','iOS5' => '๐Ÿ™Ž','iOS7' => '','Hex' => '1F64E'), array('iOS2' => '','iOS5' => '๐Ÿ™','iOS7' => '','Hex' => '1F64D'), array('iOS2' => '','iOS5' => '๐Ÿ™‡','iOS7' => '','Hex' => '1F647'), array('iOS2' => '','iOS5' => '๐ŸŽฉ','iOS7' => '','Hex' => '1F3A9'), array('iOS2' => '','iOS5' => '๐Ÿ‘‘','iOS7' => '','Hex' => '1F451'), array('iOS2' => '','iOS5' => '๐Ÿ‘’','iOS7' => '','Hex' => '1F452'), array('iOS2' => '','iOS5' => '๐Ÿ‘Ÿ','iOS7' => '','Hex' => '1F45F'), array('iOS2' => '','iOS5' => '๐Ÿ‘ž','iOS7' => '','Hex' => '1F45E'), array('iOS2' => '','iOS5' => '๐Ÿ‘ก','iOS7' => '','Hex' => '1F461'), array('iOS2' => '','iOS5' => '๐Ÿ‘ ','iOS7' => '','Hex' => '1F460'), array('iOS2' => '','iOS5' => '๐Ÿ‘ข','iOS7' => '','Hex' => '1F462'), array('iOS2' => '','iOS5' => '๐Ÿ‘•','iOS7' => '','Hex' => '1F455'), array('iOS2' => '','iOS5' => '๐Ÿ‘”','iOS7' => '','Hex' => '1F454'), array('iOS2' => '','iOS5' => '๐Ÿ‘š','iOS7' => '','Hex' => '1F45A'), array('iOS2' => '','iOS5' => '๐Ÿ‘—','iOS7' => '','Hex' => '1F457'), array('iOS2' => '','iOS5' => '๐ŸŽฝ','iOS7' => '','Hex' => '1F3BD'), array('iOS2' => '','iOS5' => '๐Ÿ‘–','iOS7' => '','Hex' => '1F456'), array('iOS2' => '','iOS5' => '๐Ÿ‘˜','iOS7' => '','Hex' => '1F458'), array('iOS2' => '','iOS5' => '๐Ÿ‘™','iOS7' => '','Hex' => '1F459'), array('iOS2' => '','iOS5' => '๐Ÿ’ผ','iOS7' => '','Hex' => '1F4BC'), array('iOS2' => '','iOS5' => '๐Ÿ‘œ','iOS7' => '','Hex' => '1F45C'), array('iOS2' => '','iOS5' => '๐Ÿ‘','iOS7' => '','Hex' => '1F45D'), array('iOS2' => '','iOS5' => '๐Ÿ‘›','iOS7' => '','Hex' => '1F45B'), array('iOS2' => '','iOS5' => '๐Ÿ‘“','iOS7' => '','Hex' => '1F453'), array('iOS2' => '','iOS5' => '๐ŸŽ€','iOS7' => '','Hex' => '1F380'), array('iOS2' => '','iOS5' => '๐ŸŒ‚','iOS7' => '','Hex' => '1F302'), array('iOS2' => '','iOS5' => '๐Ÿ’„','iOS7' => '','Hex' => '1F484'), array('iOS2' => '','iOS5' => '๐Ÿ’›','iOS7' => '','Hex' => '1F49B'), array('iOS2' => '','iOS5' => '๐Ÿ’™','iOS7' => '','Hex' => '1F499'), array('iOS2' => '','iOS5' => '๐Ÿ’œ','iOS7' => '','Hex' => '1F49C'), array('iOS2' => '','iOS5' => '๐Ÿ’š','iOS7' => '','Hex' => '1F49A'), array('iOS2' => '','iOS5' => 'โค','iOS7' => 'โค๏ธ','Hex' => '2764'), array('iOS2' => '','iOS5' => '๐Ÿ’”','iOS7' => '','Hex' => '1F494'), array('iOS2' => '','iOS5' => '๐Ÿ’—','iOS7' => '','Hex' => '1F497'), array('iOS2' => '','iOS5' => '๐Ÿ’“','iOS7' => '','Hex' => '1F493'), array('iOS2' => '','iOS5' => '๐Ÿ’•','iOS7' => '','Hex' => '1F495'), array('iOS2' => '','iOS5' => '๐Ÿ’–','iOS7' => '','Hex' => '1F496'), array('iOS2' => '','iOS5' => '๐Ÿ’ž','iOS7' => '','Hex' => '1F49E'), array('iOS2' => '','iOS5' => '๐Ÿ’˜','iOS7' => '','Hex' => '1F498'), array('iOS2' => '','iOS5' => '๐Ÿ’Œ','iOS7' => '','Hex' => '1F48C'), array('iOS2' => '','iOS5' => '๐Ÿ’‹','iOS7' => '','Hex' => '1F48B'), array('iOS2' => '','iOS5' => '๐Ÿ’','iOS7' => '','Hex' => '1F48D'), array('iOS2' => '','iOS5' => '๐Ÿ’Ž','iOS7' => '','Hex' => '1F48E'), array('iOS2' => '','iOS5' => '๐Ÿ‘ค','iOS7' => '','Hex' => '1F464'), array('iOS2' => '','iOS5' => '๐Ÿ‘ฅ','iOS7' => '','Hex' => '1F465'), array('iOS2' => '','iOS5' => '๐Ÿ’ฌ','iOS7' => '','Hex' => '1F4AC'), array('iOS2' => '','iOS5' => '๐Ÿ‘ฃ','iOS7' => '','Hex' => '1F463'), array('iOS2' => '','iOS5' => '๐Ÿ’ญ','iOS7' => '','Hex' => '1F4AD'), array('iOS2' => '','iOS5' => '๐Ÿ ','iOS7' => '','Hex' => '1F3E0'), array('iOS2' => '','iOS5' => '๐Ÿก','iOS7' => '','Hex' => '1F3E1'), array('iOS2' => '','iOS5' => '๐Ÿซ','iOS7' => '','Hex' => '1F3EB'), array('iOS2' => '','iOS5' => '๐Ÿข','iOS7' => '','Hex' => '1F3E2'), array('iOS2' => '','iOS5' => '๐Ÿฃ','iOS7' => '','Hex' => '1F3E3'), array('iOS2' => '','iOS5' => '๐Ÿฅ','iOS7' => '','Hex' => '1F3E5'), array('iOS2' => '','iOS5' => '๐Ÿฆ','iOS7' => '','Hex' => '1F3E6'), array('iOS2' => '','iOS5' => '๐Ÿช','iOS7' => '','Hex' => '1F3EA'), array('iOS2' => '','iOS5' => '๐Ÿฉ','iOS7' => '','Hex' => '1F3E9'), array('iOS2' => '','iOS5' => '๐Ÿจ','iOS7' => '','Hex' => '1F3E8'), array('iOS2' => '','iOS5' => '๐Ÿ’’','iOS7' => '','Hex' => '1F492'), array('iOS2' => '','iOS5' => 'โ›ช','iOS7' => 'โ›ช๏ธ','Hex' => '26EA'), array('iOS2' => '','iOS5' => '๐Ÿฌ','iOS7' => '','Hex' => '1F3EC'), array('iOS2' => '','iOS5' => '๐Ÿค','iOS7' => '','Hex' => '1F3E4'), array('iOS2' => '','iOS5' => '๐ŸŒ‡','iOS7' => '','Hex' => '1F307'), array('iOS2' => '','iOS5' => '๐ŸŒ†','iOS7' => '','Hex' => '1F306'), array('iOS2' => '','iOS5' => '๐Ÿฏ','iOS7' => '','Hex' => '1F3EF'), array('iOS2' => '','iOS5' => '๐Ÿฐ','iOS7' => '','Hex' => '1F3F0'), array('iOS2' => '','iOS5' => 'โ›บ','iOS7' => 'โ›บ๏ธ','Hex' => '26FA'), array('iOS2' => '','iOS5' => '๐Ÿญ','iOS7' => '','Hex' => '1F3ED'), array('iOS2' => '','iOS5' => '๐Ÿ—ผ','iOS7' => '','Hex' => '1F5FC'), array('iOS2' => '','iOS5' => '๐Ÿ—พ','iOS7' => '','Hex' => '1F5FE'), array('iOS2' => '','iOS5' => '๐Ÿ—ป','iOS7' => '','Hex' => '1F5FB'), array('iOS2' => '','iOS5' => '๐ŸŒ„','iOS7' => '','Hex' => '1F304'), array('iOS2' => '','iOS5' => '๐ŸŒ…','iOS7' => '','Hex' => '1F305'), array('iOS2' => '','iOS5' => '๐ŸŒƒ','iOS7' => '','Hex' => '1F303'), array('iOS2' => '','iOS5' => '๐Ÿ—ฝ','iOS7' => '','Hex' => '1F5FD'), array('iOS2' => '','iOS5' => '๐ŸŒ‰','iOS7' => '','Hex' => '1F309'), array('iOS2' => '','iOS5' => '๐ŸŽ ','iOS7' => '','Hex' => '1F3A0'), array('iOS2' => '','iOS5' => '๐ŸŽก','iOS7' => '','Hex' => '1F3A1'), array('iOS2' => '','iOS5' => 'โ›ฒ','iOS7' => 'โ›ฒ๏ธ','Hex' => '26F2'), array('iOS2' => '','iOS5' => '๐ŸŽข','iOS7' => '','Hex' => '1F3A2'), array('iOS2' => '','iOS5' => '๐Ÿšข','iOS7' => '','Hex' => '1F6A2'), array('iOS2' => '','iOS5' => 'โ›ต','iOS7' => 'โ›ต๏ธ','Hex' => '26F5'), array('iOS2' => '','iOS5' => '๐Ÿšค','iOS7' => '','Hex' => '1F6A4'), array('iOS2' => '','iOS5' => '๐Ÿšฃ','iOS7' => '','Hex' => '1F6A3'), array('iOS2' => '','iOS5' => 'โš“','iOS7' => 'โš“๏ธ','Hex' => '2693'), array('iOS2' => '','iOS5' => '๐Ÿš€','iOS7' => '','Hex' => '1F680'), array('iOS2' => '','iOS5' => 'โœˆ','iOS7' => 'โœˆ๏ธ','Hex' => '2708'), array('iOS2' => '','iOS5' => '๐Ÿ’บ','iOS7' => '','Hex' => '1F4BA'), array('iOS2' => '','iOS5' => '๐Ÿš','iOS7' => '','Hex' => '1F681'), array('iOS2' => '','iOS5' => '๐Ÿš‚','iOS7' => '','Hex' => '1F682'), array('iOS2' => '','iOS5' => '๐ŸšŠ','iOS7' => '','Hex' => '1F68A'), array('iOS2' => '','iOS5' => '๐Ÿš‰','iOS7' => '','Hex' => '1F689'), array('iOS2' => '','iOS5' => '๐Ÿšž','iOS7' => '','Hex' => '1F69E'), array('iOS2' => '','iOS5' => '๐Ÿš†','iOS7' => '','Hex' => '1F686'), array('iOS2' => '','iOS5' => '๐Ÿš„','iOS7' => '','Hex' => '1F684'), array('iOS2' => '','iOS5' => '๐Ÿš…','iOS7' => '','Hex' => '1F685'), array('iOS2' => '','iOS5' => '๐Ÿšˆ','iOS7' => '','Hex' => '1F688'), array('iOS2' => '','iOS5' => '๐Ÿš‡','iOS7' => '','Hex' => '1F687'), array('iOS2' => '','iOS5' => '๐Ÿš','iOS7' => '','Hex' => '1F69D'), array('iOS2' => '','iOS5' => '๐Ÿš‹','iOS7' => '','Hex' => '1F68B'), array('iOS2' => '','iOS5' => '๐Ÿšƒ','iOS7' => '','Hex' => '1F683'), array('iOS2' => '','iOS5' => '๐ŸšŽ','iOS7' => '','Hex' => '1F68E'), array('iOS2' => '','iOS5' => '๐ŸšŒ','iOS7' => '','Hex' => '1F68C'), array('iOS2' => '','iOS5' => '๐Ÿš','iOS7' => '','Hex' => '1F68D'), array('iOS2' => '','iOS5' => '๐Ÿš™','iOS7' => '','Hex' => '1F699'), array('iOS2' => '','iOS5' => '๐Ÿš˜','iOS7' => '','Hex' => '1F698'), array('iOS2' => '','iOS5' => '๐Ÿš—','iOS7' => '','Hex' => '1F697'), array('iOS2' => '','iOS5' => '๐Ÿš•','iOS7' => '','Hex' => '1F695'), array('iOS2' => '','iOS5' => '๐Ÿš–','iOS7' => '','Hex' => '1F696'), array('iOS2' => '','iOS5' => '๐Ÿš›','iOS7' => '','Hex' => '1F69B'), array('iOS2' => '','iOS5' => '๐Ÿšš','iOS7' => '','Hex' => '1F69A'), array('iOS2' => '','iOS5' => '๐Ÿšจ','iOS7' => '','Hex' => '1F6A8'), array('iOS2' => '','iOS5' => '๐Ÿš“','iOS7' => '','Hex' => '1F693'), array('iOS2' => '','iOS5' => '๐Ÿš”','iOS7' => '','Hex' => '1F694'), array('iOS2' => '','iOS5' => '๐Ÿš’','iOS7' => '','Hex' => '1F692'), array('iOS2' => '','iOS5' => '๐Ÿš‘','iOS7' => '','Hex' => '1F691'), array('iOS2' => '','iOS5' => '๐Ÿš','iOS7' => '','Hex' => '1F690'), array('iOS2' => '','iOS5' => '๐Ÿšฒ','iOS7' => '','Hex' => '1F6B2'), array('iOS2' => '','iOS5' => '๐Ÿšก','iOS7' => '','Hex' => '1F6A1'), array('iOS2' => '','iOS5' => '๐ŸšŸ','iOS7' => '','Hex' => '1F69F'), array('iOS2' => '','iOS5' => '๐Ÿš ','iOS7' => '','Hex' => '1F6A0'), array('iOS2' => '','iOS5' => '๐Ÿšœ','iOS7' => '','Hex' => '1F69C'), array('iOS2' => '','iOS5' => '๐Ÿ’ˆ','iOS7' => '','Hex' => '1F488'), array('iOS2' => '','iOS5' => '๐Ÿš','iOS7' => '','Hex' => '1F68F'), array('iOS2' => '','iOS5' => '๐ŸŽซ','iOS7' => '','Hex' => '1F3AB'), array('iOS2' => '','iOS5' => '๐Ÿšฆ','iOS7' => '','Hex' => '1F6A6'), array('iOS2' => '','iOS5' => '๐Ÿšฅ','iOS7' => '','Hex' => '1F6A5'), array('iOS2' => '','iOS5' => 'โš ','iOS7' => 'โš ๏ธ','Hex' => '26A0'), array('iOS2' => '','iOS5' => '๐Ÿšง','iOS7' => '','Hex' => '1F6A7'), array('iOS2' => '','iOS5' => '๐Ÿ”ฐ','iOS7' => '','Hex' => '1F530'), array('iOS2' => '','iOS5' => 'โ›ฝ','iOS7' => 'โ›ฝ๏ธ','Hex' => '26FD'), array('iOS2' => '','iOS5' => '๐Ÿฎ','iOS7' => '','Hex' => '1F3EE'), array('iOS2' => '','iOS5' => '๐ŸŽฐ','iOS7' => '','Hex' => '1F3B0'), array('iOS2' => '','iOS5' => 'โ™จ','iOS7' => 'โ™จ๏ธ','Hex' => '2668'), array('iOS2' => '','iOS5' => '๐Ÿ—ฟ','iOS7' => '','Hex' => '1F5FF'), array('iOS2' => '','iOS5' => '๐ŸŽช','iOS7' => '','Hex' => '1F3AA'), array('iOS2' => '','iOS5' => '๐ŸŽญ','iOS7' => '','Hex' => '1F3AD'), array('iOS2' => '','iOS5' => '๐Ÿ“','iOS7' => '','Hex' => '1F4CD'), array('iOS2' => '','iOS5' => '๐Ÿšฉ','iOS7' => '','Hex' => '1F6A9'), array('iOS2' => '','iOS5' => '๐Ÿ‡ฏ๐Ÿ‡ต','iOS7' => '','Hex' => '1F1EF_1F1F5'), array('iOS2' => '','iOS5' => '๐Ÿ‡ฐ๐Ÿ‡ท','iOS7' => '','Hex' => '1F1F0_1F1F7'), array('iOS2' => '','iOS5' => '๐Ÿ‡ฉ๐Ÿ‡ช','iOS7' => '','Hex' => '1F1E9_1F1EA'), array('iOS2' => '','iOS5' => '๐Ÿ‡จ๐Ÿ‡ณ','iOS7' => '','Hex' => '1F1E8_1F1F3'), array('iOS2' => '','iOS5' => '๐Ÿ‡บ๐Ÿ‡ธ','iOS7' => '','Hex' => '1F1FA_1F1F8'), array('iOS2' => '','iOS5' => '๐Ÿ‡ซ๐Ÿ‡ท','iOS7' => '','Hex' => '1F1EB_1F1F7'), array('iOS2' => '','iOS5' => '๐Ÿ‡ช๐Ÿ‡ธ','iOS7' => '','Hex' => '1F1EA_1F1F8'), array('iOS2' => '','iOS5' => '๐Ÿ‡ฎ๐Ÿ‡น','iOS7' => '','Hex' => '1F1EE_1F1F9'), array('iOS2' => '','iOS5' => '๐Ÿ‡ท๐Ÿ‡บ','iOS7' => '','Hex' => '1F1F7_1F1FA'), array('iOS2' => '','iOS5' => '๐Ÿ‡ฌ๐Ÿ‡ง','iOS7' => '','Hex' => '1F1EC_1F1E7'), array('iOS2' => '','iOS5' => '','iOS7' => '','Hex' => ''), array('iOS2' => '','iOS5' => '๐Ÿถ','iOS7' => '','Hex' => '1F436'), array('iOS2' => '','iOS5' => '๐Ÿบ','iOS7' => '','Hex' => '1F43A'), array('iOS2' => '','iOS5' => '๐Ÿฑ','iOS7' => '','Hex' => '1F431'), array('iOS2' => '','iOS5' => '๐Ÿญ','iOS7' => '','Hex' => '1F42D'), array('iOS2' => '','iOS5' => '๐Ÿน','iOS7' => '','Hex' => '1F439'), array('iOS2' => '','iOS5' => '๐Ÿฐ','iOS7' => '','Hex' => '1F430'), array('iOS2' => '','iOS5' => '๐Ÿธ','iOS7' => '','Hex' => '1F438'), array('iOS2' => '','iOS5' => '๐Ÿฏ','iOS7' => '','Hex' => '1F42F'), array('iOS2' => '','iOS5' => '๐Ÿจ','iOS7' => '','Hex' => '1F428'), array('iOS2' => '','iOS5' => '๐Ÿป','iOS7' => '','Hex' => '1F43B'), array('iOS2' => '','iOS5' => '๐Ÿท','iOS7' => '','Hex' => '1F437'), array('iOS2' => '','iOS5' => '๐Ÿฝ','iOS7' => '','Hex' => '1F43D'), array('iOS2' => '','iOS5' => '๐Ÿฎ','iOS7' => '','Hex' => '1F42E'), array('iOS2' => '','iOS5' => '๐Ÿ—','iOS7' => '','Hex' => '1F417'), array('iOS2' => '','iOS5' => '๐Ÿต','iOS7' => '','Hex' => '1F435'), array('iOS2' => '','iOS5' => '๐Ÿ’','iOS7' => '','Hex' => '1F412'), array('iOS2' => '','iOS5' => '๐Ÿด','iOS7' => '','Hex' => '1F434'), array('iOS2' => '','iOS5' => '๐Ÿ‘','iOS7' => '','Hex' => '1F411'), array('iOS2' => '','iOS5' => '๐Ÿ˜','iOS7' => '','Hex' => '1F418'), array('iOS2' => '','iOS5' => '๐Ÿผ','iOS7' => '','Hex' => '1F43C'), array('iOS2' => '','iOS5' => '๐Ÿง','iOS7' => '','Hex' => '1F427'), array('iOS2' => '','iOS5' => '๐Ÿฆ','iOS7' => '','Hex' => '1F426'), array('iOS2' => '','iOS5' => '๐Ÿค','iOS7' => '','Hex' => '1F424'), array('iOS2' => '','iOS5' => '๐Ÿฅ','iOS7' => '','Hex' => '1F425'), array('iOS2' => '','iOS5' => '๐Ÿฃ','iOS7' => '','Hex' => '1F423'), array('iOS2' => '','iOS5' => '๐Ÿ”','iOS7' => '','Hex' => '1F414'), array('iOS2' => '','iOS5' => '๐Ÿ','iOS7' => '','Hex' => '1F40D'), array('iOS2' => '','iOS5' => '๐Ÿข','iOS7' => '','Hex' => '1F422'), array('iOS2' => '','iOS5' => '๐Ÿ›','iOS7' => '','Hex' => '1F41B'), array('iOS2' => '','iOS5' => '๐Ÿ','iOS7' => '','Hex' => '1F41D'), array('iOS2' => '','iOS5' => '๐Ÿœ','iOS7' => '','Hex' => '1F41C'), array('iOS2' => '','iOS5' => '๐Ÿž','iOS7' => '','Hex' => '1F41E'), array('iOS2' => '','iOS5' => '๐ŸŒ','iOS7' => '','Hex' => '1F40C'), array('iOS2' => '','iOS5' => '๐Ÿ™','iOS7' => '','Hex' => '1F419'), array('iOS2' => '','iOS5' => '๐Ÿš','iOS7' => '','Hex' => '1F41A'), array('iOS2' => '','iOS5' => '๐Ÿ ','iOS7' => '','Hex' => '1F420'), array('iOS2' => '','iOS5' => '๐ŸŸ','iOS7' => '','Hex' => '1F41F'), array('iOS2' => '','iOS5' => '๐Ÿฌ','iOS7' => '','Hex' => '1F42C'), array('iOS2' => '','iOS5' => '๐Ÿณ','iOS7' => '','Hex' => '1F433'), array('iOS2' => '','iOS5' => '๐Ÿ‹','iOS7' => '','Hex' => '1F40B'), array('iOS2' => '','iOS5' => '๐Ÿ„','iOS7' => '','Hex' => '1F404'), array('iOS2' => '','iOS5' => '๐Ÿ','iOS7' => '','Hex' => '1F40F'), array('iOS2' => '','iOS5' => '๐Ÿ€','iOS7' => '','Hex' => '1F400'), array('iOS2' => '','iOS5' => '๐Ÿƒ','iOS7' => '','Hex' => '1F403'), array('iOS2' => '','iOS5' => '๐Ÿ…','iOS7' => '','Hex' => '1F405'), array('iOS2' => '','iOS5' => '๐Ÿ‡','iOS7' => '','Hex' => '1F407'), array('iOS2' => '','iOS5' => '๐Ÿ‰','iOS7' => '','Hex' => '1F409'), array('iOS2' => '','iOS5' => '๐ŸŽ','iOS7' => '','Hex' => '1F40E'), array('iOS2' => '','iOS5' => '๐Ÿ','iOS7' => '','Hex' => '1F410'), array('iOS2' => '','iOS5' => '๐Ÿ“','iOS7' => '','Hex' => '1F413'), array('iOS2' => '','iOS5' => '๐Ÿ•','iOS7' => '','Hex' => '1F415'), array('iOS2' => '','iOS5' => '๐Ÿ–','iOS7' => '','Hex' => '1F416'), array('iOS2' => '','iOS5' => '๐Ÿ','iOS7' => '','Hex' => '1F401'), array('iOS2' => '','iOS5' => '๐Ÿ‚','iOS7' => '','Hex' => '1F402'), array('iOS2' => '','iOS5' => '๐Ÿฒ','iOS7' => '','Hex' => '1F432'), array('iOS2' => '','iOS5' => '๐Ÿก','iOS7' => '','Hex' => '1F421'), array('iOS2' => '','iOS5' => '๐ŸŠ','iOS7' => '','Hex' => '1F40A'), array('iOS2' => '','iOS5' => '๐Ÿซ','iOS7' => '','Hex' => '1F42B'), array('iOS2' => '','iOS5' => '๐Ÿช','iOS7' => '','Hex' => '1F42A'), array('iOS2' => '','iOS5' => '๐Ÿ†','iOS7' => '','Hex' => '1F406'), array('iOS2' => '','iOS5' => '๐Ÿˆ','iOS7' => '','Hex' => '1F408'), array('iOS2' => '','iOS5' => '๐Ÿฉ','iOS7' => '','Hex' => '1F429'), array('iOS2' => '','iOS5' => '๐Ÿพ','iOS7' => '','Hex' => '1F43E'), array('iOS2' => '','iOS5' => '๐Ÿ’','iOS7' => '','Hex' => '1F490'), array('iOS2' => '','iOS5' => '๐ŸŒธ','iOS7' => '','Hex' => '1F338'), array('iOS2' => '','iOS5' => '๐ŸŒท','iOS7' => '','Hex' => '1F337'), array('iOS2' => '','iOS5' => '๐Ÿ€','iOS7' => '','Hex' => '1F340'), array('iOS2' => '','iOS5' => '๐ŸŒน','iOS7' => '','Hex' => '1F339'), array('iOS2' => '','iOS5' => '๐ŸŒป','iOS7' => '','Hex' => '1F33B'), array('iOS2' => '','iOS5' => '๐ŸŒบ','iOS7' => '','Hex' => '1F33A'), array('iOS2' => '','iOS5' => '๐Ÿ','iOS7' => '','Hex' => '1F341'), array('iOS2' => '','iOS5' => '๐Ÿƒ','iOS7' => '','Hex' => '1F343'), array('iOS2' => '','iOS5' => '๐Ÿ‚','iOS7' => '','Hex' => '1F342'), array('iOS2' => '','iOS5' => '๐ŸŒฟ','iOS7' => '','Hex' => '1F33F'), array('iOS2' => '','iOS5' => '๐ŸŒพ','iOS7' => '','Hex' => '1F33E'), array('iOS2' => '','iOS5' => '๐Ÿ„','iOS7' => '','Hex' => '1F344'), array('iOS2' => '','iOS5' => '๐ŸŒต','iOS7' => '','Hex' => '1F335'), array('iOS2' => '','iOS5' => '๐ŸŒด','iOS7' => '','Hex' => '1F334'), array('iOS2' => '','iOS5' => '๐ŸŒฒ','iOS7' => '','Hex' => '1F332'), array('iOS2' => '','iOS5' => '๐ŸŒณ','iOS7' => '','Hex' => '1F333'), array('iOS2' => '','iOS5' => '๐ŸŒฐ','iOS7' => '','Hex' => '1F330'), array('iOS2' => '','iOS5' => '๐ŸŒฑ','iOS7' => '','Hex' => '1F331'), array('iOS2' => '','iOS5' => '๐ŸŒผ','iOS7' => '','Hex' => '1F33C'), array('iOS2' => '','iOS5' => '๐ŸŒ','iOS7' => '','Hex' => '1F310'), array('iOS2' => '','iOS5' => '๐ŸŒž','iOS7' => '','Hex' => '1F31E'), array('iOS2' => '','iOS5' => '๐ŸŒ','iOS7' => '','Hex' => '1F31D'), array('iOS2' => '','iOS5' => '๐ŸŒš','iOS7' => '','Hex' => '1F31A'), array('iOS2' => '','iOS5' => '๐ŸŒ‘','iOS7' => '','Hex' => '1F311'), array('iOS2' => '','iOS5' => '๐ŸŒ’','iOS7' => '','Hex' => '1F312'), array('iOS2' => '','iOS5' => '๐ŸŒ“','iOS7' => '','Hex' => '1F313'), array('iOS2' => '','iOS5' => '๐ŸŒ”','iOS7' => '','Hex' => '1F314'), array('iOS2' => '','iOS5' => '๐ŸŒ•','iOS7' => '','Hex' => '1F315'), array('iOS2' => '','iOS5' => '๐ŸŒ–','iOS7' => '','Hex' => '1F316'), array('iOS2' => '','iOS5' => '๐ŸŒ—','iOS7' => '','Hex' => '1F317'), array('iOS2' => '','iOS5' => '๐ŸŒ˜','iOS7' => '','Hex' => '1F318'), array('iOS2' => '','iOS5' => '๐ŸŒœ','iOS7' => '','Hex' => '1F31C'), array('iOS2' => '','iOS5' => '๐ŸŒ›','iOS7' => '','Hex' => '1F31B'), array('iOS2' => '','iOS5' => '๐ŸŒ™','iOS7' => '','Hex' => '1F319'), array('iOS2' => '','iOS5' => '๐ŸŒ','iOS7' => '','Hex' => '1F30D'), array('iOS2' => '','iOS5' => '๐ŸŒŽ','iOS7' => '','Hex' => '1F30E'), array('iOS2' => '','iOS5' => '๐ŸŒ','iOS7' => '','Hex' => '1F30F'), array('iOS2' => '','iOS5' => '๐ŸŒ‹','iOS7' => '','Hex' => '1F30B'), array('iOS2' => '','iOS5' => '๐ŸŒŒ','iOS7' => '','Hex' => '1F30C'), array('iOS2' => '','iOS5' => '๐ŸŒ ','iOS7' => '','Hex' => '1F320'), array('iOS2' => '','iOS5' => 'โญ','iOS7' => 'โญ๏ธ','Hex' => '2B50'), array('iOS2' => '','iOS5' => 'โ˜€','iOS7' => 'โ˜€๏ธ','Hex' => '2600'), array('iOS2' => '','iOS5' => 'โ›…','iOS7' => 'โ›…๏ธ','Hex' => '26C5'), array('iOS2' => '','iOS5' => 'โ˜','iOS7' => 'โ˜๏ธ','Hex' => '2601'), array('iOS2' => '','iOS5' => 'โšก','iOS7' => 'โšก๏ธ','Hex' => '26A1'), array('iOS2' => '','iOS5' => 'โ˜”','iOS7' => 'โ˜”๏ธ','Hex' => '2614'), array('iOS2' => '','iOS5' => 'โ„','iOS7' => 'โ„๏ธ','Hex' => '2744'), array('iOS2' => '','iOS5' => 'โ›„','iOS7' => 'โ›„๏ธ','Hex' => '26C4'), array('iOS2' => '','iOS5' => '๐ŸŒ€','iOS7' => '๐ŸŒ€','Hex' => '1F300'), array('iOS2' => '','iOS5' => '๐ŸŒ','iOS7' => '','Hex' => '1F301'), array('iOS2' => '','iOS5' => '๐ŸŒˆ','iOS7' => '','Hex' => '1F308'), array('iOS2' => '','iOS5' => '๐ŸŒŠ','iOS7' => '','Hex' => '1F30A'), array('iOS2' => '','iOS5' => '๐ŸŽ','iOS7' => '','Hex' => '1F38D'), array('iOS2' => '','iOS5' => '๐Ÿ’','iOS7' => '','Hex' => '1F49D'), array('iOS2' => '','iOS5' => '๐ŸŽŽ','iOS7' => '','Hex' => '1F38E'), array('iOS2' => '','iOS5' => '๐ŸŽ’','iOS7' => '','Hex' => '1F392'), array('iOS2' => '','iOS5' => '๐ŸŽ“','iOS7' => '','Hex' => '1F393'), array('iOS2' => '','iOS5' => '๐ŸŽ','iOS7' => '','Hex' => '1F38F'), array('iOS2' => '','iOS5' => '๐ŸŽ†','iOS7' => '','Hex' => '1F386'), array('iOS2' => '','iOS5' => '๐ŸŽ‡','iOS7' => '','Hex' => '1F387'), array('iOS2' => '','iOS5' => '๐ŸŽ','iOS7' => '','Hex' => '1F390'), array('iOS2' => '','iOS5' => '๐ŸŽ‘','iOS7' => '','Hex' => '1F391'), array('iOS2' => '','iOS5' => '๐ŸŽƒ','iOS7' => '','Hex' => '1F383'), array('iOS2' => '','iOS5' => '๐Ÿ‘ป','iOS7' => '','Hex' => '1F47B'), array('iOS2' => '','iOS5' => '๐ŸŽ…','iOS7' => '','Hex' => '1F385'), array('iOS2' => '','iOS5' => '๐ŸŽ„','iOS7' => '','Hex' => '1F384'), array('iOS2' => '','iOS5' => '๐ŸŽ','iOS7' => '','Hex' => '1F381'), array('iOS2' => '','iOS5' => '๐ŸŽ‹','iOS7' => '','Hex' => '1F38B'), array('iOS2' => '','iOS5' => '๐ŸŽ‰','iOS7' => '','Hex' => '1F389'), array('iOS2' => '','iOS5' => '๐ŸŽŠ','iOS7' => '','Hex' => '1F38A'), array('iOS2' => '','iOS5' => '๐ŸŽˆ','iOS7' => '','Hex' => '1F388'), array('iOS2' => '','iOS5' => '๐ŸŽŒ','iOS7' => '','Hex' => '1F38C'), array('iOS2' => '','iOS5' => '๐Ÿ”ฎ','iOS7' => '','Hex' => '1F52E'), array('iOS2' => '','iOS5' => '๐ŸŽฅ','iOS7' => '','Hex' => '1F3A5'), array('iOS2' => '','iOS5' => '๐Ÿ“ท','iOS7' => '','Hex' => '1F4F7'), array('iOS2' => '','iOS5' => '๐Ÿ“น','iOS7' => '','Hex' => '1F4F9'), array('iOS2' => '','iOS5' => '๐Ÿ“ผ','iOS7' => '','Hex' => '1F4FC'), array('iOS2' => '','iOS5' => '๐Ÿ’ฟ','iOS7' => '','Hex' => '1F4BF'), array('iOS2' => '','iOS5' => '๐Ÿ“€','iOS7' => '','Hex' => '1F4C0'), array('iOS2' => '','iOS5' => '๐Ÿ’ฝ','iOS7' => '','Hex' => '1F4BD'), array('iOS2' => '','iOS5' => '๐Ÿ’พ','iOS7' => '','Hex' => '1F4BE'), array('iOS2' => '','iOS5' => '๐Ÿ’ป','iOS7' => '','Hex' => '1F4BB'), array('iOS2' => '','iOS5' => '๐Ÿ“ฑ','iOS7' => '','Hex' => '1F4F1'), array('iOS2' => '','iOS5' => 'โ˜Ž','iOS7' => 'โ˜Ž๏ธ','Hex' => '260E'), array('iOS2' => '','iOS5' => '๐Ÿ“ž','iOS7' => '','Hex' => '1F4DE'), array('iOS2' => '','iOS5' => '๐Ÿ“Ÿ','iOS7' => '','Hex' => '1F4DF'), array('iOS2' => '','iOS5' => '๐Ÿ“ ','iOS7' => '','Hex' => '1F4E0'), array('iOS2' => '','iOS5' => '๐Ÿ“ก','iOS7' => '','Hex' => '1F4E1'), array('iOS2' => '','iOS5' => '๐Ÿ“บ','iOS7' => '','Hex' => '1F4FA'), array('iOS2' => '','iOS5' => '๐Ÿ“ป','iOS7' => '','Hex' => '1F4FB'), array('iOS2' => '','iOS5' => '๐Ÿ”Š','iOS7' => '','Hex' => '1F50A'), array('iOS2' => '','iOS5' => '๐Ÿ”‰','iOS7' => '','Hex' => '1F509'), array('iOS2' => '','iOS5' => '๐Ÿ”ˆ','iOS7' => '','Hex' => '1F508'), array('iOS2' => '','iOS5' => '๐Ÿ”‡','iOS7' => '','Hex' => '1F507'), array('iOS2' => '','iOS5' => '๐Ÿ””','iOS7' => '','Hex' => '1F514'), array('iOS2' => '','iOS5' => '๐Ÿ”•','iOS7' => '','Hex' => '1F515'), array('iOS2' => '','iOS5' => '๐Ÿ“ข','iOS7' => '','Hex' => '1F4E2'), array('iOS2' => '','iOS5' => '๐Ÿ“ฃ','iOS7' => '','Hex' => '1F4E3'), array('iOS2' => '','iOS5' => 'โณ','iOS7' => '','Hex' => '23F3'), array('iOS2' => '','iOS5' => 'โŒ›','iOS7' => 'โŒ›๏ธ','Hex' => '231B'), array('iOS2' => '','iOS5' => 'โฐ','iOS7' => 'โฐ','Hex' => '23F0'), array('iOS2' => '','iOS5' => 'โŒš','iOS7' => 'โŒš๏ธ','Hex' => '231A'), array('iOS2' => '','iOS5' => '๐Ÿ”“','iOS7' => '','Hex' => '1F513'), array('iOS2' => '','iOS5' => '๐Ÿ”’','iOS7' => '','Hex' => '1F512'), array('iOS2' => '','iOS5' => '๐Ÿ”','iOS7' => '','Hex' => '1F50F'), array('iOS2' => '','iOS5' => '๐Ÿ”','iOS7' => '','Hex' => '1F510'), array('iOS2' => '','iOS5' => '๐Ÿ”‘','iOS7' => '','Hex' => '1F511'), array('iOS2' => '','iOS5' => '๐Ÿ”Ž','iOS7' => '','Hex' => '1F50E'), array('iOS2' => '','iOS5' => '๐Ÿ’ก','iOS7' => '','Hex' => '1F4A1'), array('iOS2' => '','iOS5' => '๐Ÿ”ฆ','iOS7' => '','Hex' => '1F526'), array('iOS2' => '','iOS5' => '๐Ÿ”†','iOS7' => '','Hex' => '1F506'), array('iOS2' => '','iOS5' => '๐Ÿ”…','iOS7' => '','Hex' => '1F505'), array('iOS2' => '','iOS5' => '๐Ÿ”Œ','iOS7' => '','Hex' => '1F50C'), array('iOS2' => '','iOS5' => '๐Ÿ”‹','iOS7' => '','Hex' => '1F50B'), array('iOS2' => '','iOS5' => '๐Ÿ”','iOS7' => '','Hex' => '1F50D'), array('iOS2' => '','iOS5' => '๐Ÿ›','iOS7' => '','Hex' => '1F6C1'), array('iOS2' => '','iOS5' => '๐Ÿ›€','iOS7' => '','Hex' => '1F6C0'), array('iOS2' => '','iOS5' => '๐Ÿšฟ','iOS7' => '','Hex' => '1F6BF'), array('iOS2' => '','iOS5' => '๐Ÿšฝ','iOS7' => '','Hex' => '1F6BD'), array('iOS2' => '','iOS5' => '๐Ÿ”ง','iOS7' => '','Hex' => '1F527'), array('iOS2' => '','iOS5' => '๐Ÿ”ฉ','iOS7' => '','Hex' => '1F529'), array('iOS2' => '','iOS5' => '๐Ÿ”จ','iOS7' => '','Hex' => '1F528'), array('iOS2' => '','iOS5' => '๐Ÿšช','iOS7' => '','Hex' => '1F6AA'), array('iOS2' => '','iOS5' => '๐Ÿšฌ','iOS7' => '','Hex' => '1F6AC'), array('iOS2' => '','iOS5' => '๐Ÿ’ฃ','iOS7' => '','Hex' => '1F4A3'), array('iOS2' => '','iOS5' => '๐Ÿ”ซ','iOS7' => '','Hex' => '1F52B'), array('iOS2' => '','iOS5' => '๐Ÿ”ช','iOS7' => '','Hex' => '1F52A'), array('iOS2' => '','iOS5' => '๐Ÿ’Š','iOS7' => '','Hex' => '1F48A'), array('iOS2' => '','iOS5' => '๐Ÿ’‰','iOS7' => '','Hex' => '1F489'), array('iOS2' => '','iOS5' => '๐Ÿ’ฐ','iOS7' => '','Hex' => '1F4B0'), array('iOS2' => '','iOS5' => '๐Ÿ’ด','iOS7' => '','Hex' => '1F4B4'), array('iOS2' => '','iOS5' => '๐Ÿ’ต','iOS7' => '','Hex' => '1F4B5'), array('iOS2' => '','iOS5' => '๐Ÿ’ท','iOS7' => '','Hex' => '1F4B7'), array('iOS2' => '','iOS5' => '๐Ÿ’ถ','iOS7' => '','Hex' => '1F4B6'), array('iOS2' => '','iOS5' => '๐Ÿ’ณ','iOS7' => '','Hex' => '1F4B3'), array('iOS2' => '','iOS5' => '๐Ÿ’ธ','iOS7' => '','Hex' => '1F4B8'), array('iOS2' => '','iOS5' => '๐Ÿ“ฒ','iOS7' => '','Hex' => '1F4F2'), array('iOS2' => '','iOS5' => '๐Ÿ“ง','iOS7' => '','Hex' => '1F4E7'), array('iOS2' => '','iOS5' => '๐Ÿ“ฅ','iOS7' => '','Hex' => '1F4E5'), array('iOS2' => '','iOS5' => '๐Ÿ“ค','iOS7' => '','Hex' => '1F4E4'), array('iOS2' => '','iOS5' => 'โœ‰','iOS7' => 'โœ‰๏ธ','Hex' => '2709'), array('iOS2' => '','iOS5' => '๐Ÿ“ฉ','iOS7' => '','Hex' => '1F4E9'), array('iOS2' => '','iOS5' => '๐Ÿ“จ','iOS7' => '','Hex' => '1F4E8'), array('iOS2' => '','iOS5' => '๐Ÿ“ฏ','iOS7' => '','Hex' => '1F4EF'), array('iOS2' => '','iOS5' => '๐Ÿ“ซ','iOS7' => '','Hex' => '1F4EB'), array('iOS2' => '','iOS5' => '๐Ÿ“ช','iOS7' => '','Hex' => '1F4EA'), array('iOS2' => '','iOS5' => '๐Ÿ“ฌ','iOS7' => '','Hex' => '1F4EC'), array('iOS2' => '','iOS5' => '๐Ÿ“ญ','iOS7' => '','Hex' => '1F4ED'), array('iOS2' => '','iOS5' => '๐Ÿ“ฎ','iOS7' => '','Hex' => '1F4EE'), array('iOS2' => '','iOS5' => '๐Ÿ“ฆ','iOS7' => '','Hex' => '1F4E6'), array('iOS2' => '','iOS5' => '๐Ÿ“','iOS7' => '','Hex' => '1F4DD'), array('iOS2' => '','iOS5' => '๐Ÿ“„','iOS7' => '','Hex' => '1F4C4'), array('iOS2' => '','iOS5' => '๐Ÿ“ƒ','iOS7' => '','Hex' => '1F4C3'), array('iOS2' => '','iOS5' => '๐Ÿ“‘','iOS7' => '','Hex' => '1F4D1'), array('iOS2' => '','iOS5' => '๐Ÿ“Š','iOS7' => '','Hex' => '1F4CA'), array('iOS2' => '','iOS5' => '๐Ÿ“ˆ','iOS7' => '','Hex' => '1F4C8'), array('iOS2' => '','iOS5' => '๐Ÿ“‰','iOS7' => '','Hex' => '1F4C9'), array('iOS2' => '','iOS5' => '๐Ÿ“œ','iOS7' => '','Hex' => '1F4DC'), array('iOS2' => '','iOS5' => '๐Ÿ“‹','iOS7' => '','Hex' => '1F4CB'), array('iOS2' => '','iOS5' => '๐Ÿ“…','iOS7' => '','Hex' => '1F4C5'), array('iOS2' => '','iOS5' => '๐Ÿ“†','iOS7' => '','Hex' => '1F4C6'), array('iOS2' => '','iOS5' => '๐Ÿ“‡','iOS7' => '','Hex' => '1F4C7'), array('iOS2' => '','iOS5' => '๐Ÿ“','iOS7' => '','Hex' => '1F4C1'), array('iOS2' => '','iOS5' => '๐Ÿ“‚','iOS7' => '','Hex' => '1F4C2'), array('iOS2' => '','iOS5' => 'โœ‚','iOS7' => 'โœ‚๏ธ','Hex' => '2702'), array('iOS2' => '','iOS5' => '๐Ÿ“Œ','iOS7' => '','Hex' => '1F4CC'), array('iOS2' => '','iOS5' => '๐Ÿ“Ž','iOS7' => '','Hex' => '1F4CE'), array('iOS2' => '','iOS5' => 'โœ’','iOS7' => 'โœ’๏ธ','Hex' => '2712'), array('iOS2' => '','iOS5' => 'โœ','iOS7' => 'โœ๏ธ','Hex' => '270F'), array('iOS2' => '','iOS5' => '๐Ÿ“','iOS7' => '','Hex' => '1F4CF'), array('iOS2' => '','iOS5' => '๐Ÿ“','iOS7' => '','Hex' => '1F4D0'), array('iOS2' => '','iOS5' => '๐Ÿ“•','iOS7' => '','Hex' => '1F4D5'), array('iOS2' => '','iOS5' => '๐Ÿ“—','iOS7' => '','Hex' => '1F4D7'), array('iOS2' => '','iOS5' => '๐Ÿ“˜','iOS7' => '','Hex' => '1F4D8'), array('iOS2' => '','iOS5' => '๐Ÿ“™','iOS7' => '','Hex' => '1F4D9'), array('iOS2' => '','iOS5' => '๐Ÿ““','iOS7' => '','Hex' => '1F4D3'), array('iOS2' => '','iOS5' => '๐Ÿ“”','iOS7' => '','Hex' => '1F4D4'), array('iOS2' => '','iOS5' => '๐Ÿ“’','iOS7' => '','Hex' => '1F4D2'), array('iOS2' => '','iOS5' => '๐Ÿ“š','iOS7' => '','Hex' => '1F4DA'), array('iOS2' => '','iOS5' => '๐Ÿ“–','iOS7' => '','Hex' => '1F4D6'), array('iOS2' => '','iOS5' => '๐Ÿ”–','iOS7' => '','Hex' => '1F516'), array('iOS2' => '','iOS5' => '๐Ÿ“›','iOS7' => '','Hex' => '1F4DB'), array('iOS2' => '','iOS5' => '๐Ÿ”ฌ','iOS7' => '','Hex' => '1F52C'), array('iOS2' => '','iOS5' => '๐Ÿ”ญ','iOS7' => '','Hex' => '1F52D'), array('iOS2' => '','iOS5' => '๐Ÿ“ฐ','iOS7' => '','Hex' => '1F4F0'), array('iOS2' => '','iOS5' => '๐ŸŽจ','iOS7' => '','Hex' => '1F3A8'), array('iOS2' => '','iOS5' => '๐ŸŽฌ','iOS7' => '','Hex' => '1F3AC'), array('iOS2' => '','iOS5' => '๐ŸŽค','iOS7' => '','Hex' => '1F3A4'), array('iOS2' => '','iOS5' => '๐ŸŽง','iOS7' => '','Hex' => '1F3A7'), array('iOS2' => '','iOS5' => '๐ŸŽผ','iOS7' => '','Hex' => '1F3BC'), array('iOS2' => '','iOS5' => '๐ŸŽต','iOS7' => '','Hex' => '1F3B5'), array('iOS2' => '','iOS5' => '๐ŸŽถ','iOS7' => '','Hex' => '1F3B6'), array('iOS2' => '','iOS5' => '๐ŸŽน','iOS7' => '','Hex' => '1F3B9'), array('iOS2' => '','iOS5' => '๐ŸŽป','iOS7' => '','Hex' => '1F3BB'), array('iOS2' => '','iOS5' => '๐ŸŽบ','iOS7' => '','Hex' => '1F3BA'), array('iOS2' => '','iOS5' => '๐ŸŽท','iOS7' => '','Hex' => '1F3B7'), array('iOS2' => '','iOS5' => '๐ŸŽธ','iOS7' => '','Hex' => '1F3B8'), array('iOS2' => '','iOS5' => '๐Ÿ‘พ','iOS7' => '','Hex' => '1F47E'), array('iOS2' => '','iOS5' => '๐ŸŽฎ','iOS7' => '','Hex' => '1F3AE'), array('iOS2' => '','iOS5' => '๐Ÿƒ','iOS7' => '','Hex' => '1F0CF'), array('iOS2' => '','iOS5' => '๐ŸŽด','iOS7' => '','Hex' => '1F3B4'), array('iOS2' => '','iOS5' => '๐Ÿ€„','iOS7' => '๐Ÿ€„๏ธ','Hex' => '1F004'), array('iOS2' => '','iOS5' => '๐ŸŽฒ','iOS7' => '','Hex' => '1F3B2'), array('iOS2' => '','iOS5' => '๐ŸŽฏ','iOS7' => '','Hex' => '1F3AF'), array('iOS2' => '','iOS5' => '๐Ÿˆ','iOS7' => '','Hex' => '1F3C8'), array('iOS2' => '','iOS5' => '๐Ÿ€','iOS7' => '','Hex' => '1F3C0'), array('iOS2' => '','iOS5' => 'โšฝ','iOS7' => 'โšฝ๏ธ','Hex' => '26BD'), array('iOS2' => '','iOS5' => 'โšพ','iOS7' => 'โšพ๏ธ','Hex' => '26BE'), array('iOS2' => '','iOS5' => '๐ŸŽพ','iOS7' => '','Hex' => '1F3BE'), array('iOS2' => '','iOS5' => '๐ŸŽฑ','iOS7' => '','Hex' => '1F3B1'), array('iOS2' => '','iOS5' => '๐Ÿ‰','iOS7' => '','Hex' => '1F3C9'), array('iOS2' => '','iOS5' => '๐ŸŽณ','iOS7' => '','Hex' => '1F3B3'), array('iOS2' => '','iOS5' => 'โ›ณ','iOS7' => 'โ›ณ๏ธ','Hex' => '26F3'), array('iOS2' => '','iOS5' => '๐Ÿšต','iOS7' => '','Hex' => '1F6B5'), array('iOS2' => '','iOS5' => '๐Ÿšด','iOS7' => '','Hex' => '1F6B4'), array('iOS2' => '','iOS5' => '๐Ÿ','iOS7' => '','Hex' => '1F3C1'), array('iOS2' => '','iOS5' => '๐Ÿ‡','iOS7' => '','Hex' => '1F3C7'), array('iOS2' => '','iOS5' => '๐Ÿ†','iOS7' => '','Hex' => '1F3C6'), array('iOS2' => '','iOS5' => '๐ŸŽฟ','iOS7' => '','Hex' => '1F3BF'), array('iOS2' => '','iOS5' => '๐Ÿ‚','iOS7' => '','Hex' => '1F3C2'), array('iOS2' => '','iOS5' => '๐ŸŠ','iOS7' => '','Hex' => '1F3CA'), array('iOS2' => '','iOS5' => '๐Ÿ„','iOS7' => '','Hex' => '1F3C4'), array('iOS2' => '','iOS5' => '๐ŸŽฃ','iOS7' => '','Hex' => '1F3A3'), array('iOS2' => '','iOS5' => 'โ˜•','iOS7' => 'โ˜•๏ธ','Hex' => '2615'), array('iOS2' => '','iOS5' => '๐Ÿต','iOS7' => '','Hex' => '1F375'), array('iOS2' => '','iOS5' => '๐Ÿถ','iOS7' => '','Hex' => '1F376'), array('iOS2' => '','iOS5' => '๐Ÿผ','iOS7' => '','Hex' => '1F37C'), array('iOS2' => '','iOS5' => '๐Ÿบ','iOS7' => '','Hex' => '1F37A'), array('iOS2' => '','iOS5' => '๐Ÿป','iOS7' => '','Hex' => '1F37B'), array('iOS2' => '','iOS5' => '๐Ÿธ','iOS7' => '','Hex' => '1F378'), array('iOS2' => '','iOS5' => '๐Ÿน','iOS7' => '','Hex' => '1F379'), array('iOS2' => '','iOS5' => '๐Ÿท','iOS7' => '','Hex' => '1F377'), array('iOS2' => '','iOS5' => '๐Ÿด','iOS7' => '','Hex' => '1F374'), array('iOS2' => '','iOS5' => '๐Ÿ•','iOS7' => '','Hex' => '1F355'), array('iOS2' => '','iOS5' => '๐Ÿ”','iOS7' => '','Hex' => '1F354'), array('iOS2' => '','iOS5' => '๐ŸŸ','iOS7' => '','Hex' => '1F35F'), array('iOS2' => '','iOS5' => '๐Ÿ—','iOS7' => '','Hex' => '1F357'), array('iOS2' => '','iOS5' => '๐Ÿ–','iOS7' => '','Hex' => '1F356'), array('iOS2' => '','iOS5' => '๐Ÿ','iOS7' => '','Hex' => '1F35D'), array('iOS2' => '','iOS5' => '๐Ÿ›','iOS7' => '','Hex' => '1F35B'), array('iOS2' => '','iOS5' => '๐Ÿค','iOS7' => '','Hex' => '1F364'), array('iOS2' => '','iOS5' => '๐Ÿฑ','iOS7' => '','Hex' => '1F371'), array('iOS2' => '','iOS5' => '๐Ÿฃ','iOS7' => '','Hex' => '1F363'), array('iOS2' => '','iOS5' => '๐Ÿฅ','iOS7' => '','Hex' => '1F365'), array('iOS2' => '','iOS5' => '๐Ÿ™','iOS7' => '','Hex' => '1F359'), array('iOS2' => '','iOS5' => '๐Ÿ˜','iOS7' => '','Hex' => '1F358'), array('iOS2' => '','iOS5' => '๐Ÿš','iOS7' => '','Hex' => '1F35A'), array('iOS2' => '','iOS5' => '๐Ÿœ','iOS7' => '','Hex' => '1F35C'), array('iOS2' => '','iOS5' => '๐Ÿฒ','iOS7' => '','Hex' => '1F372'), array('iOS2' => '','iOS5' => '๐Ÿข','iOS7' => '','Hex' => '1F362'), array('iOS2' => '','iOS5' => '๐Ÿก','iOS7' => '','Hex' => '1F361'), array('iOS2' => '','iOS5' => '๐Ÿณ','iOS7' => '','Hex' => '1F373'), array('iOS2' => '','iOS5' => '๐Ÿž','iOS7' => '','Hex' => '1F35E'), array('iOS2' => '','iOS5' => '๐Ÿฉ','iOS7' => '','Hex' => '1F369'), array('iOS2' => '','iOS5' => '๐Ÿฎ','iOS7' => '','Hex' => '1F36E'), array('iOS2' => '','iOS5' => '๐Ÿฆ','iOS7' => '','Hex' => '1F366'), array('iOS2' => '','iOS5' => '๐Ÿจ','iOS7' => '','Hex' => '1F368'), array('iOS2' => '','iOS5' => '๐Ÿง','iOS7' => '','Hex' => '1F367'), array('iOS2' => '','iOS5' => '๐ŸŽ‚','iOS7' => '','Hex' => '1F382'), array('iOS2' => '','iOS5' => '๐Ÿฐ','iOS7' => '','Hex' => '1F370'), array('iOS2' => '','iOS5' => '๐Ÿช','iOS7' => '','Hex' => '1F36A'), array('iOS2' => '','iOS5' => '๐Ÿซ','iOS7' => '','Hex' => '1F36B'), array('iOS2' => '','iOS5' => '๐Ÿฌ','iOS7' => '','Hex' => '1F36C'), array('iOS2' => '','iOS5' => '๐Ÿญ','iOS7' => '','Hex' => '1F36D'), array('iOS2' => '','iOS5' => '๐Ÿฏ','iOS7' => '','Hex' => '1F36F'), array('iOS2' => '','iOS5' => '๐ŸŽ','iOS7' => '','Hex' => '1F34E'), array('iOS2' => '','iOS5' => '๐Ÿ','iOS7' => '','Hex' => '1F34F'), array('iOS2' => '','iOS5' => '๐ŸŠ','iOS7' => '','Hex' => '1F34A'), array('iOS2' => '','iOS5' => '๐Ÿ‹','iOS7' => '','Hex' => '1F34B'), array('iOS2' => '','iOS5' => '๐Ÿ’','iOS7' => '','Hex' => '1F352'), array('iOS2' => '','iOS5' => '๐Ÿ‡','iOS7' => '','Hex' => '1F347'), array('iOS2' => '','iOS5' => '๐Ÿ‰','iOS7' => '','Hex' => '1F349'), array('iOS2' => '','iOS5' => '๐Ÿ“','iOS7' => '','Hex' => '1F353'), array('iOS2' => '','iOS5' => '๐Ÿ‘','iOS7' => '','Hex' => '1F351'), array('iOS2' => '','iOS5' => '๐Ÿˆ','iOS7' => '','Hex' => '1F348'), array('iOS2' => '','iOS5' => '๐ŸŒ','iOS7' => '','Hex' => '1F34C'), array('iOS2' => '','iOS5' => '๐Ÿ','iOS7' => '','Hex' => '1F350'), array('iOS2' => '','iOS5' => '๐Ÿ','iOS7' => '','Hex' => '1F34D'), array('iOS2' => '','iOS5' => '๐Ÿ ','iOS7' => '','Hex' => '1F360'), array('iOS2' => '','iOS5' => '๐Ÿ†','iOS7' => '','Hex' => '1F346'), array('iOS2' => '','iOS5' => '๐Ÿ…','iOS7' => '','Hex' => '1F345'), array('iOS2' => '','iOS5' => '๐ŸŒฝ','iOS7' => '','Hex' => '1F33D'), array('iOS2' => '','iOS5' => '1โƒฃ','iOS7' => '','Hex' => '0031_20E3'), array('iOS2' => '','iOS5' => '2โƒฃ','iOS7' => '','Hex' => '0032_20E3'), array('iOS2' => '','iOS5' => '3โƒฃ','iOS7' => '','Heex' => '0034_20E3'), array('iOS2' => '','iOS5' => '2โƒฃ','iOS7' => '','Hex' => '0032_20E3'), array('iOS2' => '','iOS5' => '0โƒฃ','iOS7' => '','Hex' => '0030_20E3'), array('iOS2' => '','iOS5' => '5โƒฃ','iOS7' => '','Hex' => '0035_20E3'), array('iOS2' => '','iOS5' => '6โƒฃ','iOS7' => '','Hex' => '0036_20E3'), array('iOS2' => '','iOS5' => '7โƒฃ','iOS7' => '','Hex' => '0037_20E3'), array('iOS2' => '','iOS5' => '8โƒฃ','iOS7' => '','Hex' => '0038_20E3'), array('iOS2' => '','iOS5' => '9โƒฃ','iOS7' => '','Hex' => '0039_20E3'), array('iOS2' => '','iOS5' => '๐Ÿ”Ÿ','iOS7' => '','Hex' => '1F51F'), array('iOS2' => '','iOS5' => '๐Ÿ”ข','iOS7' => '','Hex' => '1F522'), array('iOS2' => '','iOS5' => '#โƒฃ','iOS7' => '','Hex' => '0023_20E3'), array('iOS2' => '','iOS5' => '๐Ÿ”ฃ','iOS7' => '','Hex' => '1F523'), array('iOS2' => '','iOS5' => 'โฌ†','iOS7' => 'โฌ†๏ธ','Hex' => '2B06'), array('iOS2' => '','iOS5' => 'โฌ‡','iOS7' => 'โฌ‡๏ธ','Hex' => '2B07'), array('iOS2' => '','iOS5' => 'โฌ…','iOS7' => 'โฌ…๏ธ','Hex' => '2B05'), array('iOS2' => '','iOS5' => 'โžก','iOS7' => 'โžก๏ธ','Hex' => '27A1'), array('iOS2' => '','iOS5' => '๐Ÿ” ','iOS7' => '','Hex' => '1F520'), array('iOS2' => '','iOS5' => '๐Ÿ”ก','iOS7' => '','Hex' => '1F521'), array('iOS2' => '','iOS5' => '๐Ÿ”ค','iOS7' => '','Hex' => '1F524'), array('iOS2' => '','iOS5' => 'โ†—','iOS7' => 'โ†—๏ธ','Hex' => '2197'), array('iOS2' => '','iOS5' => 'โ†–','iOS7' => 'โ†–๏ธ','Hex' => '2196'), array('iOS2' => '','iOS5' => 'โ†˜','iOS7' => 'โ†˜๏ธ','Hex' => '2198'), array('iOS2' => '','iOS5' => 'โ†™','iOS7' => 'โ†™๏ธ','Hex' => '2199'), array('iOS2' => '','iOS5' => 'โ†”','iOS7' => 'โ†”๏ธ','Hex' => '2194'), array('iOS2' => '','iOS5' => 'โ†•','iOS7' => 'โ†•๏ธ','Hex' => '2195'), array('iOS2' => '','iOS5' => '๐Ÿ”„','iOS7' => '','Hex' => '1F504'), array('iOS2' => '','iOS5' => 'โ—€','iOS7' => 'โ—€๏ธ','Hex' => '25C0'), array('iOS2' => '','iOS5' => 'โ–ถ','iOS7' => 'โ–ถ๏ธ','Hex' => '25B6'), array('iOS2' => '','iOS5' => '๐Ÿ”ผ','iOS7' => '','Hex' => '1F53C'), array('iOS2' => '','iOS5' => '๐Ÿ”ฝ','iOS7' => '','Hex' => '1F53D'), array('iOS2' => '','iOS5' => 'โ†ฉ','iOS7' => 'โ†ฉ๏ธ','Hex' => '21A9'), array('iOS2' => '','iOS5' => 'โ†ช','iOS7' => 'โ†ช๏ธ','Hex' => '21AA'), array('iOS2' => '','iOS5' => 'โ„น','iOS7' => 'โ„น๏ธ','Hex' => '2139'), array('iOS2' => '','iOS5' => 'โช','iOS7' => '','Hex' => '23EA'), array('iOS2' => '','iOS5' => 'โฉ','iOS7' => '','Hex' => '23E9'), array('iOS2' => '','iOS5' => 'โซ','iOS7' => '','Hex' => '23EB'), array('iOS2' => '','iOS5' => 'โฌ','iOS7' => '','Hex' => '23EC'), array('iOS2' => '','iOS5' => 'โคต','iOS7' => 'โคต๏ธ','Hex' => '2935'), array('iOS2' => '','iOS5' => 'โคด','iOS7' => 'โคด๏ธ','Hex' => '2934'), array('iOS2' => '','iOS5' => '๐Ÿ†—','iOS7' => '','Hex' => '1F197'), array('iOS2' => '','iOS5' => '๐Ÿ”€','iOS7' => '','Hex' => '1F500'), array('iOS2' => '','iOS5' => '๐Ÿ”','iOS7' => '','Hex' => '1F501'), array('iOS2' => '','iOS5' => '๐Ÿ”‚','iOS7' => '','Hex' => '1F502'), array('iOS2' => '','iOS5' => '๐Ÿ†•','iOS7' => '','Hex' => '1F195'), array('iOS2' => '','iOS5' => '๐Ÿ†™','iOS7' => '','Hex' => '1F199'), array('iOS2' => '','iOS5' => '๐Ÿ†’','iOS7' => '','Hex' => '1F192'), array('iOS2' => '','iOS5' => '๐Ÿ†“','iOS7' => '','Hex' => '1F193'), array('iOS2' => '','iOS5' => '๐Ÿ†–','iOS7' => '','Hex' => '1F196'), array('iOS2' => '','iOS5' => '๐Ÿ“ถ','iOS7' => '','Hex' => '1F4F6'), array('iOS2' => '','iOS5' => '๐ŸŽฆ','iOS7' => '','Hex' => '1F3A6'), array('iOS2' => '','iOS5' => '๐Ÿˆ','iOS7' => '','Hex' => '1F201'), array('iOS2' => '','iOS5' => '๐Ÿˆฏ','iOS7' => '๐Ÿˆฏ๏ธ','Hex' => '1F22F'), array('iOS2' => '','iOS5' => '๐Ÿˆณ','iOS7' => '','Hex' => '1F233'), array('iOS2' => '','iOS5' => '๐Ÿˆต','iOS7' => '','Hex' => '1F235'), array('iOS2' => '','iOS5' => '๐Ÿˆด','iOS7' => '','Hex' => '1F234'), array('iOS2' => '','iOS5' => '๐Ÿˆฒ','iOS7' => '','Hex' => '1F232'), array('iOS2' => '','iOS5' => '๐Ÿ‰','iOS7' => '','Hex' => '1F250'), array('iOS2' => '','iOS5' => '๐Ÿˆน','iOS7' => '','Hex' => '1F239'), array('iOS2' => '','iOS5' => '๐Ÿˆบ','iOS7' => '','Hex' => '1F23A'), array('iOS2' => '','iOS5' => '๐Ÿˆถ','iOS7' => '','Hex' => '1F236'), array('iOS2' => '','iOS5' => '๐Ÿˆš','iOS7' => '๐Ÿˆš๏ธ','Hex' => '1F21A'), array('iOS2' => '','iOS5' => '๐Ÿšป','iOS7' => '','Hex' => '1F6BB'), array('iOS2' => '','iOS5' => '๐Ÿšน','iOS7' => '','Hex' => '1F6B9'), array('iOS2' => '','iOS5' => '๐Ÿšบ','iOS7' => '','Hex' => '1F6BA'), array('iOS2' => '','iOS5' => '๐Ÿšผ','iOS7' => '','Hex' => '1F6BC'), array('iOS2' => '','iOS5' => '๐Ÿšพ','iOS7' => '','Hex' => '1F6BE'), array('iOS2' => '','iOS5' => '๐Ÿšฐ','iOS7' => '','Hex' => '1F6B0'), array('iOS2' => '','iOS5' => '๐Ÿšฎ','iOS7' => '','Hex' => '1F6AE'), array('iOS2' => '','iOS5' => '๐Ÿ…ฟ','iOS7' => '๐Ÿ…ฟ๏ธ','Hex' => '1F17F'), array('iOS2' => '','iOS5' => 'โ™ฟ','iOS7' => 'โ™ฟ๏ธ','Hex' => '267F'), array('iOS2' => '','iOS5' => '๐Ÿšญ','iOS7' => '','Hex' => '1F6AD'), array('iOS2' => '','iOS5' => '๐Ÿˆท','iOS7' => '','Hex' => '1F237'), array('iOS2' => '','iOS5' => '๐Ÿˆธ','iOS7' => '','Hex' => '1F238'), array('iOS2' => '','iOS5' => '๐Ÿˆ‚','iOS7' => '','Hex' => '1F202'), array('iOS2' => '','iOS5' => 'โ“‚','iOS7' => 'โ“‚๏ธ','Hex' => '24C2'), array('iOS2' => '','iOS5' => '๐Ÿ›‚','iOS7' => '','Hex' => '1F6C2'), array('iOS2' => '','iOS5' => '๐Ÿ›„','iOS7' => '','Hex' => '1F6C4'), array('iOS2' => '','iOS5' => '๐Ÿ›…','iOS7' => '','Hex' => '1F6C5'), array('iOS2' => '','iOS5' => '๐Ÿ›ƒ','iOS7' => '','Hex' => '1F6C3'), array('iOS2' => '','iOS5' => '๐Ÿ‰‘','iOS7' => '','Hex' => '1F251'), array('iOS2' => '','iOS5' => 'ใŠ™','iOS7' => 'ใŠ™๏ธ','Hex' => '3299'), array('iOS2' => '','iOS5' => 'ใŠ—','iOS7' => 'ใŠ—๏ธ','Hex' => '3297'), array('iOS2' => '','iOS5' => '๐Ÿ†‘','iOS7' => '','Hex' => '1F191'), array('iOS2' => '','iOS5' => '๐Ÿ†˜','iOS7' => '','Hex' => '1F198'), array('iOS2' => '','iOS5' => '๐Ÿ†”','iOS7' => '','Hex' => '1F194'), array('iOS2' => '','iOS5' => '๐Ÿšซ','iOS7' => '','Hex' => '1F6AB'), array('iOS2' => '','iOS5' => '๐Ÿ”ž','iOS7' => '','Hex' => '1F51E'), array('iOS2' => '','iOS5' => '๐Ÿ“ต','iOS7' => '','Hex' => '1F4F5'), array('iOS2' => '','iOS5' => '๐Ÿšฏ','iOS7' => '','Hex' => '1F6AF'), array('iOS2' => '','iOS5' => '๐Ÿšฑ','iOS7' => '','Hex' => '1F6B1'), array('iOS2' => '','iOS5' => '๐Ÿšณ','iOS7' => '','Hex' => '1F6B3'), array('iOS2' => '','iOS5' => '๐Ÿšท','iOS7' => '','Hex' => '1F6B7'), array('iOS2' => '','iOS5' => '๐Ÿšธ','iOS7' => '','Hex' => '1F6B8'), array('iOS2' => '','iOS5' => 'โ›”','iOS7' => 'โ›”๏ธ','Hex' => '26D4'), array('iOS2' => '','iOS5' => 'โœณ','iOS7' => 'โœณ๏ธ','Hex' => '2733'), array('iOS2' => '','iOS5' => 'โ‡','iOS7' => 'โ‡๏ธ','Hex' => '2747'), array('iOS2' => '','iOS5' => 'โŽ','iOS7' => '','Hex' => '274E'), array('iOS2' => '','iOS5' => 'โœ…','iOS7' => '','Hex' => '2705'), array('iOS2' => '','iOS5' => 'โœด','iOS7' => 'โœด๏ธ','Hex' => '2734'), array('iOS2' => '','iOS5' => '๐Ÿ’Ÿ','iOS7' => '','Hex' => '1F49F'), array('iOS2' => '','iOS5' => '๐Ÿ†š','iOS7' => '','Hex' => '1F19A'), array('iOS2' => '','iOS5' => '๐Ÿ“ณ','iOS7' => '','Hex' => '1F4F3'), array('iOS2' => '','iOS5' => '๐Ÿ“ด','iOS7' => '','Hex' => '1F4F4'), array('iOS2' => '','iOS5' => '๐Ÿ…ฐ','iOS7' => '','Hex' => '1F170'), array('iOS2' => '','iOS5' => '๐Ÿ…ฑ','iOS7' => '','Hex' => '1F171'), array('iOS2' => '','iOS5' => '๐Ÿ†Ž','iOS7' => '','Hex' => '1F18E'), array('iOS2' => '','iOS5' => '๐Ÿ…พ','iOS7' => '','Hex' => '1F17E'), array('iOS2' => '','iOS5' => '๐Ÿ’ ','iOS7' => '','Hex' => '1F4A0'), array('iOS2' => '','iOS5' => 'โžฟ','iOS7' => '','Hex' => '27BF'), array('iOS2' => '','iOS5' => 'โ™ป','iOS7' => 'โ™ป๏ธ','Hex' => '267B'), array('iOS2' => '','iOS5' => 'โ™ˆ','iOS7' => 'โ™ˆ๏ธ','Hex' => '2648'), array('iOS2' => '','iOS5' => 'โ™‰','iOS7' => 'โ™‰๏ธ','Hex' => '2649'), array('iOS2' => '','iOS5' => 'โ™Š','iOS7' => 'โ™Š๏ธ','Hex' => '264A'), array('iOS2' => '','iOS5' => 'โ™‹','iOS7' => 'โ™‹๏ธ','Hex' => '264B'), array('iOS2' => '','iOS5' => 'โ™Œ','iOS7' => 'โ™Œ๏ธ','Hex' => '264C'), array('iOS2' => '','iOS5' => 'โ™','iOS7' => 'โ™๏ธ','Hex' => '264D'), array('iOS2' => '','iOS5' => 'โ™Ž','iOS7' => 'โ™Ž๏ธ','Hex' => '264E'), array('iOS2' => '','iOS5' => 'โ™','iOS7' => 'โ™๏ธ','Hex' => '264F'), array('iOS2' => '','iOS5' => 'โ™','iOS7' => 'โ™๏ธ','Hex' => '2650'), array('iOS2' => '','iOS5' => 'โ™‘','iOS7' => 'โ™‘๏ธ','Hex' => '2651'), array('iOS2' => '','iOS5' => 'โ™’','iOS7' => 'โ™’๏ธ','Hex' => '2652'), array('iOS2' => '','iOS5' => 'โ™“','iOS7' => 'โ™“๏ธ','Hex' => '2653'), array('iOS2' => '','iOS5' => 'โ›Ž','iOS7' => '','Hex' => '26CE'), array('iOS2' => '','iOS5' => '๐Ÿ”ฏ','iOS7' => '','Hex' => '1F52F'), array('iOS2' => '','iOS5' => '๐Ÿง','iOS7' => '','Hex' => '1F3E7'), array('iOS2' => '','iOS5' => '๐Ÿ’น','iOS7' => '','Hex' => '1F4B9'), array('iOS2' => '','iOS5' => '๐Ÿ’ฒ','iOS7' => '','Hex' => '1F4B2'), array('iOS2' => '','iOS5' => '๐Ÿ’ฑ','iOS7' => '','Hex' => '1F4B1'), array('iOS2' => 'ยฉ','iOS5' => 'ยฉ','iOS7' => '','Hex' => '00A9'), array('iOS2' => 'ยฎ','iOS5' => 'ยฎ','iOS7' => '','Hex' => '00AE'), array('iOS2' => 'โ„ข','iOS5' => 'โ„ข','iOS7' => '','Hex' => '2122'), array('iOS2' => '','iOS5' => 'ใ€ฝ','iOS7' => 'ใ€ฝ๏ธ','Hex' => '303D'), array('iOS2' => '','iOS5' => 'ใ€ฐ','iOS7' => '','Hex' => '3030'), array('iOS2' => '','iOS5' => '๐Ÿ”','iOS7' => '','Hex' => '1F51D'), array('iOS2' => '','iOS5' => '๐Ÿ”š','iOS7' => '','Hex' => '1F51A'), array('iOS2' => '','iOS5' => '๐Ÿ”™','iOS7' => '','Hex' => '1F519'), array('iOS2' => '','iOS5' => '๐Ÿ”›','iOS7' => '','Hex' => '1F51B'), array('iOS2' => '','iOS5' => '๐Ÿ”œ','iOS7' => '','Hex' => '1F51C'), array('iOS2' => '','iOS5' => 'โŒ','iOS7' => '','Hex' => '274C'), array('iOS2' => '','iOS5' => 'โญ•','iOS7' => 'โญ•๏ธ','Hex' => '2B55'), array('iOS2' => '','iOS5' => 'โ—','iOS7' => 'โ—๏ธ','Hex' => '2757'), array('iOS2' => '','iOS5' => 'โ“','iOS7' => '','Hex' => '2753'), array('iOS2' => '','iOS5' => 'โ•','iOS7' => '','Hex' => '2755'), array('iOS2' => '','iOS5' => 'โ”','iOS7' => '','Hex' => '2754'), array('iOS2' => '','iOS5' => '๐Ÿ”ƒ','iOS7' => '','Hex' => '1F503'), array('iOS2' => '','iOS5' => '๐Ÿ•›','iOS7' => '','Hex' => '1F55B'), array('iOS2' => '','iOS5' => '๐Ÿ•ง','iOS7' => '','Hex' => '1F567'), array('iOS2' => '','iOS5' => '๐Ÿ•','iOS7' => '','Hex' => '1F550'), array('iOS2' => '','iOS5' => '๐Ÿ•œ','iOS7' => '','Hex' => '1F55C'), array('iOS2' => '','iOS5' => '๐Ÿ•‘','iOS7' => '','Hex' => '1F551'), array('iOS2' => '','iOS5' => '๐Ÿ•','iOS7' => '','Hex' => '1F55D'), array('iOS2' => '','iOS5' => '๐Ÿ•’','iOS7' => '','Hex' => '1F552'), array('iOS2' => '','iOS5' => '๐Ÿ•ž','iOS7' => '','Hex' => '1F55E'), array('iOS2' => '','iOS5' => '๐Ÿ•“','iOS7' => '','Hex' => '1F553'), array('iOS2' => '','iOS5' => '๐Ÿ•Ÿ','iOS7' => '','Hex' => '1F55F'), array('iOS2' => '','iOS5' => '๐Ÿ•”','iOS7' => '','Hex' => '1F554'), array('iOS2' => '','iOS5' => '๐Ÿ• ','iOS7' => '','Hex' => '1F560'), array('iOS2' => '','iOS5' => '๐Ÿ••','iOS7' => '','Hex' => '1F555'), array('iOS2' => '','iOS5' => '๐Ÿ•–','iOS7' => '','Hex' => '1F556'), array('iOS2' => '','iOS5' => '๐Ÿ•—','iOS7' => '','Hex' => '1F557'), array('iOS2' => '','iOS5' => '๐Ÿ•˜','iOS7' => '','Hex' => '1F558'), array('iOS2' => '','iOS5' => '๐Ÿ•™','iOS7' => '','Hex' => '1F559'), array('iOS2' => '','iOS5' => '๐Ÿ•š','iOS7' => '','Hex' => '1F55A'), array('iOS2' => '','iOS5' => '๐Ÿ•ก','iOS7' => '','Hex' => '1F561'), array('iOS2' => '','iOS5' => '๐Ÿ•ข','iOS7' => '','Hex' => '1F562'), array('iOS2' => '','iOS5' => '๐Ÿ•ฃ','iOS7' => '','Hex' => '1F563'), array('iOS2' => '','iOS5' => '๐Ÿ•ค','iOS7' => '','Hex' => '1F564'), array('iOS2' => '','iOS5' => '๐Ÿ•ฅ','iOS7' => '','Hex' => '1F565'), array('iOS2' => '','iOS5' => '๐Ÿ•ฆ','iOS7' => '','Hex' => '1F566'), array('iOS2' => '','iOS5' => 'โœ–','iOS7' => 'โœ–๏ธ','Hex' => '2716'), array('iOS2' => '','iOS5' => 'โž•','iOS7' => '','Hex' => '2795'), array('iOS2' => '','iOS5' => 'โž–','iOS7' => '','Hex' => '2796'), array('iOS2' => '','iOS5' => 'โž—','iOS7' => '','Hex' => '2797'), array('iOS2' => '','iOS5' => 'โ™ ','iOS7' => 'โ™ ๏ธ','Hex' => '2660'), array('iOS2' => '','iOS5' => 'โ™ฅ','iOS7' => 'โ™ฅ๏ธ','Hex' => '2665'), array('iOS2' => '','iOS5' => 'โ™ฃ','iOS7' => 'โ™ฃ๏ธ','Hex' => '2663'), array('iOS2' => '','iOS5' => 'โ™ฆ','iOS7' => 'โ™ฆ๏ธ','Hex' => '2666'), array('iOS2' => '','iOS5' => '๐Ÿ’ฎ','iOS7' => '','Hex' => '1F4AE'), array('iOS2' => '','iOS5' => '๐Ÿ’ฏ','iOS7' => '','Hex' => '1F4AF'), array('iOS2' => '','iOS5' => 'โœ”','iOS7' => 'โœ”๏ธ','Hex' => '2714'), array('iOS2' => '','iOS5' => 'โ˜‘','iOS7' => 'โ˜‘๏ธ','Hex' => '2611'), array('iOS2' => '','iOS5' => '๐Ÿ”˜','iOS7' => '','Hex' => '1F518'), array('iOS2' => '','iOS5' => '๐Ÿ”—','iOS7' => '','Hex' => '1F517'), array('iOS2' => '','iOS5' => 'โžฐ','iOS7' => '','Hex' => '27B0'), array('iOS2' => '','iOS5' => '๐Ÿ”ฑ','iOS7' => '','Hex' => '1F531'), array('iOS2' => '','iOS5' => '๐Ÿ”ฒ','iOS7' => '','Hex' => '1F532'), array('iOS2' => '','iOS5' => '๐Ÿ”ณ','iOS7' => '','Hex' => '1F533'), array('iOS2' => '','iOS5' => 'โ—ผ','iOS7' => 'โ—ผ๏ธ','Hex' => '25FC'), array('iOS2' => '','iOS5' => 'โ—ป','iOS7' => 'โ—ป๏ธ','Hex' => '25FB'), array('iOS2' => '','iOS5' => 'โ—พ','iOS7' => 'โ—พ๏ธ','Hex' => '25FE'), array('iOS2' => '','iOS5' => 'โ—ฝ','iOS7' => 'โ—ฝ๏ธ','Hex' => '25FD'), array('iOS2' => '','iOS5' => 'โ–ช','iOS7' => 'โ–ช๏ธ','Hex' => '25AA'), array('iOS2' => '','iOS5' => 'โ–ซ','iOS7' => 'โ–ซ๏ธ','Hex' => '25AB'), array('iOS2' => '','iOS5' => '๐Ÿ”บ','iOS7' => '','Hex' => '1F53A'), array('iOS2' => '','iOS5' => 'โฌœ','iOS7' => 'โฌœ๏ธ','Hex' => '2B1C'), array('iOS2' => '','iOS5' => 'โฌ›','iOS7' => 'โฌ›๏ธ','Hex' => '2B1B'), array('iOS2' => '','iOS5' => 'โšซ','iOS7' => 'โšซ๏ธ','Hex' => '26AB'), array('iOS2' => '','iOS5' => 'โšช','iOS7' => 'โšช๏ธ','Hex' => '26AA'), array('iOS2' => '','iOS5' => '๐Ÿ”ด','iOS7' => '','Hex' => '1F534'), array('iOS2' => '','iOS5' => '๐Ÿ”ต','iOS7' => '','Hex' => '1F535'), array('iOS2' => '','iOS5' => '๐Ÿ”ป','iOS7' => '','Hex' => '1F53B'), array('iOS2' => '','iOS5' => '๐Ÿ”ถ','iOS7' => '','Hex' => '1F536'), array('iOS2' => '','iOS5' => '๐Ÿ”ท','iOS7' => '','Hex' => '1F537'), array('iOS2' => '','iOS5' => '๐Ÿ”ธ','iOS7' => '','Hex' => '1F538'), array('iOS2' => '','iOS5' => '๐Ÿ”น','iOS7' => '','Hex' => '1F539'), array('iOS2' => '','iOS5' => 'โ‰','iOS7' => 'โ‰๏ธ','Hex' => '2049'), array('iOS2' => '','iOS5' => 'โ€ผ','iOS7' => 'โ€ผ๏ธ','Hex' => '203C')); } function updateData($nameFile, $WAver, $classesMD5 = "") From d710086da74d312c84972c38368224fce765545d Mon Sep 17 00:00:00 2001 From: mgp25 Date: Tue, 7 Oct 2014 00:38:05 +0200 Subject: [PATCH 004/436] Update README.md --- README.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/README.md b/README.md index 59a6eec3..eba33e52 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,17 @@ Interface to WhatsApp Messenger ---------- +### Update October 7th, 2014 + +This is going to be the official repository of WhatsAPI. We don't support spam and we won't answer issues like "Blocking" or "sending massive messages". + +**Latest updates** +- *Auto token updater: It uses a private server to generate token. When executing API it will check always for newest token, user agent and version.* +- *Identity generation has changed: Now is random_pseudo_bytes, in the WhatsApp object, the value you set in identity is the name of the file where the identity is going to be saved. I recommend to set as identity your phone number.* + + + + ### Update March 15th, 2014 Sources are back after brief downtime due to [DCMA takedown](https://github.com/github/dmca/blob/master/2014-02-12-WhatsApp.md). From 1bef880b6d255f783980fdaeb2cb6bb9b0b3e1c3 Mon Sep 17 00:00:00 2001 From: mgp25 Date: Thu, 9 Oct 2014 00:58:10 +0200 Subject: [PATCH 005/436] 2.11.413 added --- classesMD5.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/classesMD5.txt b/classesMD5.txt index f8d11075..497857d3 100644 --- a/classesMD5.txt +++ b/classesMD5.txt @@ -4,6 +4,9 @@ =============================== +WhatsApp/2.11.413 Android/4.3 Device/GalaxyS3 +zwycjRMDKzScsAoXOVrDKA== + WhatsApp/2.11.407 Android/4.3 Device/GalaxyS3 xOyKd7AoN0uoos7Fkeup5w== From 65ba75b80872e2805c03dfd8ea48f0dd4ac4d0bd Mon Sep 17 00:00:00 2001 From: phpgeeks Date: Sat, 11 Oct 2014 00:19:36 +0200 Subject: [PATCH 006/436] Update classesMD5.txt the latest version --- classesMD5.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/classesMD5.txt b/classesMD5.txt index 497857d3..ca6922c0 100644 --- a/classesMD5.txt +++ b/classesMD5.txt @@ -3,6 +3,8 @@ = B64 ENCODED = =============================== +WhatsApp/2.11.414 Android/4.3 Device/GalaxyS3 +Ania53j5EZJVFR1YgwjiLQ== WhatsApp/2.11.413 Android/4.3 Device/GalaxyS3 zwycjRMDKzScsAoXOVrDKA== From 301543e5b7d6b33e9a4320501fa1200c09b21336 Mon Sep 17 00:00:00 2001 From: mgp25 Date: Sat, 11 Oct 2014 01:08:51 +0200 Subject: [PATCH 007/436] Update stream features Will be updating nodes --- src/whatsprot.class.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index f11fc9ec..9fa5496d 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -1557,7 +1557,11 @@ protected function createAuthResponseNode() */ protected function createFeaturesNode() { - $parent = new ProtocolNode("stream:features", null, null, null); + $readreceipts = new ProtocolNode("readreceipts", null, null, null); + $groupsv2 = new ProtocolNode("groups_v2", null, null, null); + $privacy = new ProtocolNode("privacy", null, null, null); + + $parent = new ProtocolNode("stream:features", null, array($readreceipts, $groupsv2, $privacy), null); return $parent; } From 2a9e9de63d9e09b687c5957e53a13b46b358eafd Mon Sep 17 00:00:00 2001 From: mgp25 Date: Sun, 12 Oct 2014 00:54:12 +0200 Subject: [PATCH 008/436] Update sendGetClientConfig Updated ver to 414 --- src/whatsprot.class.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index 9fa5496d..024dbb06 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -46,8 +46,8 @@ class WhatsProt const WHATSAPP_SERVER = 's.whatsapp.net'; // The hostname used to login/send messages. const WHATSAPP_UPLOAD_HOST = 'https://mms.whatsapp.net/client/iphone/upload.php'; // The upload host. const WHATSAPP_DEVICE = 'Android'; // The device name. - const WHATSAPP_VER = '2.11.407'; // The WhatsApp version. - const WHATSAPP_USER_AGENT = 'WhatsApp/2.11.407 Android/4.3 Device/GalaxyS3'; // User agent used in request/registration code. + const WHATSAPP_VER = '2.11.414'; // The WhatsApp version. + const WHATSAPP_USER_AGENT = 'WhatsApp/2.11.414 Android/4.3 Device/GalaxyS3'; // User agent used in request/registration code. const WHATSAPP_VER_CHECKER = 'http://www.whatsapp.com/android/current/WhatsApp.version'; /** @@ -694,9 +694,10 @@ public function sendClientConfig() public function sendGetClientConfig() { $msgId = $this->createMsgId("sendconfig"); - $child = new ProtocolNode("config", array("xmlns" => "urn:xmpp:whatsapp:push", "sound" => 'sound'), null, null); + $child = new ProtocolNode("config", null, null, null); $node = new ProtocolNode("iq", array( "id" => $msgId, + "xmlns" => "urn:xmpp:whatsapp:push", "type" => "set", "to" => static::WHATSAPP_SERVER ), array($child), null); From c267909ed2351d4f172b239042ec3c2815cb545f Mon Sep 17 00:00:00 2001 From: mgp25 Date: Sun, 12 Oct 2014 00:55:09 +0200 Subject: [PATCH 009/436] 414 classesMd5 --- src/token.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/token.php b/src/token.php index 1d5caf7f..e66e9f05 100755 --- a/src/token.php +++ b/src/token.php @@ -3,7 +3,7 @@ function generateRequestToken($country, $phone) { $signature = "MIIDMjCCAvCgAwIBAgIETCU2pDALBgcqhkjOOAQDBQAwfDELMAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFDASBgNVBAcTC1NhbnRhIENsYXJhMRYwFAYDVQQKEw1XaGF0c0FwcCBJbmMuMRQwEgYDVQQLEwtFbmdpbmVlcmluZzEUMBIGA1UEAxMLQnJpYW4gQWN0b24wHhcNMTAwNjI1MjMwNzE2WhcNNDQwMjE1MjMwNzE2WjB8MQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEUMBIGA1UEBxMLU2FudGEgQ2xhcmExFjAUBgNVBAoTDVdoYXRzQXBwIEluYy4xFDASBgNVBAsTC0VuZ2luZWVyaW5nMRQwEgYDVQQDEwtCcmlhbiBBY3RvbjCCAbgwggEsBgcqhkjOOAQBMIIBHwKBgQD9f1OBHXUSKVLfSpwu7OTn9hG3UjzvRADDHj+AtlEmaUVdQCJR+1k9jVj6v8X1ujD2y5tVbNeBO4AdNG/yZmC3a5lQpaSfn+gEexAiwk+7qdf+t8Yb+DtX58aophUPBPuD9tPFHsMCNVQTWhaRMvZ1864rYdcq7/IiAxmd0UgBxwIVAJdgUI8VIwvMspK5gqLrhAvwWBz1AoGBAPfhoIXWmz3ey7yrXDa4V7l5lK+7+jrqgvlXTAs9B4JnUVlXjrrUWU/mcQcQgYC0SRZxI+hMKBYTt88JMozIpuE8FnqLVHyNKOCjrh4rs6Z1kW6jfwv6ITVi8ftiegEkO8yk8b6oUZCJqIPf4VrlnwaSi2ZegHtVJWQBTDv+z0kqA4GFAAKBgQDRGYtLgWh7zyRtQainJfCpiaUbzjJuhMgo4fVWZIvXHaSHBU1t5w//S0lDK2hiqkj8KpMWGywVov9eZxZy37V26dEqr/c2m5qZ0E+ynSu7sqUD7kGx/zeIcGT0H+KAVgkGNQCo5Uc0koLRWYHNtYoIvt5R3X6YZylbPftF/8ayWTALBgcqhkjOOAQDBQADLwAwLAIUAKYCp0d6z4QQdyN74JDfQ2WCyi8CFDUM4CaNB+ceVXdKtOrNTQcc0e+t"; - $classesMd5 = "xOyKd7AoN0uoos7Fkeup5w=="; // 2.11.407 + $classesMd5 = "Ania53j5EZJVFR1YgwjiLQ=="; // 2.11.414 $key2 = base64_decode("/UIGKU1FVQa+ATM2A0za7G2KI9S/CwPYjgAbc67v7ep42eO/WeTLx1lb1cHwxpsEgF4+PmYpLd2YpGUdX/A2JQitsHzDwgcdBpUf7psX1BU="); $data = base64_decode($signature) . base64_decode($classesMd5) . $phone; From 7063a3de3ef54a785e324fa6d7d40905511e0a3b Mon Sep 17 00:00:00 2001 From: mgp25 Date: Sun, 12 Oct 2014 01:14:24 +0200 Subject: [PATCH 010/436] Fix event Group create --- src/whatsprot.class.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index 024dbb06..f6c69fd4 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -912,6 +912,11 @@ public function sendGroupsChatCreate($subject, $participants = array()) if (count($participants) > 0) { $this->sendGroupsParticipantsAdd($groupId, $participants); } + + $this->eventManager()->fireGroupCreate( + $this->phoneNumber, + $groupId + ); return $groupId; } From 83a7a9b859a12ca121b8de1eaeea33359453a945 Mon Sep 17 00:00:00 2001 From: mgp25 Date: Sun, 12 Oct 2014 01:16:45 +0200 Subject: [PATCH 011/436] Fix event Group create --- src/WhatsAppEvent.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/WhatsAppEvent.php b/src/WhatsAppEvent.php index b291ca6e..093827ef 100755 --- a/src/WhatsAppEvent.php +++ b/src/WhatsAppEvent.php @@ -298,6 +298,16 @@ function fireGetGroups( }; $this->fireCallback($callbackEvent); } + + function fireGroupCreate( + $phone, + $groupList + ) { + $callbackEvent = function(WhatsAppEventListener $listener) use ($phone, $groupList) { + $listener->onGroupsChatCreate($phone, $groupList); + }; + $this->fireCallback($callbackEvent); + } function fireGetGroupsInfo( $phone, From 11f663e7ede4f7e7b2328c59319d498f91844be6 Mon Sep 17 00:00:00 2001 From: mgp25 Date: Sun, 12 Oct 2014 01:51:55 +0200 Subject: [PATCH 012/436] Added register Tool php This is a simple CLI interface to register numbers. --- examples/registerTool.php | 46 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 examples/registerTool.php diff --git a/examples/registerTool.php b/examples/registerTool.php new file mode 100644 index 00000000..0bece324 --- /dev/null +++ b/examples/registerTool.php @@ -0,0 +1,46 @@ +codeRequest(trim($option)); +} +catch(Exception $e) +{ + echo "\nError: $e"; + exit(0); +} + +echo "\n\nEnter the received code: "; +$code = fgets(STDIN); + +try +{ + $w->codeRegister($code); +} +catch(Exception $e) +{ + echo "\Error: $e"; + exit(0); +} From c4c45d180c181076cf7a7d8ad0f563a78be7d7d6 Mon Sep 17 00:00:00 2001 From: mgp25 Date: Sun, 12 Oct 2014 10:11:12 +0200 Subject: [PATCH 013/436] Notification when create a group V2 More fixes may come soon --- src/WhatsAppEvent.php | 422 +++++++++++----------- src/events/WhatsAppEventListener.php | 63 ++-- src/events/WhatsAppEventListenerBase.php | 217 +++++------ src/events/WhatsAppEventListenerProxy.php | 221 +++++------ src/whatsprot.class.php | 10 +- 5 files changed, 488 insertions(+), 445 deletions(-) diff --git a/src/WhatsAppEvent.php b/src/WhatsAppEvent.php index 093827ef..7d2a48ce 100755 --- a/src/WhatsAppEvent.php +++ b/src/WhatsAppEvent.php @@ -14,13 +14,13 @@ class WhatsAppEvent { /** * Contains all of our event listeners. - * + * * Note: This shouldn't be static, and may change in future implementations. - * + * * @var WhatsAppEventListener */ static $event_listeners = array(); - + /** * Constructor. * @@ -35,27 +35,27 @@ function __construct($event = null) /** * Adds the given event listener which will be called back * when events are fired. - * + * * @param WhatsAppEventListener $event_listener */ function addEventListener(WhatsAppEventListener $event_listener) { array_push(self::$event_listeners, $event_listener); - } - + } + /** * Registers an event. * * @param string $event * Name of the event. * - * @deprecated Use addEventListener instead. + * @deprecated Use addEventListener instead. */ protected function register($event) { // To be removed. } - + /** * Binds a callback to a event. * @@ -63,8 +63,8 @@ protected function register($event) * Name of the event. * @param string $callback * The method or function to call. - * - * @deprecated Use addEventListener instead. + * + * @deprecated Use addEventListener instead. */ public function bind($event, $listener) { @@ -79,7 +79,7 @@ public function bind($event, $listener) * Name of the event. * @param array $arguments * The arguments to pass to each callback. - * + * * @deprecated Fire events specifically by name. */ public function fire($event, $arguments = array()) @@ -89,20 +89,20 @@ public function fire($event, $arguments = array()) call_user_func_array(array($event_listener, $event), $arguments); } } - + /** * Fires the callback for each listener. - * + * * @param function $callbackEvent */ private function fireCallback($callbackEvent) { array_map($callbackEvent, self::$event_listeners); } - + // The supported events: - function fireClose( - $phone, - $error + function fireClose( + $phone, + $error ) { $callbackEvent = function(WhatsAppEventListener $listener) use ($phone, $error) { $listener->onClose($phone, $error); @@ -111,194 +111,194 @@ function fireClose( } function fireCodeRegister( - $phone, - $login, - $pw, - $type, - $expiration, - $kind, - $price, - $cost, - $currency, - $price_expiration + $phone, + $login, + $pw, + $type, + $expiration, + $kind, + $price, + $cost, + $currency, + $price_expiration ) { $callbackEvent = function(WhatsAppEventListener $listener) use ($phone, $login, $pw, $type, $expiration, $kind, $price, $cost, $currency, $price_expiration) { $listener->onCodeRegister($phone, $login, $pw, $type, $expiration, $kind, $price, $cost, $currency, $price_expiration); }; - $this->fireCallback($callbackEvent); + $this->fireCallback($callbackEvent); } - + function fireCodeRegisterFailed( - $phone, - $status, - $reason, - $retry_after + $phone, + $status, + $reason, + $retry_after ) { $callbackEvent = function(WhatsAppEventListener $listener) use ($phone, $status, $reason, $retry_after) { $listener->onCodeRegisterFailed($phone, $status, $reason, $retry_after); }; - $this->fireCallback($callbackEvent); + $this->fireCallback($callbackEvent); } - + function fireCodeRequest( - $phone, + $phone, $method, $length ) { - $callbackEvent = function(WhatsAppEventListener $listener) use ($phone, $method, $length) { + $callbackEvent = function(WhatsAppEventListener $listener) use ($phone, $method, $length) { $listener->onCodeRequest($phone, $method, $length); }; - $this->fireCallback($callbackEvent); + $this->fireCallback($callbackEvent); } - + function fireCodeRequestFailed( - $phone, - $method, - $reason, + $phone, + $method, + $reason, $value ) { $callbackEvent = function(WhatsAppEventListener $listener) use ($phone, $method, $reason, $value) { $listener->onCodeRequestFailed($phone, $method, $reason, $value); }; - $this->fireCallback($callbackEvent); + $this->fireCallback($callbackEvent); } - + function fireCodeRequestFailedTooRecent( - $phone, - $method, - $reason, - $retry_after + $phone, + $method, + $reason, + $retry_after ) { - $callbackEvent = function(WhatsAppEventListener $listener) use ($phone, $method, $reason, $retry_after){ + $callbackEvent = function(WhatsAppEventListener $listener) use ($phone, $method, $reason, $retry_after){ $listener->onCodeRequestFailedTooRecent($phone, $method, $reason, $retry_after); }; - $this->fireCallback($callbackEvent); + $this->fireCallback($callbackEvent); } - + function fireConnect( - $phone, - $socket + $phone, + $socket ) { - $callbackEvent = function(WhatsAppEventListener $listener) use ($phone, $socket) { + $callbackEvent = function(WhatsAppEventListener $listener) use ($phone, $socket) { $listener->onConnect($phone, $socket); }; - $this->fireCallback($callbackEvent); + $this->fireCallback($callbackEvent); } - + function fireConnectError( - $phone, - $socket + $phone, + $socket ) { - $callbackEvent = function(WhatsAppEventListener $listener) use ($phone, $socket){ + $callbackEvent = function(WhatsAppEventListener $listener) use ($phone, $socket){ $listener->onConnectError($phone, $socket); }; - $this->fireCallback($callbackEvent); + $this->fireCallback($callbackEvent); } - + function fireCredentialsBad( - $phone, - $status, - $reason + $phone, + $status, + $reason ) { - $callbackEvent = function(WhatsAppEventListener $listener) use ($phone, $status, $reason) { + $callbackEvent = function(WhatsAppEventListener $listener) use ($phone, $status, $reason) { $listener->onCredentialsBad($phone, $status, $reason); }; - $this->fireCallback($callbackEvent); + $this->fireCallback($callbackEvent); } function fireCredentialsGood( - $phone, - $login, - $pw, - $type, - $expiration, - $kind, - $price, - $cost, - $currency, - $price_expiration - ) { - $callbackEvent = function(WhatsAppEventListener $listener) use ($phone, $login, $pw, $type, $expiration, $kind, $price, $cost, $currency, $price_expiration) { + $phone, + $login, + $pw, + $type, + $expiration, + $kind, + $price, + $cost, + $currency, + $price_expiration + ) { + $callbackEvent = function(WhatsAppEventListener $listener) use ($phone, $login, $pw, $type, $expiration, $kind, $price, $cost, $currency, $price_expiration) { $listener->onCredentialsGood($phone, $login, $pw, $type, $expiration, $kind, $price, $cost, $currency, $price_expiration); }; - $this->fireCallback($callbackEvent); + $this->fireCallback($callbackEvent); } function fireDisconnect( - $phone, - $socket + $phone, + $socket ) { - $callbackEvent = function(WhatsAppEventListener $listener) use ($phone, $socket) { + $callbackEvent = function(WhatsAppEventListener $listener) use ($phone, $socket) { $listener->onDisconnect($phone, $socket); }; - $this->fireCallback($callbackEvent); + $this->fireCallback($callbackEvent); } function fireDissectPhone( - $phone, - $country, - $cc, - $mcc, - $lc, - $lg + $phone, + $country, + $cc, + $mcc, + $lc, + $lg ) { $callbackEvent = function(WhatsAppEventListener $listener) use ($phone, $country, $cc, $mcc, $lc, $lg) { $listener->onDissectPhone($phone, $country, $cc, $mcc, $lc, $lg); }; - $this->fireCallback($callbackEvent); + $this->fireCallback($callbackEvent); } function fireDissectPhoneFailed( - $phone + $phone ) { - $callbackEvent = function(WhatsAppEventListener $listener) use ($phone) { + $callbackEvent = function(WhatsAppEventListener $listener) use ($phone) { $listener->onDissectPhoneFailed($phone); }; - $this->fireCallback($callbackEvent); + $this->fireCallback($callbackEvent); } function fireGetAudio( - $phone, - $from, - $msgid, - $type, - $time, - $name, - $size, - $url, - $file, + $phone, + $from, + $msgid, + $type, + $time, + $name, + $size, + $url, + $file, $mimetype, $filehash, $duration, - $acodec + $acodec ) { - $callbackEvent = function(WhatsAppEventListener $listener) use ($phone, $from, $msgid, $type, $time, $name, $size, $url, $file, $mimetype, $filehash, $duration, $acodec) { + $callbackEvent = function(WhatsAppEventListener $listener) use ($phone, $from, $msgid, $type, $time, $name, $size, $url, $file, $mimetype, $filehash, $duration, $acodec) { $listener->onGetAudio($phone, $from, $msgid, $type, $time, $name, $size, $url, $file, $mimetype, $filehash, $duration, $acodec); }; - $this->fireCallback($callbackEvent); + $this->fireCallback($callbackEvent); } function fireGetError( $phone, $id, - $error + $error ) { $callbackEvent = function(WhatsAppEventListener $listener) use ($phone, $id, $error) { $listener->onGetError($phone, $id, $error); }; - $this->fireCallback($callbackEvent); + $this->fireCallback($callbackEvent); } function fireGetGroups( $phone, $groupList ) { - $callbackEvent = function(WhatsAppEventListener $listener) use ($phone, $groupList) { + $callbackEvent = function(WhatsAppEventListener $listener) use ($phone, $groupList) { $listener->onGetGroups($phone, $groupList); }; - $this->fireCallback($callbackEvent); + $this->fireCallback($callbackEvent); } - + function fireGroupCreate( $phone, $groupList @@ -309,29 +309,41 @@ function fireGroupCreate( $this->fireCallback($callbackEvent); } + function fireGroupisCreated( + $phone, + $creator, + $gId, + $subject + ) { + $callbackEvent = function(WhatsAppEventListener $listener) use ($phone, $creator, $gId, $subject) { + $listener->onGroupsChatisCreated($phone, $creator, $gId, $subject); + }; + $this->fireCallback($callbackEvent); + } + function fireGetGroupsInfo( - $phone, + $phone, $groupList ) { - $callbackEvent = function(WhatsAppEventListener $listener) use ($phone, $groupList) { + $callbackEvent = function(WhatsAppEventListener $listener) use ($phone, $groupList) { $listener->onGetGroupsInfo($phone, $groupList); }; - $this->fireCallback($callbackEvent); + $this->fireCallback($callbackEvent); } function fireGetGroupsSubject( - $phone, - $gId, + $phone, + $gId, $time, $author, $participant, $name, $subject ) { - $callbackEvent = function(WhatsAppEventListener $listener) use ($phone, $gId, $time, $author, $participant, $name, $subject) { + $callbackEvent = function(WhatsAppEventListener $listener) use ($phone, $gId, $time, $author, $participant, $name, $subject) { $listener->onGetGroupsSubject($phone, $gId, $time, $author, $participant, $name, $subject); }; - $this->fireCallback($callbackEvent); + $this->fireCallback($callbackEvent); } function fireGetImage( @@ -350,10 +362,10 @@ function fireGetImage( $height, $thumbnail ) { - $callbackEvent = function(WhatsAppEventListener $listener) use ($phone, $from, $msgid, $type, $time, $name, $size, $url, $file, $mimetype, $filehash, $width, $height, $thumbnail) { + $callbackEvent = function(WhatsAppEventListener $listener) use ($phone, $from, $msgid, $type, $time, $name, $size, $url, $file, $mimetype, $filehash, $width, $height, $thumbnail) { $listener->onGetImage($phone, $from, $msgid, $type, $time, $name, $size, $url, $file, $mimetype, $filehash, $width, $height, $thumbnail); }; - $this->fireCallback($callbackEvent); + $this->fireCallback($callbackEvent); } function fireGetLocation( @@ -369,10 +381,10 @@ function fireGetLocation( $url, $thumbnail ) { - $callbackEvent = function(WhatsAppEventListener $listener) use ($phone, $from, $msgid, $type, $time, $name, $place_name, $longitude, $latitude, $url, $thumbnail) { + $callbackEvent = function(WhatsAppEventListener $listener) use ($phone, $from, $msgid, $type, $time, $name, $place_name, $longitude, $latitude, $url, $thumbnail) { $listener->onGetLocation($phone, $from, $msgid, $type, $time, $name, $place_name, $longitude, $latitude, $url, $thumbnail); }; - $this->fireCallback($callbackEvent); + $this->fireCallback($callbackEvent); } function fireGetMessage( @@ -387,7 +399,7 @@ function fireGetMessage( $callbackEvent = function(WhatsAppEventListener $listener) use ($phone, $from, $msgid, $type, $time, $name, $message) { $listener->onGetMessage($phone, $from, $msgid, $type, $time, $name, $message); }; - $this->fireCallback($callbackEvent); + $this->fireCallback($callbackEvent); } function fireGetGroupMessage( @@ -400,39 +412,39 @@ function fireGetGroupMessage( $name, $message ) { - $callbackEvent = function(WhatsAppEventListener $listener) use ($phone, $from, $author, $msgid, $type, $time, $name, $message) { + $callbackEvent = function(WhatsAppEventListener $listener) use ($phone, $from, $author, $msgid, $type, $time, $name, $message) { $listener->onGetGroupMessage($phone, $from, $author, $msgid, $type, $time, $name, $message); }; - $this->fireCallback($callbackEvent); + $this->fireCallback($callbackEvent); } function fireGetGroupParticipants( $phone, $groupId, - $groupList + $groupList ) { - $callbackEvent = function(WhatsAppEventListener $listener) use ($phone, $groupId, $groupList) { + $callbackEvent = function(WhatsAppEventListener $listener) use ($phone, $groupId, $groupList) { $listener->onGetGroupParticipants($phone, $groupId, $groupList); }; - $this->fireCallback($callbackEvent); + $this->fireCallback($callbackEvent); } - + function fireGetPrivacyBlockedList( $phone, $children /* $data, - $onGetProfilePicture, + $onGetProfilePicture, $phone, $from, $type, $thumbnail */ ) { - $callbackEvent = function(WhatsAppEventListener $listener) use ($phone, $children) { + $callbackEvent = function(WhatsAppEventListener $listener) use ($phone, $children) { $listener->onGetPrivacyBlockedList($phone, $children); }; - $this->fireCallback($callbackEvent); + $this->fireCallback($callbackEvent); } function fireGetProfilePicture( @@ -441,12 +453,12 @@ function fireGetProfilePicture( $type, $thumbnail ) { - $callbackEvent = function(WhatsAppEventListener $listener) use ($phone, $from, $type, $thumbnail) { + $callbackEvent = function(WhatsAppEventListener $listener) use ($phone, $from, $type, $thumbnail) { $listener->onGetProfilePicture($phone, $from, $type, $thumbnail); }; - $this->fireCallback($callbackEvent); + $this->fireCallback($callbackEvent); } - + function fireGetRequestLastSeen( $phone, $from, @@ -456,7 +468,7 @@ function fireGetRequestLastSeen( $callbackEvent = function(WhatsAppEventListener $listener) use ($phone, $from, $msgid, $sec) { $listener->onGetRequestLastSeen($phone, $from, $msgid, $sec); }; - $this->fireCallback($callbackEvent); + $this->fireCallback($callbackEvent); } function fireGetServerProperties( @@ -464,12 +476,12 @@ function fireGetServerProperties( $version, $properties ) { - $callbackEvent = function(WhatsAppEventListener $listener) use ($phone, $version, $properties) { + $callbackEvent = function(WhatsAppEventListener $listener) use ($phone, $version, $properties) { $listener->onGetServerProperties($phone, $version, $properties); }; - $this->fireCallback($callbackEvent); + $this->fireCallback($callbackEvent); } - + function fireGetStatus( $phone, $from, @@ -478,12 +490,12 @@ function fireGetStatus( $t, $status ) { - $callbackEvent = function(WhatsAppEventListener $listener) use ($phone, $from, $type, $id, $t, $status) { + $callbackEvent = function(WhatsAppEventListener $listener) use ($phone, $from, $type, $id, $t, $status) { $listener->onGetStatus($phone, $from, $type, $id, $t, $status); }; - $this->fireCallback($callbackEvent); + $this->fireCallback($callbackEvent); } - + function fireGetvCard( $phone, $from, @@ -494,10 +506,10 @@ function fireGetvCard( $contact, $vcard ) { - $callbackEvent = function(WhatsAppEventListener $listener) use ($phone, $from, $msgid, $type, $time, $name, $contact, $vcard){ + $callbackEvent = function(WhatsAppEventListener $listener) use ($phone, $from, $msgid, $type, $time, $name, $contact, $vcard){ $listener->onGetvCard($phone, $from, $msgid, $type, $time, $name, $contact, $vcard); }; - $this->fireCallback($callbackEvent); + $this->fireCallback($callbackEvent); } function fireGetVideo( @@ -517,30 +529,30 @@ function fireGetVideo( $acodec, $thumbnail ) { - $callbackEvent = function(WhatsAppEventListener $listener) use ($phone, $from, $msgid, $type, $time, $name, $url, $file, $size, $mimetype, $filehash, $duration, $vcodec, $acodec, $thumbnail){ + $callbackEvent = function(WhatsAppEventListener $listener) use ($phone, $from, $msgid, $type, $time, $name, $url, $file, $size, $mimetype, $filehash, $duration, $vcodec, $acodec, $thumbnail){ $listener->onGetVideo($phone, $from, $msgid, $type, $time, $name, $url, $file, $size, $mimetype, $filehash, $duration, $vcodec, $acodec, $thumbnail); }; - $this->fireCallback($callbackEvent); + $this->fireCallback($callbackEvent); } function fireGroupsChatCreate( $phone, $gId ) { - $callbackEvent = function(WhatsAppEventListener $listener) use ($phone, $gId) { + $callbackEvent = function(WhatsAppEventListener $listener) use ($phone, $gId) { $listener->onGroupsChatCreate($phone, $gId); }; - $this->fireCallback($callbackEvent); + $this->fireCallback($callbackEvent); } function fireGroupsChatEnd( $phone, $gId ) { - $callbackEvent = function(WhatsAppEventListener $listener) use ($phone, $gId) { + $callbackEvent = function(WhatsAppEventListener $listener) use ($phone, $gId) { $listener->onGroupsChatEnd($phone, $gId); }; - $this->fireCallback($callbackEvent); + $this->fireCallback($callbackEvent); } function fireGroupsParticipantsAdd( @@ -548,10 +560,10 @@ function fireGroupsParticipantsAdd( $groupId, $participant ) { - $callbackEvent = function(WhatsAppEventListener $listener) use ($phone, $groupId, $participant) { + $callbackEvent = function(WhatsAppEventListener $listener) use ($phone, $groupId, $participant) { $listener->onGroupsParticipantsAdd($phone, $groupId, $participant); }; - $this->fireCallback($callbackEvent); + $this->fireCallback($callbackEvent); } function fireGroupsParticipantsRemove( @@ -560,31 +572,31 @@ function fireGroupsParticipantsRemove( $participant, $author ) { - $callbackEvent = function(WhatsAppEventListener $listener) use ($phone, $groupId, $participant, $author) { + $callbackEvent = function(WhatsAppEventListener $listener) use ($phone, $groupId, $participant, $author) { $listener->onGroupsParticipantsRemove($phone, $groupId, $participant, $author); }; - $this->fireCallback($callbackEvent); + $this->fireCallback($callbackEvent); } function fireLogin( $phone ) { - $callbackEvent = function(WhatsAppEventListener $listener) use ($phone) { + $callbackEvent = function(WhatsAppEventListener $listener) use ($phone) { $listener->onLogin($phone); }; - $this->fireCallback($callbackEvent); + $this->fireCallback($callbackEvent); } function fireLoginFailed( $phone, $tag ) { - $callbackEvent = function(WhatsAppEventListener $listener) use ($phone, $tag) { + $callbackEvent = function(WhatsAppEventListener $listener) use ($phone, $tag) { $listener->onLoginFailed($phone, $tag); }; - $this->fireCallback($callbackEvent); + $this->fireCallback($callbackEvent); } - + function fireMessageComposing( $phone, $from, @@ -592,14 +604,14 @@ function fireMessageComposing( $type, $time ) { - $callbackEvent = function(WhatsAppEventListener $listener) use ($phone, $from, $msgid, $type, $time) { + $callbackEvent = function(WhatsAppEventListener $listener) use ($phone, $from, $msgid, $type, $time) { $listener->onMessageComposing($phone, $from, $msgid, $type, $time); }; - $this->fireCallback($callbackEvent); + $this->fireCallback($callbackEvent); } - + function fireMediaMessageSent( - $phone, + $phone, $to, $id, $filetype, @@ -607,27 +619,27 @@ function fireMediaMessageSent( $filename, $filesize, $filehash, - $icon + $icon ) { - $callbackEvent = function(WhatsAppEventListener $listener) use ($phone, $to, $id, $filetype, $url, $filename, $filesize, $filehash, $icon) { + $callbackEvent = function(WhatsAppEventListener $listener) use ($phone, $to, $id, $filetype, $url, $filename, $filesize, $filehash, $icon) { $listener->onMediaMessageSent($phone, $to, $id, $filetype, $url, $filename, $filesize, $filehash, $icon); }; - $this->fireCallback($callbackEvent); + $this->fireCallback($callbackEvent); } - + function fireMediaUploadFailed( $phone, $id, - $node, + $node, $messageNode, $reason ) { - $callbackEvent = function(WhatsAppEventListener $listener) use ($phone, $id, $node, $messageNode, $reason) { + $callbackEvent = function(WhatsAppEventListener $listener) use ($phone, $id, $node, $messageNode, $reason) { $listener->onMediaUploadFailed($phone, $id, $node, $messageNode, $reason); }; - $this->fireCallback($callbackEvent); + $this->fireCallback($callbackEvent); } - + function fireMessagePaused( $phone, $from, @@ -635,10 +647,10 @@ function fireMessagePaused( $type, $time ) { - $callbackEvent = function(WhatsAppEventListener $listener) use ($phone, $from, $msgid, $type, $time) { + $callbackEvent = function(WhatsAppEventListener $listener) use ($phone, $from, $msgid, $type, $time) { $listener->onMessagePaused($phone, $from, $msgid, $type, $time); }; - $this->fireCallback($callbackEvent); + $this->fireCallback($callbackEvent); } function fireMessageReceivedClient( @@ -648,10 +660,10 @@ function fireMessageReceivedClient( $type, $time ) { - $callbackEvent = function(WhatsAppEventListener $listener) use ($phone, $from, $msgid, $type, $time) { + $callbackEvent = function(WhatsAppEventListener $listener) use ($phone, $from, $msgid, $type, $time) { $listener->onMessageReceivedClient($phone, $from, $msgid, $type, $time); }; - $this->fireCallback($callbackEvent); + $this->fireCallback($callbackEvent); } function fireMessageReceivedServer( @@ -663,17 +675,17 @@ function fireMessageReceivedServer( $callbackEvent = function(WhatsAppEventListener $listener) use ($phone, $from, $msgid, $type) { $listener->onMessageReceivedServer($phone, $from, $msgid, $type); }; - $this->fireCallback($callbackEvent); + $this->fireCallback($callbackEvent); } function firePing( $phone, $msgid ) { - $callbackEvent = function(WhatsAppEventListener $listener) use ($phone, $msgid) { + $callbackEvent = function(WhatsAppEventListener $listener) use ($phone, $msgid) { $listener->onPing($phone, $msgid); }; - $this->fireCallback($callbackEvent); + $this->fireCallback($callbackEvent); } function firePresence( @@ -681,36 +693,36 @@ function firePresence( $from, $type ) { - $callbackEvent = function(WhatsAppEventListener $listener) use ($phone, $from, $type) { + $callbackEvent = function(WhatsAppEventListener $listener) use ($phone, $from, $type) { $listener->onPresence($phone, $from, $type); }; - $this->fireCallback($callbackEvent); + $this->fireCallback($callbackEvent); } function fireProfilePictureChanged( - $phone, + $phone, $from, $id, - $t + $t ) { - $callbackEvent = function(WhatsAppEventListener $listener) use ($phone, $from, $id, $t) { + $callbackEvent = function(WhatsAppEventListener $listener) use ($phone, $from, $id, $t) { $listener->onProfilePictureChanged($phone, $from, $id, $t); }; - $this->fireCallback($callbackEvent); + $this->fireCallback($callbackEvent); } - + function fireProfilePictureDeleted( - $phone, + $phone, $from, $id, - $t + $t ) { - $callbackEvent = function(WhatsAppEventListener $listener) use ($phone, $from, $id, $t) { + $callbackEvent = function(WhatsAppEventListener $listener) use ($phone, $from, $id, $t) { $listener->onProfilePictureDeleted($phone, $from, $id, $t); }; - $this->fireCallback($callbackEvent); + $this->fireCallback($callbackEvent); } - + function fireSendMessageReceived( $phone, $id, @@ -720,31 +732,31 @@ function fireSendMessageReceived( $callbackEvent = function(WhatsAppEventListener $listener) use ($phone, $id, $from, $type) { $listener->onSendMessageReceived($phone, $id, $from, $type); }; - $this->fireCallback($callbackEvent); + $this->fireCallback($callbackEvent); } function fireSendPong( $phone, $msgid ) { - $callbackEvent = function(WhatsAppEventListener $listener) use ($phone, $msgid) { + $callbackEvent = function(WhatsAppEventListener $listener) use ($phone, $msgid) { $listener->onSendPong($phone, $msgid); }; - $this->fireCallback($callbackEvent); + $this->fireCallback($callbackEvent); } - + function fireSendMessage( - $phone, + $phone, $targets, $id, - $node + $node ) { - $callbackEvent = function(WhatsAppEventListener $listener) use ($phone, $targets, $id, $node) { + $callbackEvent = function(WhatsAppEventListener $listener) use ($phone, $targets, $id, $node) { $listener->onSendMessage($phone, $targets, $id, $node); }; - $this->fireCallback($callbackEvent); + $this->fireCallback($callbackEvent); } - + function fireSendPresence( $phone, $type, @@ -753,17 +765,17 @@ function fireSendPresence( $callbackEvent = function(WhatsAppEventListener $listener) use ($phone, $type, $name) { $listener->onSendPresence($phone, $type, $name); }; - $this->fireCallback($callbackEvent); + $this->fireCallback($callbackEvent); } function fireSendStatusUpdate( $phone, $msg ) { - $callbackEvent = function(WhatsAppEventListener $listener) use ($phone, $msg) { + $callbackEvent = function(WhatsAppEventListener $listener) use ($phone, $msg) { $listener->onSendStatusUpdate($phone, $msg); }; - $this->fireCallback($callbackEvent); + $this->fireCallback($callbackEvent); } function fireUploadFile( @@ -771,20 +783,20 @@ function fireUploadFile( $name, $url ) { - $callbackEvent = function(WhatsAppEventListener $listener) use ($phone, $name, $url) { + $callbackEvent = function(WhatsAppEventListener $listener) use ($phone, $name, $url) { $listener->onUploadFile($phone, $name, $url); }; - $this->fireCallback($callbackEvent); + $this->fireCallback($callbackEvent); } function fireUploadFileFailed( $phone, $name ) { - $callbackEvent = function(WhatsAppEventListener $listener) use ($phone, $name) { + $callbackEvent = function(WhatsAppEventListener $listener) use ($phone, $name) { $listener->onUploadFileFailed($phone, $name); }; - $this->fireCallback($callbackEvent); + $this->fireCallback($callbackEvent); } /** diff --git a/src/events/WhatsAppEventListener.php b/src/events/WhatsAppEventListener.php index 41b73dc2..df6f0cc5 100755 --- a/src/events/WhatsAppEventListener.php +++ b/src/events/WhatsAppEventListener.php @@ -5,10 +5,10 @@ */ -interface WhatsAppEventListener { - function onClose( +interface WhatsAppEventListener { + function onClose( $phone, // The user phone number including the country code. - $error // The error message. + $error // The error message. ); function onCodeRegister( @@ -23,34 +23,34 @@ function onCodeRegister( $currency, // Currency price of account. $price_expiration // Price expiration in UNIX TimeStamp. ); - + function onCodeRegisterFailed( $phone, // The user phone number including the country code. $status, // The server status number $reason, // Reason of the status (e.g. too_recent/missing_param/bad_param). $retry_after// Waiting time before requesting a new code in seconds. ); - + function onCodeRequest( $phone, // The user phone number including the country code. $method, // Used method (SMS/voice). $length// Registration code length. ); - + function onCodeRequestFailed( $phone, // The user phone number including the country code. $method, // Used method (SMS/voice). $reason, // Reason of the status (e.g. too_recent/missing_param/bad_param). $value// The missing_param/bad_param or waiting time before requesting a new code. ); - + function onCodeRequestFailedTooRecent( $phone, // The user phone number including the country code. $method, // Used method (SMS/voice). $reason, // Reason of the status (too_recent). $retry_after // Waiting time before requesting a new code in seconds. ); - + function onConnect( $phone, // The user phone number including the country code. $socket // The resource socket id. @@ -191,13 +191,13 @@ function onGetGroupMessage( $name, // The sender name. $message // The message. ); - + function onGetGroupParticipants( $phone, $groupId, - $groupList + $groupList ); - + function onGetPrivacyBlockedList( $phone, // The user phone number including the country code. $children @@ -217,7 +217,7 @@ function onGetProfilePicture( $type, // The type of picture (image/preview). $thumbnail// The base64_encoded image. ); - + function onGetRequestLastSeen( $phone, // The user phone number including the country code. $from, // The sender JID. @@ -230,7 +230,7 @@ function onGetServerProperties( $version, // The version number on the server. $properties // Array of server properties. ); - + function onGetStatus( $phone, $from, @@ -239,7 +239,7 @@ function onGetStatus( $t, $status ); - + function onGetvCard( $phone, // The user phone number including the country code. $from, // The sender JID. @@ -274,6 +274,13 @@ function onGroupsChatCreate( $gId // The group JID. ); + function onGroupsChatisCreated( + $phone, + $creator, + $gId, + $subject + ); + function onGroupsChatEnd( $phone, // The user phone number including the country code. $gId // The group JID. @@ -295,7 +302,7 @@ function onGroupsParticipantsRemove( function onLogin( $phone // The user phone number including the country code. ); - + function onLoginFailed( $phone, // The user phone number including the country code. $tag @@ -310,17 +317,17 @@ function onMediaMessageSent( $filename, $filesize, $filehash, - $icon + $icon ); - + function onMediaUploadFailed( $phone, // The user phone number including the country code. $id, - $node, + $node, $messageNode, $reason ); - + function onMessageComposing( $phone, // The user phone number including the country code. $from, // The sender JID. @@ -364,24 +371,24 @@ function onPresence( ); function onProfilePictureChanged( - $phone, + $phone, $from, $id, - $t + $t ); function onProfilePictureDeleted( - $phone, + $phone, $from, $id, - $t + $t ); - + function onSendMessage( $phone, // The user phone number including the country code. $targets, $id, - $node + $node ); function onSendMessageReceived( @@ -406,16 +413,16 @@ function onSendStatusUpdate( $phone, // The user phone number including the country code. $msg // The status message. ); - + function onUploadFile( $phone, // The user phone number including the country code. - $name, // The filename. + $name, // The filename. $url // The remote url on WhatsApp servers (note, // this is NOT the URL to download the file, only used for sending message). ); function onUploadFileFailed( $phone, // The user phone number including the country code. - $name // The filename. + $name // The filename. ); /** diff --git a/src/events/WhatsAppEventListenerBase.php b/src/events/WhatsAppEventListenerBase.php index 9212d3e8..7b8cdf23 100755 --- a/src/events/WhatsAppEventListenerBase.php +++ b/src/events/WhatsAppEventListenerBase.php @@ -3,127 +3,127 @@ /** * Empty implementation of WhatsAppEventListener. See that class for documentation. - * - * This class provides no functionality, but allows developers to - * use it as a base class so that their classes don't need to + * + * This class provides no functionality, but allows developers to + * use it as a base class so that their classes don't need to * define every method in the WhatsAppEventListener interface. * By extending this class, it will also allow new methods to be * created in the interface without the developer needing to update * their base classes. - * + * * @file * Event class to received WhatsApp related events. */ -class WhatsAppEventListenerBase implements WhatsAppEventListener { - function onClose( - $phone, - $error +class WhatsAppEventListenerBase implements WhatsAppEventListener { + function onClose( + $phone, + $error ) {} function onCodeRegister( - $phone, - $login, - $pw, - $type, - $expiration, - $kind, - $price, - $cost, - $currency, - $price_expiration - ) {} - + $phone, + $login, + $pw, + $type, + $expiration, + $kind, + $price, + $cost, + $currency, + $price_expiration + ) {} + function onCodeRegisterFailed( - $phone, - $status, - $reason, - $retry_after + $phone, + $status, + $reason, + $retry_after ) {} - + function onCodeRequest( - $phone, + $phone, $method, $length ) {} - + function onCodeRequestFailed( - $phone, - $method, - $reason, + $phone, + $method, + $reason, $value ) {} - + function onCodeRequestFailedTooRecent( - $phone, - $method, - $reason, - $retry_after + $phone, + $method, + $reason, + $retry_after ) {} - + function onConnect( - $phone, - $socket + $phone, + $socket ) {} function onCredentialsBad( - $phone, - $status, - $reason + $phone, + $status, + $reason ) {} function onCredentialsGood( - $phone, - $login, - $pw, - $type, - $expiration, - $kind, - $price, - $cost, - $currency, - $price_expiration + $phone, + $login, + $pw, + $type, + $expiration, + $kind, + $price, + $cost, + $currency, + $price_expiration ) {} function onDisconnect( - $phone, - $socket + $phone, + $socket ) {} function onDissectPhone( - $phone, - $country, - $cc, - $mcc, - $lc, - $lg + $phone, + $country, + $cc, + $mcc, + $lc, + $lg ) {} function onDissectPhoneFailed( - $phone + $phone ) {} function onGetAudio( - $phone, - $from, - $msgid, - $type, - $time, - $name, - $size, - $url, - $file, + $phone, + $from, + $msgid, + $type, + $time, + $name, + $size, + $url, + $file, $mimetype, $filehash, $duration, - $acodec + $acodec ) {} function onGetError( $phone, $id, - $error + $error ) {} function onGetGroups( @@ -132,13 +132,13 @@ function onGetGroups( ) {} function onGetGroupsInfo( - $phone, + $phone, $groupList ) {} function onGetGroupsSubject( - $phone, - $gId, + $phone, + $gId, $time, $author, $participant, @@ -203,7 +203,7 @@ function onGetPrivacyBlockedList( $children /* $data, - $onGetProfilePicture, + $onGetProfilePicture, $phone, $from, $type, @@ -217,7 +217,7 @@ function onGetProfilePicture( $type, $thumbnail ) {} - + function onGetRequestLastSeen( $phone, $from, @@ -265,6 +265,13 @@ function onGroupsChatCreate( $gId ) {} + function onGroupsChatisCreated( + $phone, + $creator, + $gId, + $subject + ) {} + function onGroupsChatEnd( $phone, $gId @@ -351,7 +358,7 @@ function onSendStatusUpdate( $phone, $msg ) {} - + function onUploadFile( $phone, $name, @@ -364,70 +371,70 @@ function onUploadFileFailed( ) {} public function onConnectError( - $phone, + $phone, $socket ) {} public function onGetGroupParticipants( - $phone, - $groupId, + $phone, + $groupId, $groupList ) {} public function onGetStatus( - $phone, - $from, - $type, - $id, - $t, + $phone, + $from, + $type, + $id, + $t, $status ) {} public function onLoginFailed( - $phone, + $phone, $tag ) {} public function onMediaMessageSent( - $phone, - $to, - $id, - $filetype, - $url, - $filename, - $filesize, + $phone, + $to, + $id, + $filetype, + $url, + $filename, + $filesize, $icon ) {} public function onMediaUploadFailed( - $phone, - $id, - $node, - $messageNode, + $phone, + $id, + $node, + $messageNode, $reason ) {} public function onProfilePictureChanged( - $phone, - $from, - $id, + $phone, + $from, + $id, $t ) {} public function onProfilePictureDeleted( - $phone, - $from, - $id, + $phone, + $from, + $id, $t ) {} public function onSendMessage( - $phone, - $targets, + $phone, + $targets, $id, $node ) {} diff --git a/src/events/WhatsAppEventListenerProxy.php b/src/events/WhatsAppEventListenerProxy.php index 710331e7..866cb055 100755 --- a/src/events/WhatsAppEventListenerProxy.php +++ b/src/events/WhatsAppEventListenerProxy.php @@ -10,135 +10,135 @@ abstract class WhatsAppEventListenerProxy implements WhatsAppEventListener { /** * This method will get all event calls. - * + * */ abstract protected function handleEvent($eventName, array $arguments ); - function onClose( - $phone, - $error + function onClose( + $phone, + $error ) { $this->handleEvent(__FUNCTION__, func_get_args()); } function onCodeRegister( - $phone, - $login, - $pw, - $type, - $expiration, - $kind, - $price, - $cost, - $currency, - $price_expiration - ) { - $this->handleEvent(__FUNCTION__, func_get_args()); - } - + $phone, + $login, + $pw, + $type, + $expiration, + $kind, + $price, + $cost, + $currency, + $price_expiration + ) { + $this->handleEvent(__FUNCTION__, func_get_args()); + } + function onCodeRegisterFailed( - $phone, - $status, - $reason, - $retry_after + $phone, + $status, + $reason, + $retry_after ) { $this->handleEvent(__FUNCTION__, func_get_args()); } - + function onCodeRequest( - $phone, + $phone, $method, $length ) { $this->handleEvent(__FUNCTION__, func_get_args()); } - + function onCodeRequestFailed( - $phone, - $method, - $reason, + $phone, + $method, + $reason, $value ) { $this->handleEvent(__FUNCTION__, func_get_args()); } - + function onCodeRequestFailedTooRecent( - $phone, - $method, - $reason, - $retry_after + $phone, + $method, + $reason, + $retry_after ) { $this->handleEvent(__FUNCTION__, func_get_args()); } - + function onConnect( - $phone, - $socket + $phone, + $socket ) { $this->handleEvent(__FUNCTION__, func_get_args()); } function onCredentialsBad( - $phone, - $status, - $reason + $phone, + $status, + $reason ) { $this->handleEvent(__FUNCTION__, func_get_args()); } function onCredentialsGood( - $phone, - $login, - $pw, - $type, - $expiration, - $kind, - $price, - $cost, - $currency, - $price_expiration + $phone, + $login, + $pw, + $type, + $expiration, + $kind, + $price, + $cost, + $currency, + $price_expiration ) { $this->handleEvent(__FUNCTION__, func_get_args()); } function onDisconnect( - $phone, - $socket + $phone, + $socket ) { $this->handleEvent(__FUNCTION__, func_get_args()); } function onDissectPhone( - $phone, - $country, - $cc, - $mcc, - $lc, - $lg + $phone, + $country, + $cc, + $mcc, + $lc, + $lg ) { $this->handleEvent(__FUNCTION__, func_get_args()); } function onDissectPhoneFailed( - $phone + $phone ) { $this->handleEvent(__FUNCTION__, func_get_args()); } function onGetAudio( - $phone, - $from, - $msgid, - $type, - $time, - $name, - $size, - $url, - $file, + $phone, + $from, + $msgid, + $type, + $time, + $name, + $size, + $url, + $file, $mimetype, $filehash, $duration, - $acodec + $acodec ) { $this->handleEvent(__FUNCTION__, func_get_args()); } @@ -146,7 +146,7 @@ function onGetAudio( function onGetError( $phone, $id, - $error + $error ) { $this->handleEvent(__FUNCTION__, func_get_args()); } @@ -159,15 +159,15 @@ function onGetGroups( } function onGetGroupsInfo( - $phone, + $phone, $groupList ) { $this->handleEvent(__FUNCTION__, func_get_args()); } function onGetGroupsSubject( - $phone, - $gId, + $phone, + $gId, $time, $author, $participant, @@ -244,7 +244,7 @@ function onGetPrivacyBlockedList( $children /* $data, - $onGetProfilePicture, + $onGetProfilePicture, $phone, $from, $type, @@ -262,7 +262,7 @@ function onGetProfilePicture( ) { $this->handleEvent(__FUNCTION__, func_get_args()); } - + function onGetRequestLastSeen( $phone, $from, @@ -320,6 +320,15 @@ function onGroupsChatCreate( $this->handleEvent(__FUNCTION__, func_get_args()); } + function onGroupsChatisCreated( + $phone, + $creator, + $gId, + $subject + ) { + $this->handleEvent(__FUNCTION__, func_get_args()); + } + function onGroupsChatEnd( $phone, $gId @@ -434,7 +443,7 @@ function onSendStatusUpdate( ) { $this->handleEvent(__FUNCTION__, func_get_args()); } - + function onUploadFile( $phone, $name, @@ -451,45 +460,45 @@ function onUploadFileFailed( } public function onConnectError( - $phone, + $phone, $socket ) { - $this->handleEvent(__FUNCTION__, func_get_args()); + $this->handleEvent(__FUNCTION__, func_get_args()); } public function onGetGroupParticipants( - $phone, - $groupId, + $phone, + $groupId, $groupList ) { - $this->handleEvent(__FUNCTION__, func_get_args()); + $this->handleEvent(__FUNCTION__, func_get_args()); } public function onGetStatus( - $phone, - $from, - $type, - $id, - $t, + $phone, + $from, + $type, + $id, + $t, $status ) { $this->handleEvent(__FUNCTION__, func_get_args()); } public function onLoginFailed( - $phone, + $phone, $tag ) { $this->handleEvent(__FUNCTION__, func_get_args()); } public function onMediaMessageSent( - $phone, - $to, - $id, - $filetype, - $url, - $filename, + $phone, + $to, + $id, + $filetype, + $url, + $filename, $filesize, $filehash, $icon @@ -498,37 +507,37 @@ public function onMediaMessageSent( } public function onMediaUploadFailed( - $phone, - $id, - $node, - $messageNode, + $phone, + $id, + $node, + $messageNode, $reason - ) { + ) { $this->handleEvent(__FUNCTION__, func_get_args()); } public function onProfilePictureChanged( - $phone, - $from, - $id, + $phone, + $from, + $id, $t ) { $this->handleEvent(__FUNCTION__, func_get_args()); } public function onProfilePictureDeleted( - $phone, - $from, - $id, + $phone, + $from, + $id, $t ) { $this->handleEvent(__FUNCTION__, func_get_args()); } public function onSendMessage( - $phone, - $targets, - $id, + $phone, + $targets, + $id, $node ) { $this->handleEvent(__FUNCTION__, func_get_args()); diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index f6c69fd4..b2a8071b 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -912,7 +912,7 @@ public function sendGroupsChatCreate($subject, $participants = array()) if (count($participants) > 0) { $this->sendGroupsParticipantsAdd($groupId, $participants); } - + $this->eventManager()->fireGroupCreate( $this->phoneNumber, $groupId @@ -2435,6 +2435,14 @@ protected function processInboundDataNode(ProtocolNode $node, $autoReceipt = tru ); //TODO break; + case "w:gp2": + $this->eventManager()->fireGroupisCreated( + $this->phoneNumber, + $node->getChild(1)->getAttribute('creator'), + $node->getChild(1)->getAttribute('creation'), + $node->getChild(1)->getAttribute('subject') + ); + break; default: throw new Exception("Method $type not implemented"); } From 9d9697b9ff3ae793151dec20e192d22d7c3695bf Mon Sep 17 00:00:00 2001 From: mgp25 Date: Sun, 12 Oct 2014 16:25:22 +0200 Subject: [PATCH 014/436] Directory fix --- examples/registerTool.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/registerTool.php b/examples/registerTool.php index 0bece324..6621c03a 100644 --- a/examples/registerTool.php +++ b/examples/registerTool.php @@ -1,6 +1,6 @@ Date: Sun, 12 Oct 2014 16:25:55 +0200 Subject: [PATCH 015/436] Added remove and add notification in wa groups v2 --- src/whatsprot.class.php | 25 ++++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index b2a8071b..46dd85b0 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -2436,12 +2436,27 @@ protected function processInboundDataNode(ProtocolNode $node, $autoReceipt = tru //TODO break; case "w:gp2": - $this->eventManager()->fireGroupisCreated( - $this->phoneNumber, - $node->getChild(1)->getAttribute('creator'), - $node->getChild(1)->getAttribute('creation'), - $node->getChild(1)->getAttribute('subject') + if ($node->hasChild('remove')) { + $this->eventManager()->fireGroupsParticipantsRemove( + $this->phoneNumber, + $node->getAttribute('from'), + $node->getChild(1)->getAttribute('jid'), + ); + } else if ($node->hasChild('add')) { + $this->eventManager()->fireGroupsParticipantsAdd( + $this->phoneNumber, + $node->getAttribute('from'), + $node->getChild(1)->getAttribute('jid') + ); + } + else if ($node->hasChild('create')) { + $this->eventManager()->fireGroupisCreated( + $this->phoneNumber, + $node->getChild(1)->getAttribute('creator'), + $node->getChild(1)->getAttribute('creation'), + $node->getChild(1)->getAttribute('subject') ); + } break; default: throw new Exception("Method $type not implemented"); From 8bb7805000512e6e9b909312219e6ce623b1b9c1 Mon Sep 17 00:00:00 2001 From: mgp25 Date: Mon, 13 Oct 2014 19:52:06 +0200 Subject: [PATCH 016/436] Fix notification group v2 create, remove and add notification under wa groups_v2 --- src/WhatsAppEvent.php | 7 +++---- src/events/WhatsAppEventListener.php | 3 +-- src/events/WhatsAppEventListenerBase.php | 3 +-- src/events/WhatsAppEventListenerProxy.php | 3 +-- src/whatsprot.class.php | 12 ++++++------ 5 files changed, 12 insertions(+), 16 deletions(-) diff --git a/src/WhatsAppEvent.php b/src/WhatsAppEvent.php index 7d2a48ce..d449cbbc 100755 --- a/src/WhatsAppEvent.php +++ b/src/WhatsAppEvent.php @@ -569,11 +569,10 @@ function fireGroupsParticipantsAdd( function fireGroupsParticipantsRemove( $phone, $groupId, - $participant, - $author + $participant ) { - $callbackEvent = function(WhatsAppEventListener $listener) use ($phone, $groupId, $participant, $author) { - $listener->onGroupsParticipantsRemove($phone, $groupId, $participant, $author); + $callbackEvent = function(WhatsAppEventListener $listener) use ($phone, $groupId, $participant) { + $listener->onGroupsParticipantsRemove($phone, $groupId, $participant); }; $this->fireCallback($callbackEvent); } diff --git a/src/events/WhatsAppEventListener.php b/src/events/WhatsAppEventListener.php index df6f0cc5..6cc2fa79 100755 --- a/src/events/WhatsAppEventListener.php +++ b/src/events/WhatsAppEventListener.php @@ -295,8 +295,7 @@ function onGroupsParticipantsAdd( function onGroupsParticipantsRemove( $phone, // The user phone number including the country code. $groupId, // The group JID. - $participant, // The participant JID. - $author // The author JID. + $participant // The participant JID. ); function onLogin( diff --git a/src/events/WhatsAppEventListenerBase.php b/src/events/WhatsAppEventListenerBase.php index 7b8cdf23..3f745e89 100755 --- a/src/events/WhatsAppEventListenerBase.php +++ b/src/events/WhatsAppEventListenerBase.php @@ -286,8 +286,7 @@ function onGroupsParticipantsAdd( function onGroupsParticipantsRemove( $phone, $groupId, - $participant, - $author + $participant ) {} function onLogin( diff --git a/src/events/WhatsAppEventListenerProxy.php b/src/events/WhatsAppEventListenerProxy.php index 866cb055..a206a551 100755 --- a/src/events/WhatsAppEventListenerProxy.php +++ b/src/events/WhatsAppEventListenerProxy.php @@ -347,8 +347,7 @@ function onGroupsParticipantsAdd( function onGroupsParticipantsRemove( $phone, $groupId, - $participant, - $author + $participant ) { $this->handleEvent(__FUNCTION__, func_get_args()); } diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index 46dd85b0..ea4ace62 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -2440,21 +2440,21 @@ protected function processInboundDataNode(ProtocolNode $node, $autoReceipt = tru $this->eventManager()->fireGroupsParticipantsRemove( $this->phoneNumber, $node->getAttribute('from'), - $node->getChild(1)->getAttribute('jid'), - ); + $node->getChild(0)->getAttribute('jid') + ); } else if ($node->hasChild('add')) { $this->eventManager()->fireGroupsParticipantsAdd( $this->phoneNumber, $node->getAttribute('from'), - $node->getChild(1)->getAttribute('jid') + $node->getChild(0)->getAttribute('jid') ); } else if ($node->hasChild('create')) { $this->eventManager()->fireGroupisCreated( $this->phoneNumber, - $node->getChild(1)->getAttribute('creator'), - $node->getChild(1)->getAttribute('creation'), - $node->getChild(1)->getAttribute('subject') + $node->getChild(0)->getChild(0)->getAttribute('creator'), + $node->getChild(0)->getChild(0)->getAttribute('id'), + $node->getChild(0)->getChild(0)->getAttribute('subject') ); } break; From e9643dfd842362b836f05e9bd41b85e051e9f89e Mon Sep 17 00:00:00 2001 From: mgp25 Date: Tue, 14 Oct 2014 01:13:49 +0200 Subject: [PATCH 017/436] Added generate payment link function It will generate a payment link for the specified number, for 1, 3 or 5 years. --- src/func.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/func.php b/src/func.php index 60b70dcf..3a377794 100755 --- a/src/func.php +++ b/src/func.php @@ -189,3 +189,15 @@ function updateData($nameFile, $WAver, $classesMD5 = "") fwrite($open,$content); fclose($open); } + +function generatePaymentLink($number, $sku) +{ + if ( $sku != 1 or $sku != 3 or $sku != 5 ) + $sku = 1; + $base = "https://www.whatsapp.com/payments/cksum_pay.php?phone="; + $middle = "&cksum="; + $end = "&sku=".$sku; + $checksum = md5($number."abc"); + $link = $base.$number.$middle.$checksum.$end; + return $link; +} From ca1f03f06ca5892a7126adc946498e0cd4a7f23b Mon Sep 17 00:00:00 2001 From: mgp25 Date: Tue, 14 Oct 2014 01:14:15 +0200 Subject: [PATCH 018/436] Added payment notification --- src/WhatsAppEvent.php | 14 ++++++++++++++ src/events/WhatsAppEventListener.php | 9 +++++++++ src/events/WhatsAppEventListenerBase.php | 9 +++++++++ src/events/WhatsAppEventListenerProxy.php | 11 +++++++++++ src/whatsprot.class.php | 14 ++++++++++++++ 5 files changed, 57 insertions(+) diff --git a/src/WhatsAppEvent.php b/src/WhatsAppEvent.php index d449cbbc..63ae474a 100755 --- a/src/WhatsAppEvent.php +++ b/src/WhatsAppEvent.php @@ -822,4 +822,18 @@ function fireGetReceipt( $this->fireCallback($callbackEvent); } + function firePaidAccount( + $phone, + $author, + $kind, + $status, + $creation, + $expiration + ) { + $callbackEvent = function(WhatsAppEventListener $listener) use ($phone, $author, $kind, $status, $creation, $expiration) { + $listener->onPaidAccount($phone, $author, $kind, $status, $creation, $expiration); + }; + $this->fireCallback($callbackEvent); + } + } diff --git a/src/events/WhatsAppEventListener.php b/src/events/WhatsAppEventListener.php index 6cc2fa79..e8c90181 100755 --- a/src/events/WhatsAppEventListener.php +++ b/src/events/WhatsAppEventListener.php @@ -358,6 +358,15 @@ function onMessageReceivedServer( $type // The message type. ); + function onPaidAccount( + $phone, + $author, + $kind, + $status, + $creation, + $expiration + ); + function onPing( $phone, // The user phone number including the country code. $msgid // The message id. diff --git a/src/events/WhatsAppEventListenerBase.php b/src/events/WhatsAppEventListenerBase.php index 3f745e89..e78755d8 100755 --- a/src/events/WhatsAppEventListenerBase.php +++ b/src/events/WhatsAppEventListenerBase.php @@ -324,6 +324,15 @@ function onMessageReceivedServer( $type ) {} + function onPaidAccount( + $phone, + $author, + $kind, + $status, + $creation, + $expiration + ) {} + function onPing( $phone, $msgid diff --git a/src/events/WhatsAppEventListenerProxy.php b/src/events/WhatsAppEventListenerProxy.php index a206a551..ea2b99ea 100755 --- a/src/events/WhatsAppEventListenerProxy.php +++ b/src/events/WhatsAppEventListenerProxy.php @@ -397,6 +397,17 @@ function onMessageReceivedServer( $this->handleEvent(__FUNCTION__, func_get_args()); } + function onPaidAccount( + $phone, + $author, + $kind, + $status, + $creation, + $expiration + ) { + $this->handleEvent(__FUNCTION__, func_get_args()); + } + function onPing( $phone, $msgid diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index ea4ace62..1e09dca6 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -2458,6 +2458,20 @@ protected function processInboundDataNode(ProtocolNode $node, $autoReceipt = tru ); } break; + case "account": + if (($node->getChild(0)->getAttribute('author')) == "") + $author = "Paypal"; + else + $author = $node->getChild(0)->getAttribute('author'); + $this->eventManager()->firePaidAccount( + $this->phoneNumber, + $author, + $node->getChild(0)->getChild(0)->getAttribute('kind'), + $node->getChild(0)->getChild(0)->getAttribute('status'), + $node->getChild(0)->getChild(0)->getAttribute('creation'), + $node->getChild(0)->getChild(0)->getAttribute('expiration') + ); + break; default: throw new Exception("Method $type not implemented"); } From 36bc947a4db75df51ab52ab7a5eed946b1647d3e Mon Sep 17 00:00:00 2001 From: mgp25 Date: Wed, 15 Oct 2014 08:52:20 +0200 Subject: [PATCH 019/436] 2.11.416 added --- classesMD5.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/classesMD5.txt b/classesMD5.txt index ca6922c0..ae178041 100644 --- a/classesMD5.txt +++ b/classesMD5.txt @@ -3,6 +3,9 @@ = B64 ENCODED = =============================== +WhatsApp/2.11.416 Android/4.3 Device/GalaxyS3 +5aZ7LEI7a88AxkzGp8gIWw== + WhatsApp/2.11.414 Android/4.3 Device/GalaxyS3 Ania53j5EZJVFR1YgwjiLQ== From fa834a3c022d5262b4a4326a2bd96853599e219f Mon Sep 17 00:00:00 2001 From: mgp25 Date: Wed, 15 Oct 2014 14:17:17 +0200 Subject: [PATCH 020/436] Auto-update always working Updated data to 2.11.416 --- src/token.php | 2 +- src/whatsprot.class.php | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/token.php b/src/token.php index e66e9f05..84d35c11 100755 --- a/src/token.php +++ b/src/token.php @@ -3,7 +3,7 @@ function generateRequestToken($country, $phone) { $signature = "MIIDMjCCAvCgAwIBAgIETCU2pDALBgcqhkjOOAQDBQAwfDELMAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFDASBgNVBAcTC1NhbnRhIENsYXJhMRYwFAYDVQQKEw1XaGF0c0FwcCBJbmMuMRQwEgYDVQQLEwtFbmdpbmVlcmluZzEUMBIGA1UEAxMLQnJpYW4gQWN0b24wHhcNMTAwNjI1MjMwNzE2WhcNNDQwMjE1MjMwNzE2WjB8MQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEUMBIGA1UEBxMLU2FudGEgQ2xhcmExFjAUBgNVBAoTDVdoYXRzQXBwIEluYy4xFDASBgNVBAsTC0VuZ2luZWVyaW5nMRQwEgYDVQQDEwtCcmlhbiBBY3RvbjCCAbgwggEsBgcqhkjOOAQBMIIBHwKBgQD9f1OBHXUSKVLfSpwu7OTn9hG3UjzvRADDHj+AtlEmaUVdQCJR+1k9jVj6v8X1ujD2y5tVbNeBO4AdNG/yZmC3a5lQpaSfn+gEexAiwk+7qdf+t8Yb+DtX58aophUPBPuD9tPFHsMCNVQTWhaRMvZ1864rYdcq7/IiAxmd0UgBxwIVAJdgUI8VIwvMspK5gqLrhAvwWBz1AoGBAPfhoIXWmz3ey7yrXDa4V7l5lK+7+jrqgvlXTAs9B4JnUVlXjrrUWU/mcQcQgYC0SRZxI+hMKBYTt88JMozIpuE8FnqLVHyNKOCjrh4rs6Z1kW6jfwv6ITVi8ftiegEkO8yk8b6oUZCJqIPf4VrlnwaSi2ZegHtVJWQBTDv+z0kqA4GFAAKBgQDRGYtLgWh7zyRtQainJfCpiaUbzjJuhMgo4fVWZIvXHaSHBU1t5w//S0lDK2hiqkj8KpMWGywVov9eZxZy37V26dEqr/c2m5qZ0E+ynSu7sqUD7kGx/zeIcGT0H+KAVgkGNQCo5Uc0koLRWYHNtYoIvt5R3X6YZylbPftF/8ayWTALBgcqhkjOOAQDBQADLwAwLAIUAKYCp0d6z4QQdyN74JDfQ2WCyi8CFDUM4CaNB+ceVXdKtOrNTQcc0e+t"; - $classesMd5 = "Ania53j5EZJVFR1YgwjiLQ=="; // 2.11.414 + $classesMd5 = "5aZ7LEI7a88AxkzGp8gIWw=="; // 2.11.416 $key2 = base64_decode("/UIGKU1FVQa+ATM2A0za7G2KI9S/CwPYjgAbc67v7ep42eO/WeTLx1lb1cHwxpsEgF4+PmYpLd2YpGUdX/A2JQitsHzDwgcdBpUf7psX1BU="); $data = base64_decode($signature) . base64_decode($classesMd5) . $phone; diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index 1e09dca6..7499348b 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -46,9 +46,9 @@ class WhatsProt const WHATSAPP_SERVER = 's.whatsapp.net'; // The hostname used to login/send messages. const WHATSAPP_UPLOAD_HOST = 'https://mms.whatsapp.net/client/iphone/upload.php'; // The upload host. const WHATSAPP_DEVICE = 'Android'; // The device name. - const WHATSAPP_VER = '2.11.414'; // The WhatsApp version. - const WHATSAPP_USER_AGENT = 'WhatsApp/2.11.414 Android/4.3 Device/GalaxyS3'; // User agent used in request/registration code. - const WHATSAPP_VER_CHECKER = 'http://www.whatsapp.com/android/current/WhatsApp.version'; + const WHATSAPP_VER = '2.11.416'; // The WhatsApp version. + const WHATSAPP_USER_AGENT = 'WhatsApp/2.11.416 Android/4.3 Device/GalaxyS3'; // User agent used in request/registration code. + const WHATSAPP_VER_CHECKER = 'https://coderus.openrepos.net/whitesoft/whatsapp_version'; // Check WhatsApp version /** * Property declarations. @@ -415,7 +415,7 @@ public function connect() echo "\nUp to date :)\n\n"; } else{ - $classesMD5 = file_get_contents('https://mgp25.com/WAToken/WhatsApp.token'); + $classesMD5 = file_get_contents('https://coderus.openrepos.net/whitesoft/whatsapp_classes'); updateData('token.php', $WAver, $classesMD5); updateData('whatsprot.class.php', $WAver); From 48f3f9eb09d385adb09bf665e336fb0b716b97b1 Mon Sep 17 00:00:00 2001 From: denno Date: Wed, 15 Oct 2014 19:08:54 +0200 Subject: [PATCH 021/436] added caption-Feature to videos and images --- src/WhatsAppEvent.php | 19 +++++++------ src/events/WhatsAppEventListener.php | 7 +++-- src/events/WhatsAppEventListenerBase.php | 7 +++-- src/events/WhatsAppEventListenerProxy.php | 7 +++-- src/whatsprot.class.php | 33 ++++++++++++++--------- 5 files changed, 46 insertions(+), 27 deletions(-) diff --git a/src/WhatsAppEvent.php b/src/WhatsAppEvent.php index 63ae474a..bffddc6f 100755 --- a/src/WhatsAppEvent.php +++ b/src/WhatsAppEvent.php @@ -360,10 +360,11 @@ function fireGetImage( $filehash, $width, $height, - $thumbnail + $thumbnail, + $caption ) { - $callbackEvent = function(WhatsAppEventListener $listener) use ($phone, $from, $msgid, $type, $time, $name, $size, $url, $file, $mimetype, $filehash, $width, $height, $thumbnail) { - $listener->onGetImage($phone, $from, $msgid, $type, $time, $name, $size, $url, $file, $mimetype, $filehash, $width, $height, $thumbnail); + $callbackEvent = function(WhatsAppEventListener $listener) use ($phone, $from, $msgid, $type, $time, $name, $size, $url, $file, $mimetype, $filehash, $width, $height, $thumbnail, $caption) { + $listener->onGetImage($phone, $from, $msgid, $type, $time, $name, $size, $url, $file, $mimetype, $filehash, $width, $height, $thumbnail, $caption); }; $this->fireCallback($callbackEvent); } @@ -527,10 +528,11 @@ function fireGetVideo( $duration, $vcodec, $acodec, - $thumbnail + $thumbnail, + $caption ) { - $callbackEvent = function(WhatsAppEventListener $listener) use ($phone, $from, $msgid, $type, $time, $name, $url, $file, $size, $mimetype, $filehash, $duration, $vcodec, $acodec, $thumbnail){ - $listener->onGetVideo($phone, $from, $msgid, $type, $time, $name, $url, $file, $size, $mimetype, $filehash, $duration, $vcodec, $acodec, $thumbnail); + $callbackEvent = function(WhatsAppEventListener $listener) use ($phone, $from, $msgid, $type, $time, $name, $url, $file, $size, $mimetype, $filehash, $duration, $vcodec, $acodec, $thumbnail, $caption){ + $listener->onGetVideo($phone, $from, $msgid, $type, $time, $name, $url, $file, $size, $mimetype, $filehash, $duration, $vcodec, $acodec, $thumbnail, $caption); }; $this->fireCallback($callbackEvent); } @@ -618,10 +620,11 @@ function fireMediaMessageSent( $filename, $filesize, $filehash, + $caption, $icon ) { - $callbackEvent = function(WhatsAppEventListener $listener) use ($phone, $to, $id, $filetype, $url, $filename, $filesize, $filehash, $icon) { - $listener->onMediaMessageSent($phone, $to, $id, $filetype, $url, $filename, $filesize, $filehash, $icon); + $callbackEvent = function(WhatsAppEventListener $listener) use ($phone, $to, $id, $filetype, $url, $filename, $filesize, $filehash, $caption, $icon) { + $listener->onMediaMessageSent($phone, $to, $id, $filetype, $url, $filename, $filesize, $filehash, $caption, $icon); }; $this->fireCallback($callbackEvent); } diff --git a/src/events/WhatsAppEventListener.php b/src/events/WhatsAppEventListener.php index e8c90181..21f42169 100755 --- a/src/events/WhatsAppEventListener.php +++ b/src/events/WhatsAppEventListener.php @@ -154,7 +154,8 @@ function onGetImage( $filehash, // The image file hash. $width, // The image width. $height, // The image height. - $thumbnail // The base64_encode image thumbnail. + $thumbnail, // The base64_encode image thumbnail. + $caption // The image caption. ); function onGetLocation( @@ -266,7 +267,8 @@ function onGetVideo( $duration, // The video duration. $vcodec, // The video codec. $acodec, // The audio codec. - $thumbnail // The base64_encode video thumbnail. + $thumbnail, // The base64_encode video thumbnail. + $caption // The video caption. ); function onGroupsChatCreate( @@ -316,6 +318,7 @@ function onMediaMessageSent( $filename, $filesize, $filehash, + $caption, $icon ); diff --git a/src/events/WhatsAppEventListenerBase.php b/src/events/WhatsAppEventListenerBase.php index e78755d8..45e3b2d5 100755 --- a/src/events/WhatsAppEventListenerBase.php +++ b/src/events/WhatsAppEventListenerBase.php @@ -160,7 +160,8 @@ function onGetImage( $filehash, $width, $height, - $thumbnail + $thumbnail, + $caption ) {} function onGetLocation( @@ -257,7 +258,8 @@ function onGetVideo( $duration, $vcodec, $acodec, - $thumbnail + $thumbnail, + $caption ) {} function onGroupsChatCreate( @@ -412,6 +414,7 @@ public function onMediaMessageSent( $url, $filename, $filesize, + $caption, $icon ) {} diff --git a/src/events/WhatsAppEventListenerProxy.php b/src/events/WhatsAppEventListenerProxy.php index ea2b99ea..b8edd0d5 100755 --- a/src/events/WhatsAppEventListenerProxy.php +++ b/src/events/WhatsAppEventListenerProxy.php @@ -191,7 +191,8 @@ function onGetImage( $filehash, $width, $height, - $thumbnail + $thumbnail, + $caption ) { $this->handleEvent(__FUNCTION__, func_get_args()); } @@ -308,7 +309,8 @@ function onGetVideo( $duration, $vcodec, $acodec, - $thumbnail + $thumbnail, + $caption ) { $this->handleEvent(__FUNCTION__, func_get_args()); } @@ -511,6 +513,7 @@ public function onMediaMessageSent( $filename, $filesize, $filehash, + $caption, $icon ) { $this->handleEvent(__FUNCTION__, func_get_args()); diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index 7499348b..eb1c6957 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -580,12 +580,12 @@ public function sendBroadcastAudio($targets, $path, $storeURLmedia = false, $fsi * @param string $path URL or local path to the image file to send * @param bool $storeURLmedia Keep a copy of the audio file on your server */ - public function sendBroadcastImage($targets, $path, $storeURLmedia = false, $fsize = 0, $fhash = "") + public function sendBroadcastImage($targets, $path, $storeURLmedia = false, $fsize = 0, $fhash = "", $caption = "") { if (!is_array($targets)) { $targets = array($targets); } - $this->sendMessageImage($targets, $path, $storeURLmedia, $fsize, $fhash); + $this->sendMessageImage($targets, $path, $storeURLmedia, $fsize, $fhash, $caption); } /** @@ -647,12 +647,12 @@ public function sendBroadcastMessage($targets, $message) * @param string $path URL or local path to the video file to send * @param bool $storeURLmedia Keep a copy of the audio file on your server */ - public function sendBroadcastVideo($targets, $path, $storeURLmedia = false, $fsize = 0, $fhash = "") + public function sendBroadcastVideo($targets, $path, $storeURLmedia = false, $fsize = 0, $fhash = "", $caption = "") { if (!is_array($targets)) { $targets = array($targets); } - $this->sendMessageVideo($targets, $path, $storeURLmedia, $fsize, $fhash); + $this->sendMessageVideo($targets, $path, $storeURLmedia, $fsize, $fhash, $caption); } /** @@ -1087,16 +1087,16 @@ public function sendMessageComposing($to) * * @return bool */ - public function sendMessageImage($to, $filepath, $storeURLmedia = false, $fsize = 0, $fhash = "") + public function sendMessageImage($to, $filepath, $storeURLmedia = false, $fsize = 0, $fhash = "", $caption = "") { if ($fsize==0 || $fhash == "") { $allowedExtensions = array('jpg', 'jpeg', 'gif', 'png'); $size = 5 * 1024 * 1024; // Easy way to set maximum file size for this media type. - return $this->sendCheckAndSendMedia($filepath, $size, $to, 'image', $allowedExtensions, $storeURLmedia); + return $this->sendCheckAndSendMedia($filepath, $size, $to, 'image', $allowedExtensions, $storeURLmedia, $caption); } else{ - $this->sendRequestFileUpload($fhash, 'image', $fsize, $filepath, $to); + $this->sendRequestFileUpload($fhash, 'image', $fsize, $filepath, $to, $caption); return true; } } @@ -1165,13 +1165,13 @@ protected function sendChatState($to, $state) * * @return bool */ - public function sendMessageVideo($to, $filepath, $storeURLmedia = false, $fsize = 0, $fhash = "") + public function sendMessageVideo($to, $filepath, $storeURLmedia = false, $fsize = 0, $fhash = "", $caption = "") { if ($fsize==0 || $fhash == "") { $allowedExtensions = array('3gp', 'mp4', 'mov', 'avi'); $size = 20 * 1024 * 1024; // Easy way to set maximum file size for this media type. - return $this->sendCheckAndSendMedia($filepath, $size, $to, 'video', $allowedExtensions, $storeURLmedia); + return $this->sendCheckAndSendMedia($filepath, $size, $to, 'video', $allowedExtensions, $storeURLmedia, $caption); } else{ $this->sendRequestFileUpload($fhash, 'video', $fsize, $filepath, $to); @@ -2052,6 +2052,7 @@ protected function processInboundDataNode(ProtocolNode $node, $autoReceipt = tru $node->getChild("media")->getAttribute('filehash'), $node->getChild("media")->getAttribute('width'), $node->getChild("media")->getAttribute('height'), + $node->getChild("media")->getAttribute('caption'), $node->getChild("media")->getData() ); } elseif ($node->getChild("media")->getAttribute('type') == 'video') { @@ -2070,6 +2071,7 @@ protected function processInboundDataNode(ProtocolNode $node, $autoReceipt = tru $node->getChild("media")->getAttribute('duration'), $node->getChild("media")->getAttribute('vcodec'), $node->getChild("media")->getAttribute('acodec'), + $node->getChild("media")->getAttribute('caption'), $node->getChild("media")->getData() ); } elseif ($node->getChild("media")->getAttribute('type') == 'audio') { @@ -2671,18 +2673,22 @@ protected function processUploadResponse($node) $mediaAttribs["file"] = $filename; $mediaAttribs["size"] = $filesize; $mediaAttribs["hash"] = $filehash; + $mediaAttribs["caption"] = $this->mediaQueue[$id]['caption']; $filepath = $this->mediaQueue[$id]['filePath']; $to = $this->mediaQueue[$id]['to']; switch ($filetype) { case "image": + $caption = $this->mediaQueue[$id]['caption']; $icon = createIcon($filepath); break; case "video": + $caption = $this->mediaQueue[$id]['caption']; $icon = createVideoIcon($filepath); break; default: + $caption = ''; $icon = ''; break; } @@ -2702,6 +2708,7 @@ protected function processUploadResponse($node) $filename, $filesize, $filehash, + $caption, $icon ); return true; @@ -2779,13 +2786,13 @@ public function readStanza() * @param bool $storeURLmedia Keep a copy of the media file * @return bool */ - protected function sendCheckAndSendMedia($filepath, $maxSize, $to, $type, $allowedExtensions, $storeURLmedia) + protected function sendCheckAndSendMedia($filepath, $maxSize, $to, $type, $allowedExtensions, $storeURLmedia, $caption = "") { if ($this->getMediaFile($filepath, $maxSize) == true) { if (in_array($this->mediaFileInfo['fileextension'], $allowedExtensions)) { $b64hash = base64_encode(hash_file("sha256", $this->mediaFileInfo['filepath'], true)); //request upload - $this->sendRequestFileUpload($b64hash, $type, $this->mediaFileInfo['filesize'], $this->mediaFileInfo['filepath'], $to); + $this->sendRequestFileUpload($b64hash, $type, $this->mediaFileInfo['filesize'], $this->mediaFileInfo['filepath'], $to, $caption); $this->processTempMediaFile($storeURLmedia); return true; } else { @@ -3002,7 +3009,7 @@ protected function sendNode($node, $encrypt = true) * @param string $to * Recipient */ - protected function sendRequestFileUpload($b64hash, $type, $size, $filepath, $to) + protected function sendRequestFileUpload($b64hash, $type, $size, $filepath, $to, $caption = "") { $hash = array(); $hash["hash"] = $b64hash; @@ -3023,7 +3030,7 @@ protected function sendRequestFileUpload($b64hash, $type, $size, $filepath, $to) } //add to queue $messageId = $this->createMsgId("message"); - $this->mediaQueue[$id] = array("messageNode" => $node, "filePath" => $filepath, "to" => $to, "message_id" => $messageId); + $this->mediaQueue[$id] = array("messageNode" => $node, "filePath" => $filepath, "to" => $to, "message_id" => $messageId, "caption" => $caption); $this->sendNode($node); $this->waitForServer($hash["id"]); From 5fe4cc023df7ebef1b4b65db81621856c44404cf Mon Sep 17 00:00:00 2001 From: "Dennis D." Date: Wed, 15 Oct 2014 20:10:19 +0200 Subject: [PATCH 022/436] Update WhatsAppEventListener.php --- src/events/WhatsAppEventListener.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/events/WhatsAppEventListener.php b/src/events/WhatsAppEventListener.php index 21f42169..bb9d0438 100755 --- a/src/events/WhatsAppEventListener.php +++ b/src/events/WhatsAppEventListener.php @@ -155,7 +155,7 @@ function onGetImage( $width, // The image width. $height, // The image height. $thumbnail, // The base64_encode image thumbnail. - $caption // The image caption. + $caption // The image caption. ); function onGetLocation( @@ -268,7 +268,7 @@ function onGetVideo( $vcodec, // The video codec. $acodec, // The audio codec. $thumbnail, // The base64_encode video thumbnail. - $caption // The video caption. + $caption // The video caption. ); function onGroupsChatCreate( @@ -318,7 +318,7 @@ function onMediaMessageSent( $filename, $filesize, $filehash, - $caption, + $caption, $icon ); From 7205a500cfccb81eba86bbc342a4c6760ebed99d Mon Sep 17 00:00:00 2001 From: "Dennis D." Date: Wed, 15 Oct 2014 20:12:16 +0200 Subject: [PATCH 023/436] Update WhatsAppEvent.php --- src/WhatsAppEvent.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/WhatsAppEvent.php b/src/WhatsAppEvent.php index bffddc6f..4b39fe2e 100755 --- a/src/WhatsAppEvent.php +++ b/src/WhatsAppEvent.php @@ -361,7 +361,7 @@ function fireGetImage( $width, $height, $thumbnail, - $caption + $caption ) { $callbackEvent = function(WhatsAppEventListener $listener) use ($phone, $from, $msgid, $type, $time, $name, $size, $url, $file, $mimetype, $filehash, $width, $height, $thumbnail, $caption) { $listener->onGetImage($phone, $from, $msgid, $type, $time, $name, $size, $url, $file, $mimetype, $filehash, $width, $height, $thumbnail, $caption); @@ -529,7 +529,7 @@ function fireGetVideo( $vcodec, $acodec, $thumbnail, - $caption + $caption ) { $callbackEvent = function(WhatsAppEventListener $listener) use ($phone, $from, $msgid, $type, $time, $name, $url, $file, $size, $mimetype, $filehash, $duration, $vcodec, $acodec, $thumbnail, $caption){ $listener->onGetVideo($phone, $from, $msgid, $type, $time, $name, $url, $file, $size, $mimetype, $filehash, $duration, $vcodec, $acodec, $thumbnail, $caption); @@ -620,7 +620,7 @@ function fireMediaMessageSent( $filename, $filesize, $filehash, - $caption, + $caption, $icon ) { $callbackEvent = function(WhatsAppEventListener $listener) use ($phone, $to, $id, $filetype, $url, $filename, $filesize, $filehash, $caption, $icon) { From 824ca6738845a85dc3a9fe24ec7025ff1e142366 Mon Sep 17 00:00:00 2001 From: "Dennis D." Date: Wed, 15 Oct 2014 20:13:06 +0200 Subject: [PATCH 024/436] Update WhatsAppEventListenerBase.php --- src/events/WhatsAppEventListenerBase.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/events/WhatsAppEventListenerBase.php b/src/events/WhatsAppEventListenerBase.php index 45e3b2d5..b9352cdc 100755 --- a/src/events/WhatsAppEventListenerBase.php +++ b/src/events/WhatsAppEventListenerBase.php @@ -161,7 +161,7 @@ function onGetImage( $width, $height, $thumbnail, - $caption + $caption ) {} function onGetLocation( @@ -259,7 +259,7 @@ function onGetVideo( $vcodec, $acodec, $thumbnail, - $caption + $caption ) {} function onGroupsChatCreate( @@ -414,7 +414,7 @@ public function onMediaMessageSent( $url, $filename, $filesize, - $caption, + $caption, $icon ) {} From 1ff3d9f904c3f020262cd46258a2261df315bdd4 Mon Sep 17 00:00:00 2001 From: "Dennis D." Date: Wed, 15 Oct 2014 20:13:48 +0200 Subject: [PATCH 025/436] Update WhatsAppEventListenerProxy.php --- src/events/WhatsAppEventListenerProxy.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/events/WhatsAppEventListenerProxy.php b/src/events/WhatsAppEventListenerProxy.php index b8edd0d5..ceae70ea 100755 --- a/src/events/WhatsAppEventListenerProxy.php +++ b/src/events/WhatsAppEventListenerProxy.php @@ -192,7 +192,7 @@ function onGetImage( $width, $height, $thumbnail, - $caption + $caption ) { $this->handleEvent(__FUNCTION__, func_get_args()); } @@ -310,7 +310,7 @@ function onGetVideo( $vcodec, $acodec, $thumbnail, - $caption + $caption ) { $this->handleEvent(__FUNCTION__, func_get_args()); } @@ -513,7 +513,7 @@ public function onMediaMessageSent( $filename, $filesize, $filehash, - $caption, + $caption, $icon ) { $this->handleEvent(__FUNCTION__, func_get_args()); From 37e2036c46c316215b33163e3b1ac754108eaa48 Mon Sep 17 00:00:00 2001 From: "Dennis D." Date: Wed, 15 Oct 2014 20:18:14 +0200 Subject: [PATCH 026/436] Update whatsprot.class.php --- src/whatsprot.class.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index eb1c6957..472c65bd 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -2052,7 +2052,7 @@ protected function processInboundDataNode(ProtocolNode $node, $autoReceipt = tru $node->getChild("media")->getAttribute('filehash'), $node->getChild("media")->getAttribute('width'), $node->getChild("media")->getAttribute('height'), - $node->getChild("media")->getAttribute('caption'), + $node->getChild("media")->getAttribute('caption'), $node->getChild("media")->getData() ); } elseif ($node->getChild("media")->getAttribute('type') == 'video') { @@ -2071,7 +2071,7 @@ protected function processInboundDataNode(ProtocolNode $node, $autoReceipt = tru $node->getChild("media")->getAttribute('duration'), $node->getChild("media")->getAttribute('vcodec'), $node->getChild("media")->getAttribute('acodec'), - $node->getChild("media")->getAttribute('caption'), + $node->getChild("media")->getAttribute('caption'), $node->getChild("media")->getData() ); } elseif ($node->getChild("media")->getAttribute('type') == 'audio') { @@ -2673,22 +2673,22 @@ protected function processUploadResponse($node) $mediaAttribs["file"] = $filename; $mediaAttribs["size"] = $filesize; $mediaAttribs["hash"] = $filehash; - $mediaAttribs["caption"] = $this->mediaQueue[$id]['caption']; + $mediaAttribs["caption"] = $this->mediaQueue[$id]['caption']; $filepath = $this->mediaQueue[$id]['filePath']; $to = $this->mediaQueue[$id]['to']; switch ($filetype) { case "image": - $caption = $this->mediaQueue[$id]['caption']; + $caption = $this->mediaQueue[$id]['caption']; $icon = createIcon($filepath); break; case "video": - $caption = $this->mediaQueue[$id]['caption']; + $caption = $this->mediaQueue[$id]['caption']; $icon = createVideoIcon($filepath); break; default: - $caption = ''; + $caption = ''; $icon = ''; break; } From c0a84dcef732fb83cac73245e089c73b9d1f8fec Mon Sep 17 00:00:00 2001 From: denno Date: Wed, 15 Oct 2014 21:29:19 +0200 Subject: [PATCH 027/436] generatePaymentLink-Description added --- src/func.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/func.php b/src/func.php index 3a377794..bcfd09d4 100755 --- a/src/func.php +++ b/src/func.php @@ -190,6 +190,18 @@ function updateData($nameFile, $WAver, $classesMD5 = "") fclose($open); } +/** + * This function generates a paymentLink where you can extend the account-expiration. + * + * @param string $number + * Your number with international code, e.g. 49123456789 + * @param int $sku + * The Time in years (1, 3 or 5) you want to extend the account-expiration. + * + * @return string + * Returns the link. + * +**/ function generatePaymentLink($number, $sku) { if ( $sku != 1 or $sku != 3 or $sku != 5 ) From 2a97b54b7a7f7baaa54a42bfb99d9732d9b3df71 Mon Sep 17 00:00:00 2001 From: denno Date: Wed, 15 Oct 2014 22:53:19 +0200 Subject: [PATCH 028/436] Corrected the reversed sequence for getImage- and getVideo-Event --- src/WhatsAppEvent.php | 16 ++++++++-------- src/events/WhatsAppEventListener.php | 8 ++++---- src/events/WhatsAppEventListenerBase.php | 8 ++++---- src/events/WhatsAppEventListenerProxy.php | 8 ++++---- src/whatsprot.class.php | 4 ++-- 5 files changed, 22 insertions(+), 22 deletions(-) diff --git a/src/WhatsAppEvent.php b/src/WhatsAppEvent.php index 4b39fe2e..2c119911 100755 --- a/src/WhatsAppEvent.php +++ b/src/WhatsAppEvent.php @@ -360,11 +360,11 @@ function fireGetImage( $filehash, $width, $height, - $thumbnail, - $caption + $caption, + $thumbnail ) { - $callbackEvent = function(WhatsAppEventListener $listener) use ($phone, $from, $msgid, $type, $time, $name, $size, $url, $file, $mimetype, $filehash, $width, $height, $thumbnail, $caption) { - $listener->onGetImage($phone, $from, $msgid, $type, $time, $name, $size, $url, $file, $mimetype, $filehash, $width, $height, $thumbnail, $caption); + $callbackEvent = function(WhatsAppEventListener $listener) use ($phone, $from, $msgid, $type, $time, $name, $size, $url, $file, $mimetype, $filehash, $width, $height, $caption, $thumbnail) { + $listener->onGetImage($phone, $from, $msgid, $type, $time, $name, $size, $url, $file, $mimetype, $filehash, $width, $height, $caption, $thumbnail); }; $this->fireCallback($callbackEvent); } @@ -528,11 +528,11 @@ function fireGetVideo( $duration, $vcodec, $acodec, - $thumbnail, - $caption + $caption, + $thumbnail ) { - $callbackEvent = function(WhatsAppEventListener $listener) use ($phone, $from, $msgid, $type, $time, $name, $url, $file, $size, $mimetype, $filehash, $duration, $vcodec, $acodec, $thumbnail, $caption){ - $listener->onGetVideo($phone, $from, $msgid, $type, $time, $name, $url, $file, $size, $mimetype, $filehash, $duration, $vcodec, $acodec, $thumbnail, $caption); + $callbackEvent = function(WhatsAppEventListener $listener) use ($phone, $from, $msgid, $type, $time, $name, $url, $file, $size, $mimetype, $filehash, $duration, $vcodec, $acodec, $caption, $thumbnail){ + $listener->onGetVideo($phone, $from, $msgid, $type, $time, $name, $url, $file, $size, $mimetype, $filehash, $duration, $vcodec, $acodec, $caption, $thumbnail); }; $this->fireCallback($callbackEvent); } diff --git a/src/events/WhatsAppEventListener.php b/src/events/WhatsAppEventListener.php index bb9d0438..c48f4752 100755 --- a/src/events/WhatsAppEventListener.php +++ b/src/events/WhatsAppEventListener.php @@ -154,8 +154,8 @@ function onGetImage( $filehash, // The image file hash. $width, // The image width. $height, // The image height. - $thumbnail, // The base64_encode image thumbnail. - $caption // The image caption. + $caption, // The image caption. + $thumbnail // The base64_encode image thumbnail. ); function onGetLocation( @@ -267,8 +267,8 @@ function onGetVideo( $duration, // The video duration. $vcodec, // The video codec. $acodec, // The audio codec. - $thumbnail, // The base64_encode video thumbnail. - $caption // The video caption. + $caption, // The video caption. + $thumbnail // The base64_encode video thumbnail. ); function onGroupsChatCreate( diff --git a/src/events/WhatsAppEventListenerBase.php b/src/events/WhatsAppEventListenerBase.php index b9352cdc..8a960754 100755 --- a/src/events/WhatsAppEventListenerBase.php +++ b/src/events/WhatsAppEventListenerBase.php @@ -160,8 +160,8 @@ function onGetImage( $filehash, $width, $height, - $thumbnail, - $caption + $caption, + $thumbnail ) {} function onGetLocation( @@ -258,8 +258,8 @@ function onGetVideo( $duration, $vcodec, $acodec, - $thumbnail, - $caption + $caption, + $thumbnail ) {} function onGroupsChatCreate( diff --git a/src/events/WhatsAppEventListenerProxy.php b/src/events/WhatsAppEventListenerProxy.php index ceae70ea..76ddc124 100755 --- a/src/events/WhatsAppEventListenerProxy.php +++ b/src/events/WhatsAppEventListenerProxy.php @@ -191,8 +191,8 @@ function onGetImage( $filehash, $width, $height, - $thumbnail, - $caption + $caption, + $thumbnail ) { $this->handleEvent(__FUNCTION__, func_get_args()); } @@ -309,8 +309,8 @@ function onGetVideo( $duration, $vcodec, $acodec, - $thumbnail, - $caption + $caption, + $thumbnail ) { $this->handleEvent(__FUNCTION__, func_get_args()); } diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index 472c65bd..d75b2110 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -2052,7 +2052,7 @@ protected function processInboundDataNode(ProtocolNode $node, $autoReceipt = tru $node->getChild("media")->getAttribute('filehash'), $node->getChild("media")->getAttribute('width'), $node->getChild("media")->getAttribute('height'), - $node->getChild("media")->getAttribute('caption'), + $node->getChild("media")->getAttribute('caption'), $node->getChild("media")->getData() ); } elseif ($node->getChild("media")->getAttribute('type') == 'video') { @@ -2071,7 +2071,7 @@ protected function processInboundDataNode(ProtocolNode $node, $autoReceipt = tru $node->getChild("media")->getAttribute('duration'), $node->getChild("media")->getAttribute('vcodec'), $node->getChild("media")->getAttribute('acodec'), - $node->getChild("media")->getAttribute('caption'), + $node->getChild("media")->getAttribute('caption'), $node->getChild("media")->getData() ); } elseif ($node->getChild("media")->getAttribute('type') == 'audio') { From 7888ccc14aef37ef485bf10d5b682c677f4e5703 Mon Sep 17 00:00:00 2001 From: denno Date: Thu, 16 Oct 2014 00:29:32 +0200 Subject: [PATCH 029/436] changing order of params for getImage- and getVideo-Events to ensure backward compatibility --- src/WhatsAppEvent.php | 16 ++++++++-------- src/events/WhatsAppEventListener.php | 8 ++++---- src/events/WhatsAppEventListenerBase.php | 8 ++++---- src/events/WhatsAppEventListenerProxy.php | 8 ++++---- src/whatsprot.class.php | 8 ++++---- 5 files changed, 24 insertions(+), 24 deletions(-) diff --git a/src/WhatsAppEvent.php b/src/WhatsAppEvent.php index 2c119911..c5bec540 100755 --- a/src/WhatsAppEvent.php +++ b/src/WhatsAppEvent.php @@ -360,11 +360,11 @@ function fireGetImage( $filehash, $width, $height, - $caption, - $thumbnail + $thumbnail, + $caption ) { - $callbackEvent = function(WhatsAppEventListener $listener) use ($phone, $from, $msgid, $type, $time, $name, $size, $url, $file, $mimetype, $filehash, $width, $height, $caption, $thumbnail) { - $listener->onGetImage($phone, $from, $msgid, $type, $time, $name, $size, $url, $file, $mimetype, $filehash, $width, $height, $caption, $thumbnail); + $callbackEvent = function(WhatsAppEventListener $listener) use ($phone, $from, $msgid, $type, $time, $name, $size, $url, $file, $mimetype, $filehash, $width, $height, $thumbnail, $caption) { + $listener->onGetImage($phone, $from, $msgid, $type, $time, $name, $size, $url, $file, $mimetype, $filehash, $width, $height, $thumbnail, $caption); }; $this->fireCallback($callbackEvent); } @@ -528,11 +528,11 @@ function fireGetVideo( $duration, $vcodec, $acodec, - $caption, - $thumbnail + $thumbnail, + $caption ) { - $callbackEvent = function(WhatsAppEventListener $listener) use ($phone, $from, $msgid, $type, $time, $name, $url, $file, $size, $mimetype, $filehash, $duration, $vcodec, $acodec, $caption, $thumbnail){ - $listener->onGetVideo($phone, $from, $msgid, $type, $time, $name, $url, $file, $size, $mimetype, $filehash, $duration, $vcodec, $acodec, $caption, $thumbnail); + $callbackEvent = function(WhatsAppEventListener $listener) use ($phone, $from, $msgid, $type, $time, $name, $url, $file, $size, $mimetype, $filehash, $duration, $vcodec, $acodec, $thumbnail, $caption){ + $listener->onGetVideo($phone, $from, $msgid, $type, $time, $name, $url, $file, $size, $mimetype, $filehash, $duration, $vcodec, $acodec, $thumbnail, $caption); }; $this->fireCallback($callbackEvent); } diff --git a/src/events/WhatsAppEventListener.php b/src/events/WhatsAppEventListener.php index c48f4752..545b88e8 100755 --- a/src/events/WhatsAppEventListener.php +++ b/src/events/WhatsAppEventListener.php @@ -154,8 +154,8 @@ function onGetImage( $filehash, // The image file hash. $width, // The image width. $height, // The image height. - $caption, // The image caption. - $thumbnail // The base64_encode image thumbnail. + $thumbnail, // The base64_encode image thumbnail. + $caption // The image caption. ); function onGetLocation( @@ -267,8 +267,8 @@ function onGetVideo( $duration, // The video duration. $vcodec, // The video codec. $acodec, // The audio codec. - $caption, // The video caption. - $thumbnail // The base64_encode video thumbnail. + $thumbnail, // The base64_encode video thumbnail. + $caption // The video caption. ); function onGroupsChatCreate( diff --git a/src/events/WhatsAppEventListenerBase.php b/src/events/WhatsAppEventListenerBase.php index 8a960754..c25427c1 100755 --- a/src/events/WhatsAppEventListenerBase.php +++ b/src/events/WhatsAppEventListenerBase.php @@ -160,8 +160,8 @@ function onGetImage( $filehash, $width, $height, - $caption, - $thumbnail + $thumbnail, + $caption ) {} function onGetLocation( @@ -258,8 +258,8 @@ function onGetVideo( $duration, $vcodec, $acodec, - $caption, - $thumbnail + $thumbnail, + $caption ) {} function onGroupsChatCreate( diff --git a/src/events/WhatsAppEventListenerProxy.php b/src/events/WhatsAppEventListenerProxy.php index 76ddc124..8effdb29 100755 --- a/src/events/WhatsAppEventListenerProxy.php +++ b/src/events/WhatsAppEventListenerProxy.php @@ -191,8 +191,8 @@ function onGetImage( $filehash, $width, $height, - $caption, - $thumbnail + $thumbnail, + $caption ) { $this->handleEvent(__FUNCTION__, func_get_args()); } @@ -309,8 +309,8 @@ function onGetVideo( $duration, $vcodec, $acodec, - $caption, - $thumbnail + $thumbnail, + $caption ) { $this->handleEvent(__FUNCTION__, func_get_args()); } diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index d75b2110..96b23965 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -2052,8 +2052,8 @@ protected function processInboundDataNode(ProtocolNode $node, $autoReceipt = tru $node->getChild("media")->getAttribute('filehash'), $node->getChild("media")->getAttribute('width'), $node->getChild("media")->getAttribute('height'), - $node->getChild("media")->getAttribute('caption'), - $node->getChild("media")->getData() + $node->getChild("media")->getData(), + $node->getChild("media")->getAttribute('caption') ); } elseif ($node->getChild("media")->getAttribute('type') == 'video') { $this->eventManager()->fireGetVideo( @@ -2071,8 +2071,8 @@ protected function processInboundDataNode(ProtocolNode $node, $autoReceipt = tru $node->getChild("media")->getAttribute('duration'), $node->getChild("media")->getAttribute('vcodec'), $node->getChild("media")->getAttribute('acodec'), - $node->getChild("media")->getAttribute('caption'), - $node->getChild("media")->getData() + $node->getChild("media")->getData(), + $node->getChild("media")->getAttribute('caption') ); } elseif ($node->getChild("media")->getAttribute('type') == 'audio') { $this->eventManager()->fireGetAudio( From 7b6d3ec47d78b81910ca38ffc8e7aa260aa7cc26 Mon Sep 17 00:00:00 2001 From: alesantosp Date: Thu, 16 Oct 2014 16:04:39 -0300 Subject: [PATCH 030/436] Removing notices from checkCredentials This function doesn't receive any parameters, so some variables was used but not initializated before. --- src/whatsprot.class.php | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index 96b23965..618bf8c9 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -154,18 +154,16 @@ public function checkCredentials() throw new Exception('The provided phone number is not valid.'); } + $countryCode = 'US'; //setting to US default; + $langCode = 'en'; //setting to en default; + if ($countryCode == null && $phone['ISO3166'] != '') { $countryCode = $phone['ISO3166']; } - if ($countryCode == null) { - $countryCode = 'US'; - } + if ($langCode == null && $phone['ISO639'] != '') { $langCode = $phone['ISO639']; } - if ($langCode == null) { - $langCode = 'en'; - } // Build the url. $host = 'https://' . static::WHATSAPP_CHECK_HOST; From 22e60e19cfe58cec0137be38887f86c91c91617f Mon Sep 17 00:00:00 2001 From: alesantosp Date: Thu, 16 Oct 2014 16:36:32 -0300 Subject: [PATCH 031/436] Removing notices checkCredentials and codeRegister These function doesn't receive any parameters, so some variables was used but not initializated before. --- src/whatsprot.class.php | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index 618bf8c9..e9948e6f 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -154,16 +154,21 @@ public function checkCredentials() throw new Exception('The provided phone number is not valid.'); } - $countryCode = 'US'; //setting to US default; - $langCode = 'en'; //setting to en default; + $countryCode = null; + $langCode = null; if ($countryCode == null && $phone['ISO3166'] != '') { $countryCode = $phone['ISO3166']; } - + if ($countryCode == null) { + $countryCode = 'US'; + } if ($langCode == null && $phone['ISO639'] != '') { $langCode = $phone['ISO639']; } + if ($langCode == null) { + $langCode = 'en'; + } // Build the url. $host = 'https://' . static::WHATSAPP_CHECK_HOST; @@ -229,6 +234,9 @@ public function codeRegister($code) throw new Exception('The provided phone number is not valid.'); } + $countryCode = null; + $langCode = null; + if ($countryCode == null && $phone['ISO3166'] != '') { $countryCode = $phone['ISO3166']; } From 9ed8f36e058aed3df2f2cedfd8bb4f7fa4f0b38e Mon Sep 17 00:00:00 2001 From: alesantosp Date: Thu, 16 Oct 2014 17:10:57 -0300 Subject: [PATCH 032/436] correct identation correct identation --- src/whatsprot.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index e9948e6f..eff1495b 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -154,8 +154,8 @@ public function checkCredentials() throw new Exception('The provided phone number is not valid.'); } - $countryCode = null; - $langCode = null; + $countryCode = null; + $langCode = null; if ($countryCode == null && $phone['ISO3166'] != '') { $countryCode = $phone['ISO3166']; From 11e13fdc9b6058fba35a3f5d26d4f22d2a5cdf7a Mon Sep 17 00:00:00 2001 From: alesantosp Date: Thu, 16 Oct 2014 17:12:20 -0300 Subject: [PATCH 033/436] identation ajust --- src/whatsprot.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index eff1495b..95f50a45 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -154,8 +154,8 @@ public function checkCredentials() throw new Exception('The provided phone number is not valid.'); } - $countryCode = null; - $langCode = null; + $countryCode = null; + $langCode = null; if ($countryCode == null && $phone['ISO3166'] != '') { $countryCode = $phone['ISO3166']; From 0fdd48d397ed5f95741aa8b85c83355945d4b4cb Mon Sep 17 00:00:00 2001 From: mgp25 Date: Sat, 18 Oct 2014 00:56:09 +0200 Subject: [PATCH 034/436] Little fix I forgot to add trim() and print pw :P --- examples/registerTool.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/examples/registerTool.php b/examples/registerTool.php index 6621c03a..7e6a5c83 100644 --- a/examples/registerTool.php +++ b/examples/registerTool.php @@ -37,7 +37,8 @@ try { - $w->codeRegister($code); + $result = $w->codeRegister(trim($code)); + echo "\nYour password is: ".$result->pw; } catch(Exception $e) { From ec52c1c75040243998819523b5803d34b6528ec8 Mon Sep 17 00:00:00 2001 From: mgp25 Date: Sat, 18 Oct 2014 01:13:51 +0200 Subject: [PATCH 035/436] Ack event --- src/WhatsAppEvent.php | 7 ++++--- src/events/WhatsAppEventListener.php | 3 ++- src/events/WhatsAppEventListenerBase.php | 3 ++- src/events/WhatsAppEventListenerProxy.php | 3 ++- 4 files changed, 10 insertions(+), 6 deletions(-) diff --git a/src/WhatsAppEvent.php b/src/WhatsAppEvent.php index c5bec540..0d351838 100755 --- a/src/WhatsAppEvent.php +++ b/src/WhatsAppEvent.php @@ -672,10 +672,11 @@ function fireMessageReceivedServer( $phone, $from, $msgid, - $type + $type, + $time ) { - $callbackEvent = function(WhatsAppEventListener $listener) use ($phone, $from, $msgid, $type) { - $listener->onMessageReceivedServer($phone, $from, $msgid, $type); + $callbackEvent = function(WhatsAppEventListener $listener) use ($phone, $from, $msgid, $type, $time) { + $listener->onMessageReceivedServer($phone, $from, $msgid, $type, $time); }; $this->fireCallback($callbackEvent); } diff --git a/src/events/WhatsAppEventListener.php b/src/events/WhatsAppEventListener.php index 545b88e8..7cb31ad3 100755 --- a/src/events/WhatsAppEventListener.php +++ b/src/events/WhatsAppEventListener.php @@ -358,7 +358,8 @@ function onMessageReceivedServer( $phone, // The user phone number including the country code. $from, // The sender JID. $msgid, // The message id. - $type // The message type. + $type, // The message type. + $time // The unix time when send message notification. ); function onPaidAccount( diff --git a/src/events/WhatsAppEventListenerBase.php b/src/events/WhatsAppEventListenerBase.php index c25427c1..0b269dd3 100755 --- a/src/events/WhatsAppEventListenerBase.php +++ b/src/events/WhatsAppEventListenerBase.php @@ -323,7 +323,8 @@ function onMessageReceivedServer( $phone, $from, $msgid, - $type + $type, + $time ) {} function onPaidAccount( diff --git a/src/events/WhatsAppEventListenerProxy.php b/src/events/WhatsAppEventListenerProxy.php index 8effdb29..f70525e6 100755 --- a/src/events/WhatsAppEventListenerProxy.php +++ b/src/events/WhatsAppEventListenerProxy.php @@ -394,7 +394,8 @@ function onMessageReceivedServer( $phone, $from, $msgid, - $type + $type, + $time ) { $this->handleEvent(__FUNCTION__, func_get_args()); } From 41edd8c042397935841fa10b2dfdd4e71603db15 Mon Sep 17 00:00:00 2001 From: mgp25 Date: Sat, 18 Oct 2014 01:14:46 +0200 Subject: [PATCH 036/436] See decription Ack node fixed Added encrypt notification --- src/whatsprot.class.php | 70 ++++++++++++++++++----------------------- 1 file changed, 31 insertions(+), 39 deletions(-) diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index 95f50a45..38d5617b 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -156,7 +156,7 @@ public function checkCredentials() $countryCode = null; $langCode = null; - + if ($countryCode == null && $phone['ISO3166'] != '') { $countryCode = $phone['ISO3166']; } @@ -236,7 +236,7 @@ public function codeRegister($code) $countryCode = null; $langCode = null; - + if ($countryCode == null && $phone['ISO3166'] != '') { $countryCode = $phone['ISO3166']; } @@ -1979,13 +1979,14 @@ protected function processInboundDataNode(ProtocolNode $node, $autoReceipt = tru $node->getChild(0)->getTag() ); } - elseif($node->getTag() == '' && $node->getAttribute("class") == "message") + elseif($node->getTag() == 'ack' && $node->getAttribute("class") == "message") { $this->eventManager()->fireMessageReceivedServer( $this->phoneNumber, $node->getAttribute('from'), $node->getAttribute('id'), - $node->getAttribute('class') + $node->getAttribute('class'), + $node->getAttribute('t') ); } elseif($node->getTag() == 'receipt') @@ -2414,57 +2415,48 @@ protected function processInboundDataNode(ProtocolNode $node, $autoReceipt = tru case "contacts": //TODO break; - case "participant": + case "encrypt": + $value = $node->getChild(0)->getAttribute('value'); + if (is_numeric($value)){ + + + } + else{ + echo "Corrupt Stream: value " . $value . "is not numeric"; + } + case "w:gp2": if ($node->hasChild('remove')) { $this->eventManager()->fireGroupsParticipantsRemove( $this->phoneNumber, $node->getAttribute('from'), - $node->getChild(0)->getAttribute('jid'), - $node->getChild(0)->getAttribute('author') + $node->getChild(0)->getAttribute('jid') ); - } else if ($node->hasChild('add')) { + } else if ($node->hasChild('add')) { $this->eventManager()->fireGroupsParticipantsAdd( $this->phoneNumber, $node->getAttribute('from'), $node->getChild(0)->getAttribute('jid') ); - } - //TODO - break; - case "subject": - $this->eventManager()->fireGetGroupsSubject( - $this->phoneNumber, - $node->getAttribute('from'), - $node->getAttribute('t'), - $node->getAttribute('participant'), - $node->getAttribute('participant'), - $node->getAttribute('notify'), - $node->getChild(0)->getData() - ); - //TODO - break; - case "w:gp2": - if ($node->hasChild('remove')) { - $this->eventManager()->fireGroupsParticipantsRemove( + } + else if ($node->hasChild('create')) { + $this->eventManager()->fireGroupisCreated( $this->phoneNumber, - $node->getAttribute('from'), - $node->getChild(0)->getAttribute('jid') + $node->getChild(0)->getChild(0)->getAttribute('creator'), + $node->getChild(0)->getChild(0)->getAttribute('id'), + $node->getChild(0)->getChild(0)->getAttribute('subject') ); - } else if ($node->hasChild('add')) { - $this->eventManager()->fireGroupsParticipantsAdd( + } + else if ($node->hasChild('subject')) { + $this->eventManager()->fireGetGroupsSubject( $this->phoneNumber, $node->getAttribute('from'), - $node->getChild(0)->getAttribute('jid') + $node->getAttribute('t'), + $node->getAttribute('participant'), + $node->getAttribute('participant'), + $node->getAttribute('notify'), + $node->getChild(0)->getAttribute('subject') ); } - else if ($node->hasChild('create')) { - $this->eventManager()->fireGroupisCreated( - $this->phoneNumber, - $node->getChild(0)->getChild(0)->getAttribute('creator'), - $node->getChild(0)->getChild(0)->getAttribute('id'), - $node->getChild(0)->getChild(0)->getAttribute('subject') - ); - } break; case "account": if (($node->getChild(0)->getAttribute('author')) == "") From 3485c3820d4e267b91a76b810703a6ff11dadb44 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ferm=C3=ADn=20Olaiz?= Date: Fri, 17 Oct 2014 20:42:45 -0300 Subject: [PATCH 037/436] Fixed nextChallenge (no such file) error WhatsAPI started throwing this error ((nextChallenge.dat) failed to open stream: No such file or directory) when I implemented trigger_error inside a try-catch block that init WAPI. --- src/whatsprot.class.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index 38d5617b..dd9fead6 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -522,9 +522,10 @@ public function login() public function loginWithPassword($password) { $this->password = $password; - $challengeData = @file_get_contents($this->challengeFilename); - if($challengeData) { - $this->challengeData = $challengeData; + if(is_readable($this->challengeFilename)) { + $challengeData = file_get_contents($this->challengeFilename); + if($challengeData) + $this->challengeData = $challengeData; } $this->doLogin(); } From 82fe5d4c0825f697d0a1bed582369d2bbf31e46d Mon Sep 17 00:00:00 2001 From: mgp25 Date: Sat, 18 Oct 2014 01:45:16 +0200 Subject: [PATCH 038/436] encrypt case break missing --- src/whatsprot.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index 38d5617b..e335d0a2 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -2418,12 +2418,12 @@ protected function processInboundDataNode(ProtocolNode $node, $autoReceipt = tru case "encrypt": $value = $node->getChild(0)->getAttribute('value'); if (is_numeric($value)){ - - + //TODO } else{ echo "Corrupt Stream: value " . $value . "is not numeric"; } + break; case "w:gp2": if ($node->hasChild('remove')) { $this->eventManager()->fireGroupsParticipantsRemove( From 0e1e9ad352e98277aa437b4e613c0c45478232b4 Mon Sep 17 00:00:00 2001 From: Ahmed Raffat Date: Sun, 19 Oct 2014 08:05:37 +0200 Subject: [PATCH 039/436] Latest version 2.11.418 md5 Latest version 2.11.418 md5 --- classesMD5.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/classesMD5.txt b/classesMD5.txt index ae178041..233710af 100644 --- a/classesMD5.txt +++ b/classesMD5.txt @@ -3,6 +3,9 @@ = B64 ENCODED = =============================== +WhatsApp/2.11.418 Android/4.3 Device/GalaxyS3 +NXu/tI3lcaD89NMMxIGvHA== + WhatsApp/2.11.416 Android/4.3 Device/GalaxyS3 5aZ7LEI7a88AxkzGp8gIWw== From cee321a6817de5f13fd5e10d3ed95a1e72cb4d92 Mon Sep 17 00:00:00 2001 From: mgp25 Date: Tue, 21 Oct 2014 01:04:49 +0200 Subject: [PATCH 040/436] Directory issue fixed Updated token to latest one: 2.11.419 --- classesMD5.txt | 3 +++ src/func.php | 12 ++++++------ src/token.php | 2 +- src/whatsprot.class.php | 4 ++-- 4 files changed, 12 insertions(+), 9 deletions(-) diff --git a/classesMD5.txt b/classesMD5.txt index 233710af..266aaadf 100644 --- a/classesMD5.txt +++ b/classesMD5.txt @@ -3,6 +3,9 @@ = B64 ENCODED = =============================== +WhatsApp/2.11.419 Android/4.3 Device/GalaxyS3 +Vu6nzOKzMttaMOYKo7YkEw== + WhatsApp/2.11.418 Android/4.3 Device/GalaxyS3 NXu/tI3lcaD89NMMxIGvHA== diff --git a/src/func.php b/src/func.php index bcfd09d4..684c526a 100755 --- a/src/func.php +++ b/src/func.php @@ -169,18 +169,18 @@ function ArrayEmojis(){ function updateData($nameFile, $WAver, $classesMD5 = "") { - $file = $nameFile; + $file = __DIR__."/".$nameFile; $open = fopen($file, 'r+'); $content = fread($open,filesize($file)); fclose($open); $content = explode("\n",$content); - if ($file == 'token.php') - $content[5] = ' $classesMd5 = '."\"".$classesMD5."\"; // $WAver"; - else if ($file == 'whatsprot.class.php'){ - $content[48] = ' const WHATSAPP_VER = \''.$WAver. '\'; // The WhatsApp version.'; - $content[49] = ' const WHATSAPP_USER_AGENT = \'WhatsApp/'.$WAver.' Android/4.3 Device/GalaxyS3\'; // User agent used in request/registration code.'; + if ($file == __DIR__.'/token.php') + $content[5] = ' $classesMd5 = '."\"".trim($classesMD5)."\"; // $WAver"; + else if ($file == __DIR__.'/whatsprot.class.php'){ + $content[48] = ' const WHATSAPP_VER = \''.trim($WAver). '\'; // The WhatsApp version.'; + $content[49] = ' const WHATSAPP_USER_AGENT = \'WhatsApp/'.trim($WAver).' Android/4.3 Device/GalaxyS3\'; // User agent used in request/registration code.'; } $content = implode("\n",$content); diff --git a/src/token.php b/src/token.php index 84d35c11..2c9625a6 100755 --- a/src/token.php +++ b/src/token.php @@ -3,7 +3,7 @@ function generateRequestToken($country, $phone) { $signature = "MIIDMjCCAvCgAwIBAgIETCU2pDALBgcqhkjOOAQDBQAwfDELMAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFDASBgNVBAcTC1NhbnRhIENsYXJhMRYwFAYDVQQKEw1XaGF0c0FwcCBJbmMuMRQwEgYDVQQLEwtFbmdpbmVlcmluZzEUMBIGA1UEAxMLQnJpYW4gQWN0b24wHhcNMTAwNjI1MjMwNzE2WhcNNDQwMjE1MjMwNzE2WjB8MQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEUMBIGA1UEBxMLU2FudGEgQ2xhcmExFjAUBgNVBAoTDVdoYXRzQXBwIEluYy4xFDASBgNVBAsTC0VuZ2luZWVyaW5nMRQwEgYDVQQDEwtCcmlhbiBBY3RvbjCCAbgwggEsBgcqhkjOOAQBMIIBHwKBgQD9f1OBHXUSKVLfSpwu7OTn9hG3UjzvRADDHj+AtlEmaUVdQCJR+1k9jVj6v8X1ujD2y5tVbNeBO4AdNG/yZmC3a5lQpaSfn+gEexAiwk+7qdf+t8Yb+DtX58aophUPBPuD9tPFHsMCNVQTWhaRMvZ1864rYdcq7/IiAxmd0UgBxwIVAJdgUI8VIwvMspK5gqLrhAvwWBz1AoGBAPfhoIXWmz3ey7yrXDa4V7l5lK+7+jrqgvlXTAs9B4JnUVlXjrrUWU/mcQcQgYC0SRZxI+hMKBYTt88JMozIpuE8FnqLVHyNKOCjrh4rs6Z1kW6jfwv6ITVi8ftiegEkO8yk8b6oUZCJqIPf4VrlnwaSi2ZegHtVJWQBTDv+z0kqA4GFAAKBgQDRGYtLgWh7zyRtQainJfCpiaUbzjJuhMgo4fVWZIvXHaSHBU1t5w//S0lDK2hiqkj8KpMWGywVov9eZxZy37V26dEqr/c2m5qZ0E+ynSu7sqUD7kGx/zeIcGT0H+KAVgkGNQCo5Uc0koLRWYHNtYoIvt5R3X6YZylbPftF/8ayWTALBgcqhkjOOAQDBQADLwAwLAIUAKYCp0d6z4QQdyN74JDfQ2WCyi8CFDUM4CaNB+ceVXdKtOrNTQcc0e+t"; - $classesMd5 = "5aZ7LEI7a88AxkzGp8gIWw=="; // 2.11.416 + $classesMd5 = "Vu6nzOKzMttaMOYKo7YkEw=="; // 2.11.419 $key2 = base64_decode("/UIGKU1FVQa+ATM2A0za7G2KI9S/CwPYjgAbc67v7ep42eO/WeTLx1lb1cHwxpsEgF4+PmYpLd2YpGUdX/A2JQitsHzDwgcdBpUf7psX1BU="); $data = base64_decode($signature) . base64_decode($classesMd5) . $phone; diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index f16e0670..d7037afd 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -46,8 +46,8 @@ class WhatsProt const WHATSAPP_SERVER = 's.whatsapp.net'; // The hostname used to login/send messages. const WHATSAPP_UPLOAD_HOST = 'https://mms.whatsapp.net/client/iphone/upload.php'; // The upload host. const WHATSAPP_DEVICE = 'Android'; // The device name. - const WHATSAPP_VER = '2.11.416'; // The WhatsApp version. - const WHATSAPP_USER_AGENT = 'WhatsApp/2.11.416 Android/4.3 Device/GalaxyS3'; // User agent used in request/registration code. + const WHATSAPP_VER = '2.11.419'; // The WhatsApp version. + const WHATSAPP_USER_AGENT = 'WhatsApp/2.11.419 Android/4.3 Device/GalaxyS3'; // User agent used in request/registration code. const WHATSAPP_VER_CHECKER = 'https://coderus.openrepos.net/whitesoft/whatsapp_version'; // Check WhatsApp version /** From e744de0ef9e290a61837e011bdbf79a2b3754d59 Mon Sep 17 00:00:00 2001 From: mgp25 Date: Tue, 21 Oct 2014 01:28:09 +0200 Subject: [PATCH 041/436] Special thanks --- README.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/README.md b/README.md index eba33e52..d5b61c23 100644 --- a/README.md +++ b/README.md @@ -2,8 +2,23 @@ Interface to WhatsApp Messenger +**Read the [wiki](https://github.com/mgp25/WhatsAPI-Official/wiki)** and previous issues before opeining a new one! Maybe your issue is already answered. + ---------- +### Special thanks + +I would like to thank all those who have made this project goes forward. First I have to thank [@shirioko](https://github.com/shirioko/) aka hero, when I came to the project, i knew nothing and introduced me to the project. He has been responsible of the API for a long time and he always be a hero! Now it's my turn and i hope to do as good as i can to make this API better. + +And I also want to thank all the users that are collaborating with me and are making such good work: + +- [pastoso](https://github.com/pastoso) +- [CODeRUS](https://github.com/CODeRUS) +- [GitsUp](https://github.com/GitsUp) +- [SikiFn](https://github.com/SikiFn) +- [Dennobaby](https://github.com/Dennobaby) + + ### Update October 7th, 2014 This is going to be the official repository of WhatsAPI. We don't support spam and we won't answer issues like "Blocking" or "sending massive messages". From 386617bc301456fa29fa511ac65ea2dd827aab7a Mon Sep 17 00:00:00 2001 From: SikiFn Date: Tue, 21 Oct 2014 08:46:35 +0300 Subject: [PATCH 042/436] Add sendGetServicePricing Method Added sendGetServicePricing Method To The Protocol --- src/whatsprot.class.php | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index d7037afd..4589acf5 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -859,6 +859,30 @@ public function sendGetServerProperties() ), array($child), null); $this->sendNode($node); } + + /** + * Send a request to get the current service pricing + * + * @param string $lg + * Language + * @param string $lc + * Country + */ + public function sendGetServicePricing($lg, $lc) + { + $msgId = $this->createMsgId("get_service_pricing_"); + $pricingNode = new ProtocolNode("pricing", array( + "lg" => $lg, + "lc" => $lc + ), null, null); + $node = new ProtocolNode("iq", array( + "id" => $msgId, + "xmlns" => "urn:xmpp:whatsapp:account", + "type" => "get", + "to" => "s.whatsapp.net" + ), array($pricingNode), null); + $this->sendNode($node); + } /** * Get the current status message of a specific user. From e053d580d93a03b2c7ca96552b709d4ac982ed70 Mon Sep 17 00:00:00 2001 From: dennobaby Date: Tue, 21 Oct 2014 12:09:26 +0200 Subject: [PATCH 043/436] added Event onGetServicePricing --- src/WhatsAppEvent.php | 13 +++++++++++++ src/events/WhatsAppEventListener.php | 8 ++++++++ src/events/WhatsAppEventListenerBase.php | 8 ++++++++ src/events/WhatsAppEventListenerProxy.php | 10 ++++++++++ src/whatsprot.class.php | 10 ++++++++++ 5 files changed, 49 insertions(+) diff --git a/src/WhatsAppEvent.php b/src/WhatsAppEvent.php index 0d351838..a3def182 100755 --- a/src/WhatsAppEvent.php +++ b/src/WhatsAppEvent.php @@ -840,4 +840,17 @@ function firePaidAccount( $this->fireCallback($callbackEvent); } + function fireGetServicePricing( + $phone, + $price, + $cost, + $currency, + $expiration + ) { + $callbackEvent = function(WhatsAppEventListener $listener) use ($phone, $price, $cost, $currency, $expiration) { + $listener->onGetServicePricing($phone, $price, $cost, $currency, $expiration); + }; + $this->fireCallback($callbackEvent); + } + } diff --git a/src/events/WhatsAppEventListener.php b/src/events/WhatsAppEventListener.php index 7cb31ad3..ca1b68bf 100755 --- a/src/events/WhatsAppEventListener.php +++ b/src/events/WhatsAppEventListener.php @@ -376,6 +376,14 @@ function onPing( $msgid // The message id. ); + function onGetServicePricing( + $phone, //the user phone number including country code. + $price, //price string. + $cost, //cost int. + $currency, //currency-code. + $expiration //the unix time when account expires. + ); + function onPresence( $phone, // The user phone number including the country code. $from, // The sender JID. diff --git a/src/events/WhatsAppEventListenerBase.php b/src/events/WhatsAppEventListenerBase.php index 0b269dd3..2d55cf99 100755 --- a/src/events/WhatsAppEventListenerBase.php +++ b/src/events/WhatsAppEventListenerBase.php @@ -336,6 +336,14 @@ function onPaidAccount( $expiration ) {} + function onGetServicePricing( + $phone, + $price, + $cost, + $currency, + $expiration + ) {} + function onPing( $phone, $msgid diff --git a/src/events/WhatsAppEventListenerProxy.php b/src/events/WhatsAppEventListenerProxy.php index f70525e6..8b6fe7e9 100755 --- a/src/events/WhatsAppEventListenerProxy.php +++ b/src/events/WhatsAppEventListenerProxy.php @@ -411,6 +411,16 @@ function onPaidAccount( $this->handleEvent(__FUNCTION__, func_get_args()); } + function onGetServicePricing( + $phone, + $price, + $cost, + $currency, + $expiration + ) { + $this->handleEvent(__FUNCTION__, func_get_args()); + } + function onPing( $phone, $msgid diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index 4589acf5..027bd7e4 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -2372,6 +2372,16 @@ protected function processInboundDataNode(ProtocolNode $node, $autoReceipt = tru ); } } + if($node->getChild("pricing") != null) + { + $this->eventManager()->fireGetServicePricing( + $this->phoneNumber, + $node->getChild(0)->getAttribute("price"), + $node->getChild(0)->getAttribute("cost"), + $node->getChild(0)->getAttribute("currency"), + $node->getChild(0)->getAttribute("expiration") + ); + } if($node->getChild("status") != null) { $child = $node->getChild("status"); From 4d70ba8a18b87230bf3428c576339e1b747b1411 Mon Sep 17 00:00:00 2001 From: dennobaby Date: Tue, 21 Oct 2014 12:14:14 +0200 Subject: [PATCH 044/436] Idention fix in event onGetServicePricing --- src/whatsprot.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index 027bd7e4..72ea61af 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -2381,7 +2381,7 @@ protected function processInboundDataNode(ProtocolNode $node, $autoReceipt = tru $node->getChild(0)->getAttribute("currency"), $node->getChild(0)->getAttribute("expiration") ); - } + } if($node->getChild("status") != null) { $child = $node->getChild("status"); From e3ebcb062d933a3109879268f5844b99c3d1c384 Mon Sep 17 00:00:00 2001 From: SikiFn Date: Tue, 21 Oct 2014 13:51:33 +0300 Subject: [PATCH 045/436] Add sendGetNormalizedJid Method Added the sendGetNormalizedJid Implementation --- src/whatsprot.class.php | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index 72ea61af..4dc753fb 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -883,6 +883,29 @@ public function sendGetServicePricing($lg, $lc) ), array($pricingNode), null); $this->sendNode($node); } + + /** + * Send a request to get the normalized mobile number respresenting the JID + * + * @param string $countryCode + * Contry Code + * @param string $number + * Mobile Number + */ + public function sendGetNormalizedJid($countryCode, $number) + { + $msgId = $this->createMsgId("get_normalized_jid_"); + $ccNode = new ProtocolNode("cc", null, null, $countryCode); + $inNode = new ProtocolNode("in", null, null, $number); + $normalizeNode = new ProtocolNode("normalize", null, array($ccNode, $inNode), null); + $node = new ProtocolNode("iq", array( + "id" => $msgId, + "xmlns" => "urn:xmpp:whatsapp:account", + "type" => "get", + "to" => "s.whatsapp.net" + ), array($normalizeNode), null); + $this->sendNode($node); + } /** * Get the current status message of a specific user. From 602d3f19a99f687d39441d7fd7458eec89cbee55 Mon Sep 17 00:00:00 2001 From: mgp25 Date: Tue, 21 Oct 2014 18:03:55 +0200 Subject: [PATCH 046/436] Update README.md --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index d5b61c23..16650283 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,8 @@ Interface to WhatsApp Messenger **Read the [wiki](https://github.com/mgp25/WhatsAPI-Official/wiki)** and previous issues before opeining a new one! Maybe your issue is already answered. +**[WhatsApp incoming updates log](https://github.com/mgp25/WhatsAPI-Official/wiki/WhatsApp-incoming-updates)** + ---------- ### Special thanks From 6bdf3fc5143dbbd929e59c39cdd51c3dbdd1bd40 Mon Sep 17 00:00:00 2001 From: dennobaby Date: Tue, 21 Oct 2014 19:02:54 +0200 Subject: [PATCH 047/436] added event onGetNormalizedJid --- src/WhatsAppEvent.php | 10 ++++++++++ src/events/WhatsAppEventListener.php | 5 +++++ src/events/WhatsAppEventListenerBase.php | 5 +++++ src/events/WhatsAppEventListenerProxy.php | 7 +++++++ src/whatsprot.class.php | 7 +++++++ 5 files changed, 34 insertions(+) diff --git a/src/WhatsAppEvent.php b/src/WhatsAppEvent.php index a3def182..e5f21757 100755 --- a/src/WhatsAppEvent.php +++ b/src/WhatsAppEvent.php @@ -853,4 +853,14 @@ function fireGetServicePricing( $this->fireCallback($callbackEvent); } + function fireGetNormalizedJid( + $phone, + $result + ) { + $callbackEvent = function(WhatsAppEventListener $listener) use ($phone, $result) { + $listener->onGetNormalizedJid($phone, $result); + }; + $this->fireCallback($callbackEvent); + } + } diff --git a/src/events/WhatsAppEventListener.php b/src/events/WhatsAppEventListener.php index ca1b68bf..06c65c88 100755 --- a/src/events/WhatsAppEventListener.php +++ b/src/events/WhatsAppEventListener.php @@ -384,6 +384,11 @@ function onGetServicePricing( $expiration //the unix time when account expires. ); + function onGetNormalizedJid( + $phone, //the user phone number including country code. + $result //the normalized jid + ); + function onPresence( $phone, // The user phone number including the country code. $from, // The sender JID. diff --git a/src/events/WhatsAppEventListenerBase.php b/src/events/WhatsAppEventListenerBase.php index 2d55cf99..74402a1b 100755 --- a/src/events/WhatsAppEventListenerBase.php +++ b/src/events/WhatsAppEventListenerBase.php @@ -344,6 +344,11 @@ function onGetServicePricing( $expiration ) {} + function onGetNormalizedJid( + $phone, + $result + ) {} + function onPing( $phone, $msgid diff --git a/src/events/WhatsAppEventListenerProxy.php b/src/events/WhatsAppEventListenerProxy.php index 8b6fe7e9..676917db 100755 --- a/src/events/WhatsAppEventListenerProxy.php +++ b/src/events/WhatsAppEventListenerProxy.php @@ -421,6 +421,13 @@ function onGetServicePricing( $this->handleEvent(__FUNCTION__, func_get_args()); } + function onGetNormalizedJid( + $phone, + $result + ) { + $this->handleEvent(__FUNCTION__, func_get_args()); + } + function onPing( $phone, $msgid diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index 72ea61af..427a6dac 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -2382,6 +2382,13 @@ protected function processInboundDataNode(ProtocolNode $node, $autoReceipt = tru $node->getChild(0)->getAttribute("expiration") ); } + if($node->getChild("normalize") != null) + { + $this->eventManager()->fireGetNormalizedJid( + $this->phoneNumber, + $node->getChild(0)->getAttribute("result") + ); + } if($node->getChild("status") != null) { $child = $node->getChild("status"); From aa8de30fca4fdd7058f3da6ddd69df46c43e928f Mon Sep 17 00:00:00 2001 From: mgp25 Date: Tue, 21 Oct 2014 21:54:07 +0200 Subject: [PATCH 048/436] added sendPing function --- src/whatsprot.class.php | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index 34cc8fa9..8717c2cc 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -859,7 +859,7 @@ public function sendGetServerProperties() ), array($child), null); $this->sendNode($node); } - + /** * Send a request to get the current service pricing * @@ -907,6 +907,23 @@ public function sendGetNormalizedJid($countryCode, $number) $this->sendNode($node); } + + /** + * Send a ping to the server + */ + public function sendPing() + { + $msgId = $this->createMsgId("ping_"); + $pingNode = new ProtocolNode("ping", null, null, null); + $node = new ProtocolNode("iq", array( + "id" => $msgId, + "xmlns" => "w:p", + "type" => "get", + "to" => "s.whatsapp.net" + ), array($pingNode), null); + $this->sendNode($node); + } + /** * Get the current status message of a specific user. * @@ -2403,7 +2420,7 @@ protected function processInboundDataNode(ProtocolNode $node, $autoReceipt = tru $node->getChild(0)->getAttribute("cost"), $node->getChild(0)->getAttribute("currency"), $node->getChild(0)->getAttribute("expiration") - ); + ); } if($node->getChild("normalize") != null) { From 041b7883b8365beca37182e902f3fdbeede66ac2 Mon Sep 17 00:00:00 2001 From: dennobaby Date: Tue, 21 Oct 2014 22:03:19 +0200 Subject: [PATCH 049/436] Add event for getBroadcastLists --- src/WhatsAppEvent.php | 10 ++++++++++ src/events/WhatsAppEventListener.php | 5 +++++ src/events/WhatsAppEventListenerBase.php | 5 +++++ src/events/WhatsAppEventListenerProxy.php | 7 +++++++ src/whatsprot.class.php | 22 ++++++++++++++++++++++ 5 files changed, 49 insertions(+) diff --git a/src/WhatsAppEvent.php b/src/WhatsAppEvent.php index e5f21757..bb11fa51 100755 --- a/src/WhatsAppEvent.php +++ b/src/WhatsAppEvent.php @@ -863,4 +863,14 @@ function fireGetNormalizedJid( $this->fireCallback($callbackEvent); } + function fireGetBroadcastLists( + $phone, + $broadcastLists + ) { + $callbackEvent = function(WhatsAppEventListener $listener) use ($phone, $broadcastLists) { + $listener->onGetBroadcastLists($phone, $broadcastLists); + }; + $this->fireCallback($callbackEvent); + } + } diff --git a/src/events/WhatsAppEventListener.php b/src/events/WhatsAppEventListener.php index 06c65c88..bcea7643 100755 --- a/src/events/WhatsAppEventListener.php +++ b/src/events/WhatsAppEventListener.php @@ -389,6 +389,11 @@ function onGetNormalizedJid( $result //the normalized jid ); + function onGetBroadcastLists( + $phone, //the user phone number including country code. + $broadcastLists //a multidimensional array with the lists + ); + function onPresence( $phone, // The user phone number including the country code. $from, // The sender JID. diff --git a/src/events/WhatsAppEventListenerBase.php b/src/events/WhatsAppEventListenerBase.php index 74402a1b..3dfb7bdf 100755 --- a/src/events/WhatsAppEventListenerBase.php +++ b/src/events/WhatsAppEventListenerBase.php @@ -349,6 +349,11 @@ function onGetNormalizedJid( $result ) {} + function onGetBroadcastLists( + $phone, + $broadcastLists + ) {} + function onPing( $phone, $msgid diff --git a/src/events/WhatsAppEventListenerProxy.php b/src/events/WhatsAppEventListenerProxy.php index 676917db..ad4c6158 100755 --- a/src/events/WhatsAppEventListenerProxy.php +++ b/src/events/WhatsAppEventListenerProxy.php @@ -428,6 +428,13 @@ function onGetNormalizedJid( $this->handleEvent(__FUNCTION__, func_get_args()); } + function onGetBroadcastLists( + $phone, + $broadcastLists + ) { + $this->handleEvent(__FUNCTION__, func_get_args()); + } + function onPing( $phone, $msgid diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index 8717c2cc..b9024179 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -2412,6 +2412,28 @@ protected function processInboundDataNode(ProtocolNode $node, $autoReceipt = tru ); } } + if ($node->nodeIdContains("get_lists")) { + $broadcastLists = array(); + if ($node->getChild(0) != null) { + $childArray = $node->getChildren(); + foreach ($childArray as $list) { + foreach ( $list->getChildren() as $sublist) { + $id = $sublist->getAttribute("id"); + $name = $sublist->getAttribute("name"); + $broadcastLists[$id]['name'] = $name; + $recipients = array(); + foreach ($sublist->getChildren() as $recipient) { + array_push($recipients, $recipient->getAttribute('jid')); + } + $broadcastLists[$id]['recipients'] = $recipients; + } + } + } + $this->eventManager()->fireGetBroadcastLists( + $this->phoneNumber, + $broadcastLists + ); + } if($node->getChild("pricing") != null) { $this->eventManager()->fireGetServicePricing( From 6a18c30760246588055e174d21c355337079f4a9 Mon Sep 17 00:00:00 2001 From: "Dennis D." Date: Tue, 21 Oct 2014 22:15:25 +0200 Subject: [PATCH 050/436] corrected idention --- src/whatsprot.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index b9024179..3cd07aed 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -2413,7 +2413,7 @@ protected function processInboundDataNode(ProtocolNode $node, $autoReceipt = tru } } if ($node->nodeIdContains("get_lists")) { - $broadcastLists = array(); + $broadcastLists = array(); if ($node->getChild(0) != null) { $childArray = $node->getChildren(); foreach ($childArray as $list) { From 15f474199ac5b42b16ee9906abcd1be758e64913 Mon Sep 17 00:00:00 2001 From: mgp25 Date: Wed, 22 Oct 2014 01:00:16 +0200 Subject: [PATCH 051/436] Added the sendGetBroadcastLists function --- src/whatsprot.class.php | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index 8717c2cc..3bf5d5e1 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -883,6 +883,22 @@ public function sendGetServicePricing($lg, $lc) ), array($pricingNode), null); $this->sendNode($node); } + + /** + * Gets all the broadcast lists for an account + */ + public function sendGetBroadcastLists() + { + $msgId = $this->createMsgId("get_lists_"); + $listsNode = new ProtocolNode("lists", null, null, null); + $node = new ProtocolNode("iq", array( + "id" => $msgId, + "xmlns" => "w:b", + "type" => "get", + "to" => "s.whatsapp.net" + ), array($listsNode), null); + $this->sendNode($node); + } /** * Send a request to get the normalized mobile number respresenting the JID From 4d1b947e7bdcd3e673d165e0218a1cb5ad88cff5 Mon Sep 17 00:00:00 2001 From: dennobaby Date: Wed, 22 Oct 2014 01:58:11 +0200 Subject: [PATCH 052/436] Add sendExtendAccount --- src/whatsprot.class.php | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index 79b83079..bae6b10f 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -884,6 +884,22 @@ public function sendGetServicePricing($lg, $lc) $this->sendNode($node); } + /** + * Send a request to extend the account + */ + public function sendExtendAccount() + { + $msgId = $this->createMsgId("extend_account_"); + $extendingNode = new ProtocolNode("extend", null, null, null); + $node = new ProtocolNode("iq", array( + "id" => $msgId, + "xmlns" => "urn:xmpp:whatsapp:account", + "type" => "set", + "to" => "s.whatsapp.net" + ), array($extendingNode), null); + $this->sendNode($node); + } + /** * Gets all the broadcast lists for an account */ From a29cedf90b0915f9452578db0001a80f98176b27 Mon Sep 17 00:00:00 2001 From: dennobaby Date: Wed, 22 Oct 2014 11:23:00 +0200 Subject: [PATCH 053/436] Add event onGetExtendAccount --- src/WhatsAppEvent.php | 13 +++++++++++++ src/events/WhatsAppEventListener.php | 8 ++++++++ src/events/WhatsAppEventListenerBase.php | 8 ++++++++ src/events/WhatsAppEventListenerProxy.php | 10 ++++++++++ src/whatsprot.class.php | 10 ++++++++++ 5 files changed, 49 insertions(+) diff --git a/src/WhatsAppEvent.php b/src/WhatsAppEvent.php index bb11fa51..14525318 100755 --- a/src/WhatsAppEvent.php +++ b/src/WhatsAppEvent.php @@ -853,6 +853,19 @@ function fireGetServicePricing( $this->fireCallback($callbackEvent); } + function fireGetExtendAccount( + $phone, + $kind, + $status, + $creation, + $expiration + ) { + $callbackEvent = function(WhatsAppEventListener $listener) use ($phone, $kind, $status, $creation, $expiration) { + $listener->onGetExtendAccount($phone, $kind, $status, $creation, $expiration); + }; + $this->fireCallback($callbackEvent); + } + function fireGetNormalizedJid( $phone, $result diff --git a/src/events/WhatsAppEventListener.php b/src/events/WhatsAppEventListener.php index bcea7643..4d477514 100755 --- a/src/events/WhatsAppEventListener.php +++ b/src/events/WhatsAppEventListener.php @@ -384,6 +384,14 @@ function onGetServicePricing( $expiration //the unix time when account expires. ); + function onGetExtendAccount( + $phone, //the user phone number including country code. + $kind, //kind-string, e.g "free" + $status, //status string. + $creation, //unix timestamp of account creation. + $expiration //the unix time when account expires. + ); + function onGetNormalizedJid( $phone, //the user phone number including country code. $result //the normalized jid diff --git a/src/events/WhatsAppEventListenerBase.php b/src/events/WhatsAppEventListenerBase.php index 3dfb7bdf..1411ff7a 100755 --- a/src/events/WhatsAppEventListenerBase.php +++ b/src/events/WhatsAppEventListenerBase.php @@ -344,6 +344,14 @@ function onGetServicePricing( $expiration ) {} + function onGetExtendAccount( + $phone, + $kind, + $status, + $creation, + $expiration + ) {} + function onGetNormalizedJid( $phone, $result diff --git a/src/events/WhatsAppEventListenerProxy.php b/src/events/WhatsAppEventListenerProxy.php index ad4c6158..5c7fdab6 100755 --- a/src/events/WhatsAppEventListenerProxy.php +++ b/src/events/WhatsAppEventListenerProxy.php @@ -421,6 +421,16 @@ function onGetServicePricing( $this->handleEvent(__FUNCTION__, func_get_args()); } + function onGetExtendAccount( + $phone, + $kind, + $status, + $creation, + $expiration + ) { + $this->handleEvent(__FUNCTION__, func_get_args()); + } + function onGetNormalizedJid( $phone, $result diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index bae6b10f..4158c3dd 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -2476,6 +2476,16 @@ protected function processInboundDataNode(ProtocolNode $node, $autoReceipt = tru $node->getChild(0)->getAttribute("expiration") ); } + if($node->getChild("extend") != null) + { + $this->eventManager()->fireGetExtendAccount( + $this->phoneNumber, + $node->getChild("account")->getAttribute("kind"), + $node->getChild("account")->getAttribute("status"), + $node->getChild("account")->getAttribute("creation"), + $node->getChild("account")->getAttribute("expiration") + ); + } if($node->getChild("normalize") != null) { $this->eventManager()->fireGetNormalizedJid( From 02efd994f33f6b28ef06d1683295d51b12f7902e Mon Sep 17 00:00:00 2001 From: "Dennis D." Date: Wed, 22 Oct 2014 11:34:57 +0200 Subject: [PATCH 054/436] idention fix --- src/whatsprot.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index 4158c3dd..c14b139b 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -2485,7 +2485,7 @@ protected function processInboundDataNode(ProtocolNode $node, $autoReceipt = tru $node->getChild("account")->getAttribute("creation"), $node->getChild("account")->getAttribute("expiration") ); - } + } if($node->getChild("normalize") != null) { $this->eventManager()->fireGetNormalizedJid( From 690b53b03b3cbb09e938370282e8fbea3c34c400 Mon Sep 17 00:00:00 2001 From: SikiFn Date: Wed, 22 Oct 2014 15:04:51 +0300 Subject: [PATCH 055/436] Add sendRemoveProfilePhoto Method --- src/whatsprot.class.php | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index c14b139b..0fec37d4 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -1420,6 +1420,25 @@ public function sendSetProfilePicture($path) { $this->sendSetPicture($this->phoneNumber, $path); } + + /* + * Removes the profile photo + */ + public function sendRemoveProfilePhoto() { + $picture = new ProtocolNode("picture", null, null, null); + + $thumb = new ProtocolNode("picture", array("type" => "preview"), null, null); + + $hash = array(); + $nodeID = $this->createMsgId("setphoto"); + $hash["id"] = $nodeID; + $hash["to"] = $this->getJID($this->phoneNumber); + $hash["type"] = "set"; + $hash["xmlns"] = "w:profile:picture"; + $node = new ProtocolNode("iq", $hash, array($picture, $thumb), null); + + $this->sendNode($node); + } /** * Set the recovery token for your account to allow you to From 9c3b70e42334419c366e00bed998a163527c35af Mon Sep 17 00:00:00 2001 From: SikiFn Date: Wed, 22 Oct 2014 15:20:34 +0300 Subject: [PATCH 056/436] Renamed sendRemoveProfilePhoto Renamed sendRemoveProfilePhoto to sendRemoveProfilePicture --- src/whatsprot.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index 0fec37d4..efb92bd0 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -1424,7 +1424,7 @@ public function sendSetProfilePicture($path) /* * Removes the profile photo */ - public function sendRemoveProfilePhoto() { + public function sendRemoveProfilePicture() { $picture = new ProtocolNode("picture", null, null, null); $thumb = new ProtocolNode("picture", array("type" => "preview"), null, null); From 1b65491c32f40cdcb865170e29a44e84676970f2 Mon Sep 17 00:00:00 2001 From: mgp25 Date: Thu, 23 Oct 2014 09:31:55 +0200 Subject: [PATCH 057/436] Added sendRemoveAccount Removes account from WhatsApp server --- src/whatsprot.class.php | 54 ++++++++++++++++++++++++++++++++++++----- 1 file changed, 48 insertions(+), 6 deletions(-) diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index efb92bd0..e06291c9 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -915,7 +915,7 @@ public function sendGetBroadcastLists() ), array($listsNode), null); $this->sendNode($node); } - + /** * Send a request to get the normalized mobile number respresenting the JID * @@ -939,6 +939,48 @@ public function sendGetNormalizedJid($countryCode, $number) $this->sendNode($node); } + /** + * Removes an account from WhatsApp + * + * @param string $lg + * Language + * @param string $lc + * Country + * @param string $feedback + * User Feedback + */ + public function sendRemoveAccount($lg = null, $lc = null, $feedback = null) + { + $msgId = $this->createMsgId("removeaccount_"); + if($feedback != null && strlen($feedback) > 0) + { + if($lg == null) { + $lg = ""; + } + + if($lc == null) { + $lc = ""; + } + + $child = new ProtocolNode("body", array( + "lg" => $lg, + "lc" => $lc + ), null, $feedback); + $childNode = array($child); + }else{ + $childNode = null; + } + + $removeNode = new ProtocolNode("remove", null, $childNode, null); + $node = new ProtocolNode("iq", array( + "to" => "s.whatsapp.net", + "xmlns" => "urn:xmpp:whatsapp:account", + "type" => "get", + "id" => $msgId + ), array($removeNode), null); + + $this->sendNode($node); + } /** * Send a ping to the server @@ -1420,15 +1462,15 @@ public function sendSetProfilePicture($path) { $this->sendSetPicture($this->phoneNumber, $path); } - + /* * Removes the profile photo */ public function sendRemoveProfilePicture() { $picture = new ProtocolNode("picture", null, null, null); - + $thumb = new ProtocolNode("picture", array("type" => "preview"), null, null); - + $hash = array(); $nodeID = $this->createMsgId("setphoto"); $hash["id"] = $nodeID; @@ -1436,8 +1478,8 @@ public function sendRemoveProfilePicture() { $hash["type"] = "set"; $hash["xmlns"] = "w:profile:picture"; $node = new ProtocolNode("iq", $hash, array($picture, $thumb), null); - - $this->sendNode($node); + + $this->sendNode($node); } /** From 6d253fae8030ec2c8ed71d033e9dd247aa7c1ab9 Mon Sep 17 00:00:00 2001 From: mgp25 Date: Thu, 23 Oct 2014 09:33:03 +0200 Subject: [PATCH 058/436] Added sendDeleteBroadcastLists Delete stored broadcast lists --- src/whatsprot.class.php | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index e06291c9..bd6e2c6b 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -662,6 +662,36 @@ public function sendBroadcastVideo($targets, $path, $storeURLmedia = false, $fsi $this->sendMessageVideo($targets, $path, $storeURLmedia, $fsize, $fhash, $caption); } + /** + * Delete Broadcast lists + * + * @param string array $lists + * Contains the broadcast-id list + */ + public function sendDeleteBroadcastLists($lists) + { + $msgId = $this->createMsgId("delete_list_"); + $listNode = array(); + if($lists != null && count($lists) > 0) + { + for($i = 0; $i < count($lists); $i++) + { + $listNode[$i] = new ProtocolNode("list", array("id" => $lists[$i]), null, null); + } + }else{ + $listNode = null; + } + $deleteNode = new ProtocolNode("delete", null, $listNode, null); + $node = new ProtocolNode("iq", array( + "id" => $msgId, + "xmlns" => "w:b", + "type" => "set", + "to" => "s.whatsapp.net" + ), array($deleteNode), null); + + $this->sendNode($node); + } + /** * Clears the "dirty" status on your account * From ad29c74be4bcde88078507b766119da1941fd001 Mon Sep 17 00:00:00 2001 From: mgp25 Date: Thu, 23 Oct 2014 09:34:02 +0200 Subject: [PATCH 059/436] Added latest data: token, versions, user agent --- classesMD5.txt | 6 ++++++ src/token.php | 4 ++-- src/whatsprot.class.php | 4 ++-- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/classesMD5.txt b/classesMD5.txt index 266aaadf..ac9b3553 100644 --- a/classesMD5.txt +++ b/classesMD5.txt @@ -3,6 +3,12 @@ = B64 ENCODED = =============================== +WhatsApp/2.11.422 Android/4.3 Device/GalaxyS3 +fjwVxyGxveeMtXfbBZX5+A== + +WhatsApp/2.11.421 Android/4.3 Device/GalaxyS3 +kiGqotPZe/wzm22tbORcog== + WhatsApp/2.11.419 Android/4.3 Device/GalaxyS3 Vu6nzOKzMttaMOYKo7YkEw== diff --git a/src/token.php b/src/token.php index 2c9625a6..d62b3b83 100755 --- a/src/token.php +++ b/src/token.php @@ -3,9 +3,9 @@ function generateRequestToken($country, $phone) { $signature = "MIIDMjCCAvCgAwIBAgIETCU2pDALBgcqhkjOOAQDBQAwfDELMAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFDASBgNVBAcTC1NhbnRhIENsYXJhMRYwFAYDVQQKEw1XaGF0c0FwcCBJbmMuMRQwEgYDVQQLEwtFbmdpbmVlcmluZzEUMBIGA1UEAxMLQnJpYW4gQWN0b24wHhcNMTAwNjI1MjMwNzE2WhcNNDQwMjE1MjMwNzE2WjB8MQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEUMBIGA1UEBxMLU2FudGEgQ2xhcmExFjAUBgNVBAoTDVdoYXRzQXBwIEluYy4xFDASBgNVBAsTC0VuZ2luZWVyaW5nMRQwEgYDVQQDEwtCcmlhbiBBY3RvbjCCAbgwggEsBgcqhkjOOAQBMIIBHwKBgQD9f1OBHXUSKVLfSpwu7OTn9hG3UjzvRADDHj+AtlEmaUVdQCJR+1k9jVj6v8X1ujD2y5tVbNeBO4AdNG/yZmC3a5lQpaSfn+gEexAiwk+7qdf+t8Yb+DtX58aophUPBPuD9tPFHsMCNVQTWhaRMvZ1864rYdcq7/IiAxmd0UgBxwIVAJdgUI8VIwvMspK5gqLrhAvwWBz1AoGBAPfhoIXWmz3ey7yrXDa4V7l5lK+7+jrqgvlXTAs9B4JnUVlXjrrUWU/mcQcQgYC0SRZxI+hMKBYTt88JMozIpuE8FnqLVHyNKOCjrh4rs6Z1kW6jfwv6ITVi8ftiegEkO8yk8b6oUZCJqIPf4VrlnwaSi2ZegHtVJWQBTDv+z0kqA4GFAAKBgQDRGYtLgWh7zyRtQainJfCpiaUbzjJuhMgo4fVWZIvXHaSHBU1t5w//S0lDK2hiqkj8KpMWGywVov9eZxZy37V26dEqr/c2m5qZ0E+ynSu7sqUD7kGx/zeIcGT0H+KAVgkGNQCo5Uc0koLRWYHNtYoIvt5R3X6YZylbPftF/8ayWTALBgcqhkjOOAQDBQADLwAwLAIUAKYCp0d6z4QQdyN74JDfQ2WCyi8CFDUM4CaNB+ceVXdKtOrNTQcc0e+t"; - $classesMd5 = "Vu6nzOKzMttaMOYKo7YkEw=="; // 2.11.419 + $classesMd5 = "fjwVxyGxveeMtXfbBZX5+A=="; // 2.11.422 - $key2 = base64_decode("/UIGKU1FVQa+ATM2A0za7G2KI9S/CwPYjgAbc67v7ep42eO/WeTLx1lb1cHwxpsEgF4+PmYpLd2YpGUdX/A2JQitsHzDwgcdBpUf7psX1BU="); + $key2 = base64_decode("/UIGKU1FVQa+ATM2A0za7G2KI9S/CwPYjgAbc67v7ep42eO/WeTLx1lb1cHwxpsEgF4+PmYpLd2YpGUdX/A2JQitsHzDwgcdBpUf7psX1BU="); $data = base64_decode($signature) . base64_decode($classesMd5) . $phone; $opad = str_repeat(chr(0x5C), 64); diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index bd6e2c6b..f94348af 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -46,8 +46,8 @@ class WhatsProt const WHATSAPP_SERVER = 's.whatsapp.net'; // The hostname used to login/send messages. const WHATSAPP_UPLOAD_HOST = 'https://mms.whatsapp.net/client/iphone/upload.php'; // The upload host. const WHATSAPP_DEVICE = 'Android'; // The device name. - const WHATSAPP_VER = '2.11.419'; // The WhatsApp version. - const WHATSAPP_USER_AGENT = 'WhatsApp/2.11.419 Android/4.3 Device/GalaxyS3'; // User agent used in request/registration code. + const WHATSAPP_VER = '2.11.422'; // The WhatsApp version. + const WHATSAPP_USER_AGENT = 'WhatsApp/2.11.422 Android/4.3 Device/GalaxyS3'; // User agent used in request/registration code. const WHATSAPP_VER_CHECKER = 'https://coderus.openrepos.net/whitesoft/whatsapp_version'; // Check WhatsApp version /** From bc4c59335c1a739cee032095d873eeb06aeecdd5 Mon Sep 17 00:00:00 2001 From: mgp25 Date: Thu, 23 Oct 2014 18:40:01 +0200 Subject: [PATCH 060/436] Added function to promote and demote participants Minor updates included --- src/whatsprot.class.php | 46 ++++++++++++++++++++++++++++++++++++----- 1 file changed, 41 insertions(+), 5 deletions(-) diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index f94348af..08fd6564 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -1172,10 +1172,11 @@ public function sendGroupsLeave($gjids) */ public function sendGroupsParticipantsAdd($groupId, $participants) { + $msgId = $this->createMsgId("add_group_participants_"); if(!is_array($participants)) { $participants = array($participants); } - $this->sendGroupsChangeParticipants($groupId, $participants, 'add'); + $this->sendGroupsChangeParticipants($groupId, $participants, 'add', $msgId); } /** @@ -1188,10 +1189,45 @@ public function sendGroupsParticipantsAdd($groupId, $participants) */ public function sendGroupsParticipantsRemove($groupId, $participants) { + $msgId = $this->createMsgId("remove_group_participants_"); if(!is_array($participants)) { $participants = array($participants); } - $this->sendGroupsChangeParticipants($groupId, $participants, 'remove'); + $this->sendGroupsChangeParticipants($groupId, $participants, 'remove', $msgId); + } + + /** + * Promote participant(s) of a group. + * + * @param string $groupId + * The group ID. + * @param array $participants + * An array with the participants numbers to promote + */ + public function sendPromoteParticipants($gId, $participants) + { + $msgId = $this->createMsgId("promote_group_participants_"); + if(!is_array($participants)) { + $participants = array($participants); + } + $this->sendGroupsChangeParticipants($gId, $participants, "promote", $msgId); + } + + /** + * Demote participant(s) of a group. + * + * @param string $groupId + * The group ID. + * @param array $participants + * An array with the participants numbers to demote + */ + public function sendDemoteParticipants($gId, $participants) + { + $msgId = $this->createMsgId("demote_group_participants_"); + if(!is_array($participants)) { + $participants = array($participants); + } + $this->sendGroupsChangeParticipants($gId, $participants, "demote", $msgId); } /** @@ -3127,7 +3163,7 @@ protected function sendGetGroupsFiltered($type) * @param string $tag * The tag action. 'add' or 'remove' */ - protected function sendGroupsChangeParticipants($groupId, $participants, $tag) + protected function sendGroupsChangeParticipants($groupId, $participants, $tag, $id) { $_participants = array(); foreach ($participants as $participant) { @@ -3138,9 +3174,9 @@ protected function sendGroupsChangeParticipants($groupId, $participants, $tag) $child = new ProtocolNode($tag, $childHash, $_participants, ""); $setHash = array(); - $setHash["id"] = $this->createMsgId("participants"); + $setHash["id"] = $id; $setHash["type"] = "set"; - $setHash["xmlns"] = "w:g"; + $setHash["xmlns"] = "w:g2"; $setHash["to"] = $this->getJID($groupId); $node = new ProtocolNode("iq", $setHash, array($child), ""); From e928f1d7070c7c46852507051b9c103b8b21ba26 Mon Sep 17 00:00:00 2001 From: mgp25 Date: Thu, 23 Oct 2014 20:23:32 +0200 Subject: [PATCH 061/436] Added unlock group and lock group MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This feature isnโ€™t in WhatsApp client yet, but itโ€™s working! yay! --- src/whatsprot.class.php | 49 ++++++++++++++++++++++++++++++++++++++++- 1 file changed, 48 insertions(+), 1 deletion(-) diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index 08fd6564..ae118cb2 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -1197,7 +1197,8 @@ public function sendGroupsParticipantsRemove($groupId, $participants) } /** - * Promote participant(s) of a group. + * Promote participant(s) of a group + * Makes a participant admin of a group * * @param string $groupId * The group ID. @@ -1215,6 +1216,7 @@ public function sendPromoteParticipants($gId, $participants) /** * Demote participant(s) of a group. + * Remove participant of being admin of a group. * * @param string $groupId * The group ID. @@ -1230,6 +1232,51 @@ public function sendDemoteParticipants($gId, $participants) $this->sendGroupsChangeParticipants($gId, $participants, "demote", $msgId); } + /** + * Lock group: Paritipants cant change group subject or + * profile picture except admin + * + * @param string $groupId + * The group ID. + */ + public function sendLockGroup($gId) + { + $msgId = $this->createMsgId("lock_group_"); + $lockedNode = new ProtocolNode("locked", null, null, null); + $node = new ProtocolNode("iq", array( + "id" => $msgId, + "xmlns" => "w:g2", + "type" => "set", + "to" => $this->getJID($gId); + ), array($lockedNode), null); + + $this->sendNode($node); + $this->waitForServer($msgId); + } + + /** + * Unlock group: Any participant can change + * group subject or profile picture + * + * + * @param string $groupId + * The group ID. + */ + public function sendUnlockGroup($gId) + { + $msgId = $this->createMsgId("unlock_group_"); + $unlockedNode = new ProtocolNode("unlocked", null, null, null); + $node = new ProtocolNode("iq", array( + "id" => $msgId, + "xmlns" => "w:g2", + "type" => "set", + "to" => $this->getJID($gId); + ), array($unlockedNode), null); + + $this->sendNode($node); + $this->waitForServer($msgId); + } + /** * Send a text message to the user/group. * From 9efff2a609c23420ca8e595eb29a7b6035778dc0 Mon Sep 17 00:00:00 2001 From: mgp25 Date: Fri, 24 Oct 2014 01:32:36 +0200 Subject: [PATCH 062/436] Handling stanza:error --- src/whatsprot.class.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index ae118cb2..5839cb96 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -2698,6 +2698,12 @@ protected function processInboundDataNode(ProtocolNode $node, $autoReceipt = tru throw new Exception('Error system-shutdown'); } + + + if ($node->getTag() == "stream:error") + { + throw new Exception('Error stream error: '.$node->getChild(0)->getTag()); + } if($node->getTag() == "notification") { From 55bb5d3bfafd6899249182e7f66370675f21e3a4 Mon Sep 17 00:00:00 2001 From: bakrmohamed84 Date: Sat, 25 Oct 2014 11:14:58 +0300 Subject: [PATCH 063/436] Update whatsprot.class.php --- src/whatsprot.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index 5839cb96..8791be93 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -1247,7 +1247,7 @@ public function sendLockGroup($gId) "id" => $msgId, "xmlns" => "w:g2", "type" => "set", - "to" => $this->getJID($gId); + "to" => $this->getJID($gId) ), array($lockedNode), null); $this->sendNode($node); @@ -1270,7 +1270,7 @@ public function sendUnlockGroup($gId) "id" => $msgId, "xmlns" => "w:g2", "type" => "set", - "to" => $this->getJID($gId); + "to" => $this->getJID($gId) ), array($unlockedNode), null); $this->sendNode($node); From 8329fb132fe998921257a46edb92d1d03813cb51 Mon Sep 17 00:00:00 2001 From: mgp25 Date: Sat, 25 Oct 2014 10:28:48 +0200 Subject: [PATCH 064/436] Transparent updates --- src/whatsprot.class.php | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index 8791be93..71295e31 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -416,17 +416,12 @@ public function connect() $WAverS = str_replace(".","",$WAver); $ver = str_replace(".","",static::WHATSAPP_VER); - if($ver>=$WAverS) + if($ver<$WAverS) { - echo "\nUp to date :)\n\n"; - } - else{ $classesMD5 = file_get_contents('https://coderus.openrepos.net/whitesoft/whatsapp_classes'); updateData('token.php', $WAver, $classesMD5); updateData('whatsprot.class.php', $WAver); - - echo "\n Token, User Agent and version were updated :)\n"; } $Socket = fsockopen(static::WHATSAPP_HOST, static::PORT); @@ -2698,7 +2693,7 @@ protected function processInboundDataNode(ProtocolNode $node, $autoReceipt = tru throw new Exception('Error system-shutdown'); } - + if ($node->getTag() == "stream:error") { From 03ccddf5d6de7524bc47b750c490e06ce66a95f6 Mon Sep 17 00:00:00 2001 From: SikiFn Date: Sat, 25 Oct 2014 11:58:06 +0300 Subject: [PATCH 065/436] Added get_mime() function The function mime_content_type was deprecated and currently removed in PHP 5.5, though it is still used in whatsprot.class.php. --- src/func.php | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/func.php b/src/func.php index 684c526a..6fe399e6 100755 --- a/src/func.php +++ b/src/func.php @@ -213,3 +213,21 @@ function generatePaymentLink($number, $sku) $link = $base.$number.$middle.$checksum.$end; return $link; } + +// Gets mime type of a file using various methods +function get_mime($file) { + if (function_exists("finfo_file")) { + $finfo = finfo_open(FILEINFO_MIME_TYPE); + $mime = finfo_file($finfo, $file); + finfo_close($finfo); + return $mime; + } else if (function_exists("mime_content_type")) { + return mime_content_type($file); + } else if (!strncasecmp(PHP_OS, 'WIN', 3) == 0 && !stristr(ini_get("disable_functions"), "shell_exec")) { + $file = escapeshellarg($file); + $mime = shell_exec("file -bi " . $file); + return $mime; + } else { + return false; + } +} From 1eda2653fcdd2e4b179c7e41a12b8f36621a7ac1 Mon Sep 17 00:00:00 2001 From: SikiFn Date: Sat, 25 Oct 2014 12:01:22 +0300 Subject: [PATCH 066/436] Replaced mime_content_type() Replaced mime_content_type() with get_mime() which was added to func.php --- src/whatsprot.class.php | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index 71295e31..c41c2a6d 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -2134,13 +2134,7 @@ protected function getMediaFile($filepath, $maxsizebytes = 1048576) if ($this->mediaFileInfo['filesize'] < $maxsizebytes) { $this->mediaFileInfo['filepath'] = $filepath; $this->mediaFileInfo['fileextension'] = pathinfo($filepath, PATHINFO_EXTENSION); - //TODO - //Get Mime type using finfo. -// $finfo = new finfo_open(FILEINFO_MIME_TYPE); -// $this->_mediafileinfo['filemimetype'] = finfo_file($finfo, $filepath); -// finfo_close($finfo); - //mime_content_type deprecated - $this->mediaFileInfo['filemimetype'] = mime_content_type($filepath); + $this->mediaFileInfo['filemimetype'] = get_mime($filepath); return true; } else { //File too big From 8e9f79fdb9affb751961506b5326071fc5d29912 Mon Sep 17 00:00:00 2001 From: mgp25 Date: Sun, 26 Oct 2014 01:29:38 +0200 Subject: [PATCH 067/436] Added privacy functions: get and set --- src/whatsprot.class.php | 46 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index c41c2a6d..ee5259d8 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -821,6 +821,52 @@ public function sendGetPrivacyBlockedList() $this->waitForServer($msgId); } + /** + * Send a request to get privacy settings + */ + public function sendGetPrivacySettings() + { + $msgId = $this->createMsgId("get_privacy_settings_"); + $privacyNode = new ProtocolNode("privacy", null, null, null); + $node = new ProtocolNode("iq", array( + "to" => static::WHATSAPP_SERVER, + "id" => $msgId, + "xmlns" => "privacy", + "type" => "get" + ), array($privacyNode), null); + + $this->sendNode($node); + $this->waitForServer($msgId); + } + + /** + * Set privacy of 'last seen', status or profile picture + * to All, contacts or none + * + * @param string $category + * Options: 'last', 'status' or 'profile' + * @param string $value + * Options: 'all', 'contacts' or 'none' + */ + public sendSetPrivacySettings($category, $value) + { + $msgId = $this->createMsgId("send_privacy_settings_"); + $categoryNode = new ProtocolNode("category", array( + "name" => $category, + "value" => $value + ), null, null); + $privacyNode = new ProtocolNode("privacy", null, array($categoryNode), null); + $node = new ProtocolNode("privacy", array( + "to" => static::WHATSAPP_SERVER, + "type" => "set", + "id" => $msgId, + "xmlns" => "privacy" + ), array($privacyNode), null); + + $this->sendNode($node); + $this->waitForServer($msgId); + } + /** * Get profile picture of specified user * From 948e8458be62a11b34b13e71c3dc424cd68bb120 Mon Sep 17 00:00:00 2001 From: mgp25 Date: Sun, 26 Oct 2014 01:32:45 +0200 Subject: [PATCH 068/436] Revert "Added privacy functions: get and set" This reverts commit 8e9f79fdb9affb751961506b5326071fc5d29912. --- src/whatsprot.class.php | 46 ----------------------------------------- 1 file changed, 46 deletions(-) diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index ee5259d8..c41c2a6d 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -821,52 +821,6 @@ public function sendGetPrivacyBlockedList() $this->waitForServer($msgId); } - /** - * Send a request to get privacy settings - */ - public function sendGetPrivacySettings() - { - $msgId = $this->createMsgId("get_privacy_settings_"); - $privacyNode = new ProtocolNode("privacy", null, null, null); - $node = new ProtocolNode("iq", array( - "to" => static::WHATSAPP_SERVER, - "id" => $msgId, - "xmlns" => "privacy", - "type" => "get" - ), array($privacyNode), null); - - $this->sendNode($node); - $this->waitForServer($msgId); - } - - /** - * Set privacy of 'last seen', status or profile picture - * to All, contacts or none - * - * @param string $category - * Options: 'last', 'status' or 'profile' - * @param string $value - * Options: 'all', 'contacts' or 'none' - */ - public sendSetPrivacySettings($category, $value) - { - $msgId = $this->createMsgId("send_privacy_settings_"); - $categoryNode = new ProtocolNode("category", array( - "name" => $category, - "value" => $value - ), null, null); - $privacyNode = new ProtocolNode("privacy", null, array($categoryNode), null); - $node = new ProtocolNode("privacy", array( - "to" => static::WHATSAPP_SERVER, - "type" => "set", - "id" => $msgId, - "xmlns" => "privacy" - ), array($privacyNode), null); - - $this->sendNode($node); - $this->waitForServer($msgId); - } - /** * Get profile picture of specified user * From b4f38b6c2b9dfd407372bec6dcc948290e808b1e Mon Sep 17 00:00:00 2001 From: mgp25 Date: Sun, 26 Oct 2014 01:34:10 +0200 Subject: [PATCH 069/436] Added privacy functions: get and set Fixed typo --- src/whatsprot.class.php | 46 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index c41c2a6d..dca8cdbd 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -821,6 +821,52 @@ public function sendGetPrivacyBlockedList() $this->waitForServer($msgId); } + /** + * Send a request to get privacy settings + */ + public function sendGetPrivacySettings() + { + $msgId = $this->createMsgId("get_privacy_settings_"); + $privacyNode = new ProtocolNode("privacy", null, null, null); + $node = new ProtocolNode("iq", array( + "to" => static::WHATSAPP_SERVER, + "id" => $msgId, + "xmlns" => "privacy", + "type" => "get" + ), array($privacyNode), null); + + $this->sendNode($node); + $this->waitForServer($msgId); + } + + /** + * Set privacy of 'last seen', status or profile picture + * to All, contacts or none + * + * @param string $category + * Options: 'last', 'status' or 'profile' + * @param string $value + * Options: 'all', 'contacts' or 'none' + */ + public sendSetPrivacySettings($category, $value) + { + $msgId = $this->createMsgId("send_privacy_settings_"); + $categoryNode = new ProtocolNode("category", array( + "name" => $category, + "value" => $value + ), null, null); + $privacyNode = new ProtocolNode("privacy", null, array($categoryNode), null); + $node = new ProtocolNode("iq", array( + "to" => static::WHATSAPP_SERVER, + "type" => "set", + "id" => $msgId, + "xmlns" => "privacy" + ), array($privacyNode), null); + + $this->sendNode($node); + $this->waitForServer($msgId); + } + /** * Get profile picture of specified user * From 24959bc4fab5519d5e3e5be12204cc8deb49157e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ferm=C3=ADn=20Olaiz?= Date: Sat, 25 Oct 2014 20:56:30 -0300 Subject: [PATCH 070/436] Fixed missing 'function' --- src/whatsprot.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index dca8cdbd..b8e3b189 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -848,7 +848,7 @@ public function sendGetPrivacySettings() * @param string $value * Options: 'all', 'contacts' or 'none' */ - public sendSetPrivacySettings($category, $value) + public function sendSetPrivacySettings($category, $value) { $msgId = $this->createMsgId("send_privacy_settings_"); $categoryNode = new ProtocolNode("category", array( From fbf73496328ffeddb9b51ac7e61ea2d0acaa8393 Mon Sep 17 00:00:00 2001 From: Alexander Date: Sun, 26 Oct 2014 15:58:42 +0100 Subject: [PATCH 071/436] Update WhatsAppEventListener.php --- src/events/WhatsAppEventListener.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/events/WhatsAppEventListener.php b/src/events/WhatsAppEventListener.php index 4d477514..8cc8e6ce 100755 --- a/src/events/WhatsAppEventListener.php +++ b/src/events/WhatsAppEventListener.php @@ -127,7 +127,7 @@ function onGetGroups( function onGetGroupsInfo( $phone, // The user phone number including the country code. - $groupList // Array with the the groupinfo. + $groupList // Array with the groupinfo. ); function onGetGroupsSubject( @@ -277,10 +277,10 @@ function onGroupsChatCreate( ); function onGroupsChatisCreated( - $phone, - $creator, - $gId, - $subject + $phone, // The user phone number including the country code. + $creator, // The group chat creator. + $gId, // The group JID. + $subject // The group subject. ); function onGroupsChatEnd( From d3dce7b40b93a93e7f0617fd0023701cb361cff5 Mon Sep 17 00:00:00 2001 From: Jonathan Williamson Date: Sun, 26 Oct 2014 16:11:27 +0000 Subject: [PATCH 072/436] Add composer.json to project to make it easier to install via composer. --- composer.json | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 composer.json diff --git a/composer.json b/composer.json new file mode 100644 index 00000000..877fdab3 --- /dev/null +++ b/composer.json @@ -0,0 +1,35 @@ +{ + "name": "mgp25/whatsapi", + "description": "PHP Interface for WhatsApp Messenger", + "license": "MIT", + "keywords": [ + "WhatsApp", + "TextMessage", + "sms" + ], + "authors": [ + { + "role": "Contributers", + "name": "WhatsApi Contributing Team", + "homepage": "https://github.com/mgp25/WhatsAPI-Official/graphs/contributors" + } + ], + "support": { + "issues": "https://github.com/mgp25/WhatsAPI-Official/issues", + "wiki": "https://github.com/mgp25/WhatsAPI-Official/wiki", + "source": "https://github.com/mgp25/WhatsAPI-Official" + }, + "autoload": { + "classmap": [ + "src/", + "src/events" + ] + }, + "require": { + "php": ">=5.3", + "ext-curl": "*" + }, + "suggest": { + "williamson/larawhatsapi": "A laravel Wrapper for WhatsApi" + } +} \ No newline at end of file From 94c7acd415c671748db48ee79bface915bfbdf36 Mon Sep 17 00:00:00 2001 From: Jonathan Williamson Date: Sun, 26 Oct 2014 16:11:58 +0000 Subject: [PATCH 073/436] Added .gitignore to help prevent unwanted files commited to project --- .gitignore | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000..0daaa6cf --- /dev/null +++ b/.gitignore @@ -0,0 +1,9 @@ +/bootstrap/compiled.php +/vendor +/.idea +/nbproject +composer.phar +.env.*.php +.env.php +.DS_Store +Thumbs.db \ No newline at end of file From becbad04ae4a81edacd3510a32ef513abc99c1cb Mon Sep 17 00:00:00 2001 From: Jonathan Williamson Date: Sun, 26 Oct 2014 16:13:42 +0000 Subject: [PATCH 074/436] Fixed case of method name to follow all other methods format. --- src/whatsprot.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index b8e3b189..408437b5 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -1137,7 +1137,7 @@ public function sendGroupsChatCreate($subject, $participants = array()) return $groupId; } - public function SendSetGroupSubject($gjid, $subject) + public function sendSetGroupSubject($gjid, $subject) { $child = new ProtocolNode("subject", array("value" => $subject), null, null); $node = new ProtocolNode("iq", array( From 2092bd57e3abd97a5d712067ab87d8ecf0dda160 Mon Sep 17 00:00:00 2001 From: Jonathan Williamson Date: Sun, 26 Oct 2014 16:38:38 +0000 Subject: [PATCH 075/436] Updated and fixed a number of DocBlocs that were incorrect. No Code changes. --- src/whatsprot.class.php | 74 +++++++++++++++++++++++------------------ 1 file changed, 42 insertions(+), 32 deletions(-) diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index 408437b5..3f358737 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -120,6 +120,7 @@ public function setChallengeName($filename){ /** * Add message to the outgoing queue. + * @param $node */ public function addMsgOutQueue($node) { @@ -558,9 +559,11 @@ public function sendActiveStatus() * * Approx 20 (unverified) is the maximum number of targets * - * @param array $targets An array of numbers to send to. - * @param string $path URL or local path to the audio file to send - * @param bool $storeURLmedia Keep a copy of the audio file on your server + * @param array $targets An array of numbers to send to. + * @param string $path URL or local path to the audio file to send + * @param bool $storeURLmedia Keep a copy of the audio file on your server + * @param int $fsize + * @param string $fhash */ public function sendBroadcastAudio($targets, $path, $storeURLmedia = false, $fsize = 0, $fhash = "") { @@ -578,9 +581,11 @@ public function sendBroadcastAudio($targets, $path, $storeURLmedia = false, $fsi * * Approx 20 (unverified) is the maximum number of targets * - * @param array $targets An array of numbers to send to. - * @param string $path URL or local path to the image file to send - * @param bool $storeURLmedia Keep a copy of the audio file on your server + * @param array $targets An array of numbers to send to. + * @param string $path URL or local path to the image file to send + * @param bool $storeURLmedia Keep a copy of the audio file on your server + * @param int $fsize + * @param string $fhash */ public function sendBroadcastImage($targets, $path, $storeURLmedia = false, $fsize = 0, $fhash = "", $caption = "") { @@ -646,8 +651,10 @@ public function sendBroadcastMessage($targets, $message) * Approx 20 (unverified) is the maximum number of targets * * @param array $targets An array of numbers to send to. - * @param string $path URL or local path to the video file to send - * @param bool $storeURLmedia Keep a copy of the audio file on your server + * @param string $path URL or local path to the video file to send + * @param bool $storeURLmedia Keep a copy of the audio file on your server + * @param int $fsize + * @param string $fhash */ public function sendBroadcastVideo($targets, $path, $storeURLmedia = false, $fsize = 0, $fhash = "", $caption = "") { @@ -1339,13 +1346,13 @@ public function sendMessage($to, $txt, $id = null) } /** - * Send audio to the user/group. * + * Send audio to the user/group. * - * @param $to - * The recipient. - * @param string $filepath - * The url/uri to the audio file. - * @param bool $storeURLmedia Keep copy of file + * @param string $to The recipient. + * @param string $filepath The url/uri to the audio file. + * @param bool $storeURLmedia Keep copy of file + * @param int $fsize + * @param string $fhash * @return bool */ public function sendMessageAudio($to, $filepath, $storeURLmedia = false, $fsize = 0, $fhash = "") @@ -1723,6 +1730,7 @@ public function sendBroadcastVcard($targets, $name, $vCard) /** * Sets the bind of the new message. + * @param $bind */ public function setNewMessageBind($bind) { @@ -1795,6 +1803,7 @@ public function waitForMessageReceipt() /** * Wait for Whatsapp server to acknowledge *it* has received message. * @param string $id The id of the node sent that we are awaiting acknowledgement of. + * @param int $timeout */ public function waitForServer($id, $timeout = 5) { @@ -1874,10 +1883,8 @@ protected function createAuthResponseNode() /** * Add stream features. - * @param bool $profileSubscribe * - * @return ProtocolNode - * Return itself. + * @return ProtocolNode Return itself. */ protected function createFeaturesNode() { @@ -1983,10 +1990,7 @@ protected function dissectPhone() /** * Send the nodes to the Whatsapp server to log in. * - * @param bool $profileSubscribe - * Set this to true if you would like Whatsapp to send a - * notification to your phone when one of your contacts - * changes/update their picture. + * @throws Exception */ protected function doLogin() { @@ -2243,8 +2247,9 @@ protected function processChallenge($node) /** * Process inbound data. * - * @param string $data - * The data to process. + * @param $data + * @param bool $autoReceipt + * @throws Exception */ protected function processInboundData($data, $autoReceipt = true) { @@ -2258,7 +2263,9 @@ protected function processInboundData($data, $autoReceipt = true) * Will process the data from the server after it's been decrypted and parsed. * * This also provides a convenient method to use to unit test the event framework. - * + * @param ProtocolNode $node + * @param bool $autoReceipt + * @throws Exception */ protected function processInboundDataNode(ProtocolNode $node, $autoReceipt = true) { $this->debugPrint($node->nodeString("rx ") . "\n"); @@ -3167,8 +3174,10 @@ protected function sendCheckAndSendMedia($filepath, $maxSize, $to, $type, $allow /** * Send a broadcast - * @param array $targets Array of numbers to send to - * @param object $node + * @param array $targets Array of numbers to send to + * @param object $node + * @param $type + * @return string */ protected function sendBroadcast($targets, $node, $type) { @@ -3276,10 +3285,10 @@ protected function sendGroupsChangeParticipants($groupId, $participants, $tag, $ /** * Send node to the servers. * - * @param $to - * The recipient to send. - * @param $node ProtocolNode - * The node that contains the message. + * @param $to + * @param ProtocolNode $node + * @param null $id + * @return null|string */ protected function sendMessageNode($to, $node, $id = null) { @@ -3322,8 +3331,8 @@ protected function sendMessageNode($to, $node, $id = null) /** * Tell the server we received the message. * - * @param ProtocolNode $msg - * The ProtocolTreeNode that contains the message. + * @param ProtocolNode $msg The ProtocolTreeNode that contains the message. + * @param null $type */ protected function sendMessageReceived($msg, $type = null) { @@ -3347,6 +3356,7 @@ protected function sendMessageReceived($msg, $type = null) /** * Send node to the WhatsApp server. * @param ProtocolNode $node + * @param bool $encrypt */ protected function sendNode($node, $encrypt = true) { From 9246848d9f99e1a8892d73ae4ec40071ff88699c Mon Sep 17 00:00:00 2001 From: Jonathan Williamson Date: Sun, 26 Oct 2014 16:43:21 +0000 Subject: [PATCH 076/436] Fixed a number of DocBlocs with correct typehints that were previously incorrect. No Code changes. --- src/WhatsAppEvent.php | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/src/WhatsAppEvent.php b/src/WhatsAppEvent.php index 14525318..29f09ad1 100755 --- a/src/WhatsAppEvent.php +++ b/src/WhatsAppEvent.php @@ -12,12 +12,13 @@ */ class WhatsAppEvent { - /** + + /** * Contains all of our event listeners. * - * Note: This shouldn't be static, and may change in future implementations. - * - * @var WhatsAppEventListener + * Note: This shouldn't be static, and may change in future implementations. + * + * @var array */ static $event_listeners = array(); @@ -59,10 +60,8 @@ protected function register($event) /** * Binds a callback to a event. * - * @param string $event - * Name of the event. - * @param string $callback - * The method or function to call. + * @param string $event Name of the event. + * @param $listener * * @deprecated Use addEventListener instead. */ @@ -93,7 +92,7 @@ public function fire($event, $arguments = array()) /** * Fires the callback for each listener. * - * @param function $callbackEvent + * @param callable $callbackEvent */ private function fireCallback($callbackEvent) { array_map($callbackEvent, self::$event_listeners); From c423e22b7abbf6d25fb2dd46c3c169cb9598d9d6 Mon Sep 17 00:00:00 2001 From: Jonathan Williamson Date: Sun, 26 Oct 2014 16:52:24 +0000 Subject: [PATCH 077/436] More DocBloc fixes. No Code changes. --- src/events/WhatsAppEventListenerLegacyAdapter.php | 4 ++-- src/events/WhatsAppEventListenerProxy.php | 4 ++++ src/protocol.class.php | 1 + 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/events/WhatsAppEventListenerLegacyAdapter.php b/src/events/WhatsAppEventListenerLegacyAdapter.php index c5c34e48..4b431c05 100755 --- a/src/events/WhatsAppEventListenerLegacyAdapter.php +++ b/src/events/WhatsAppEventListenerLegacyAdapter.php @@ -20,8 +20,8 @@ class WhatsAppEventListenerLegacyAdapter extends WhatsAppEventListenerProxy { /** * Constructor. * - * @param string $event - * To be removed. + * @param $eventName + * @param $callback */ function __construct($eventName, $callback) { diff --git a/src/events/WhatsAppEventListenerProxy.php b/src/events/WhatsAppEventListenerProxy.php index 5c7fdab6..9637fc3f 100755 --- a/src/events/WhatsAppEventListenerProxy.php +++ b/src/events/WhatsAppEventListenerProxy.php @@ -8,9 +8,13 @@ * Funnels all events through the abstract handleEvent method. */ abstract class WhatsAppEventListenerProxy implements WhatsAppEventListener { + /** * This method will get all event calls. * + * @param $eventName + * @param array $arguments + * @return */ abstract protected function handleEvent($eventName, array $arguments ); diff --git a/src/protocol.class.php b/src/protocol.class.php index 67a717f0..72688dbf 100755 --- a/src/protocol.class.php +++ b/src/protocol.class.php @@ -522,6 +522,7 @@ public function StartStream($domain, $resource) /** * @param ProtocolNode $node + * @param bool $encrypt * @return string */ public function write($node, $encrypt = true) From 67bfdb5a506a0fbfc110c21ad1e18a559f97d6d5 Mon Sep 17 00:00:00 2001 From: Jonathan Williamson Date: Sun, 26 Oct 2014 17:16:06 +0000 Subject: [PATCH 078/436] More DocBloc fixes after pulling latest commit in. No Code changes. --- src/whatsprot.class.php | 105 ++++++++++++++++++---------------------- 1 file changed, 47 insertions(+), 58 deletions(-) diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index 3f358737..4baba397 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -586,6 +586,7 @@ public function sendBroadcastAudio($targets, $path, $storeURLmedia = false, $fsi * @param bool $storeURLmedia Keep a copy of the audio file on your server * @param int $fsize * @param string $fhash + * @param string $caption */ public function sendBroadcastImage($targets, $path, $storeURLmedia = false, $fsize = 0, $fhash = "", $caption = "") { @@ -650,11 +651,12 @@ public function sendBroadcastMessage($targets, $message) * * Approx 20 (unverified) is the maximum number of targets * - * @param array $targets An array of numbers to send to. - * @param string $path URL or local path to the video file to send - * @param bool $storeURLmedia Keep a copy of the audio file on your server + * @param array $targets An array of numbers to send to. + * @param string $path URL or local path to the video file to send + * @param bool $storeURLmedia Keep a copy of the audio file on your server * @param int $fsize * @param string $fhash + * @param string $caption */ public function sendBroadcastVideo($targets, $path, $storeURLmedia = false, $fsize = 0, $fhash = "", $caption = "") { @@ -1248,10 +1250,8 @@ public function sendGroupsParticipantsRemove($groupId, $participants) * Promote participant(s) of a group * Makes a participant admin of a group * - * @param string $groupId - * The group ID. - * @param array $participants - * An array with the participants numbers to promote + * @param string $gId The group ID. + * @param array $participants An array with the participants numbers to promote */ public function sendPromoteParticipants($gId, $participants) { @@ -1266,10 +1266,8 @@ public function sendPromoteParticipants($gId, $participants) * Demote participant(s) of a group. * Remove participant of being admin of a group. * - * @param string $groupId - * The group ID. - * @param array $participants - * An array with the participants numbers to demote + * @param string $gId The group ID. + * @param array $participants An array with the participants numbers to demote */ public function sendDemoteParticipants($gId, $participants) { @@ -1284,8 +1282,7 @@ public function sendDemoteParticipants($gId, $participants) * Lock group: Paritipants cant change group subject or * profile picture except admin * - * @param string $groupId - * The group ID. + * @param string $gId The group ID. */ public function sendLockGroup($gId) { @@ -1302,14 +1299,13 @@ public function sendLockGroup($gId) $this->waitForServer($msgId); } - /** - * Unlock group: Any participant can change - * group subject or profile picture - * - * - * @param string $groupId - * The group ID. - */ + /** + * Unlock group: Any participant can change + * group subject or profile picture + * + * + * @param string $gId The group ID. + */ public function sendUnlockGroup($gId) { $msgId = $this->createMsgId("unlock_group_"); @@ -1383,14 +1379,12 @@ public function sendMessageComposing($to) /** * Send an image file to group/user * - * @param string $to - * Recipient number - * @param string $filepath - * The url/uri to the image file. - * @param bool $storeURLmedia Keep copy of file - * @param int $fsize size of the media file - * @param string $fhash base64 hash of the media file - * + * @param string $to Recipient number + * @param string $filepath The url/uri to the image file. + * @param bool $storeURLmedia Keep copy of file + * @param int $fsize size of the media file + * @param string $fhash base64 hash of the media file + * @param string $caption * @return bool */ public function sendMessageImage($to, $filepath, $storeURLmedia = false, $fsize = 0, $fhash = "", $caption = "") @@ -1461,13 +1455,12 @@ protected function sendChatState($to, $state) /** * Send a video to the user/group. * - * @param string $to - * The recipient to send. - * @param string $filepath - * The url/uri to the MP4/MOV video. - * @param bool $storeURLmedia Keep a copy of media file. - * @param int $fsize size of the media file - * @param string $fhash base64 hash of the media file + * @param string $to The recipient to send. + * @param string $filepath The url/uri to the MP4/MOV video. + * @param bool $storeURLmedia Keep a copy of media file. + * @param int $fsize size of the media file + * @param string $fhash base64 hash of the media file + * @param string $caption * * @return bool */ @@ -3144,12 +3137,14 @@ public function readStanza() /** * Checks that the media file to send is of allowable filetype and within size limits. * - * @param string $filepath The URL/URI to the media file - * @param int $maxSize Maximim filesize allowed for media type - * @param string $to Recipient ID/number - * @param string $type media filetype. 'audio', 'video', 'image' - * @param array $allowedExtensions An array of allowable file types for the media file - * @param bool $storeURLmedia Keep a copy of the media file + * @param string $filepath The URL/URI to the media file + * @param int $maxSize Maximim filesize allowed for media type + * @param string $to Recipient ID/number + * @param string $type media filetype. 'audio', 'video', 'image' + * @param array $allowedExtensions An array of allowable file types for the media file + * @param bool $storeURLmedia Keep a copy of the media file + * @param string $caption + * * @return bool */ protected function sendCheckAndSendMedia($filepath, $maxSize, $to, $type, $allowedExtensions, $storeURLmedia, $caption = "") @@ -3253,12 +3248,10 @@ protected function sendGetGroupsFiltered($type) /** * Change participants of a group. * - * @param string $groupId - * The group ID. - * @param array $participants - * An array with the participants. - * @param string $tag - * The tag action. 'add' or 'remove' + * @param string $groupId The group ID. + * @param array $participants An array with the participants. + * @param string $tag The tag action. 'add' or 'remove' + * @param $id */ protected function sendGroupsChangeParticipants($groupId, $participants, $tag, $id) { @@ -3367,16 +3360,12 @@ protected function sendNode($node, $encrypt = true) /** * Send request to upload file * - * @param $b64hash - * Base64 hash of file - * @param string $type - * File type - * @param $size - * File size - * @param string $filepath - * Path to image file - * @param string $to - * Recipient + * @param string $b64hash A base64 hash of file + * @param string $type File type + * @param string $size File size + * @param string $filepath Path to image file + * @param string $to Recipient + * @param string $caption */ protected function sendRequestFileUpload($b64hash, $type, $size, $filepath, $to, $caption = "") { From c92b07ea5b362f70a3861d837824cad3b7f4a9a9 Mon Sep 17 00:00:00 2001 From: mgp25 Date: Sun, 26 Oct 2014 21:39:16 +0100 Subject: [PATCH 079/436] presence_v2 feature added --- src/whatsprot.class.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index 4baba397..37163e3f 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -1882,10 +1882,10 @@ protected function createAuthResponseNode() protected function createFeaturesNode() { $readreceipts = new ProtocolNode("readreceipts", null, null, null); - $groupsv2 = new ProtocolNode("groups_v2", null, null, null); - $privacy = new ProtocolNode("privacy", null, null, null); - - $parent = new ProtocolNode("stream:features", null, array($readreceipts, $groupsv2, $privacy), null); + $groupsv2 = new ProtocolNode("groups_v2", null, null, null); + $privacy = new ProtocolNode("privacy", null, null, null); + $presencev2 = new ProtocolNode("presence", null, null, null); + $parent = new ProtocolNode("stream:features", null, array($readreceipts, $groupsv2, $privacy, $presencev2), null); return $parent; } From f986cb2844204f2fd6c308c9e29086b567164281 Mon Sep 17 00:00:00 2001 From: mgp25 Date: Tue, 28 Oct 2014 01:20:44 +0100 Subject: [PATCH 080/436] Update version, token & user agent No relevant changes in this versions* --- classesMD5.txt | 6 ++++++ src/token.php | 2 +- src/whatsprot.class.php | 4 ++-- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/classesMD5.txt b/classesMD5.txt index ac9b3553..cd0ecc9c 100644 --- a/classesMD5.txt +++ b/classesMD5.txt @@ -3,6 +3,12 @@ = B64 ENCODED = =============================== +WhatsApp/2.11.426 Android/4.3 Device/GalaxyS3 +gGha73KQT1l3G8AMQGgKxg== + +WhatsApp/2.11.424 Android/4.3 Device/GalaxyS3 +JT0gTRUvrWEBPlFv2ZvhGg== + WhatsApp/2.11.422 Android/4.3 Device/GalaxyS3 fjwVxyGxveeMtXfbBZX5+A== diff --git a/src/token.php b/src/token.php index d62b3b83..40c9a991 100755 --- a/src/token.php +++ b/src/token.php @@ -3,7 +3,7 @@ function generateRequestToken($country, $phone) { $signature = "MIIDMjCCAvCgAwIBAgIETCU2pDALBgcqhkjOOAQDBQAwfDELMAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFDASBgNVBAcTC1NhbnRhIENsYXJhMRYwFAYDVQQKEw1XaGF0c0FwcCBJbmMuMRQwEgYDVQQLEwtFbmdpbmVlcmluZzEUMBIGA1UEAxMLQnJpYW4gQWN0b24wHhcNMTAwNjI1MjMwNzE2WhcNNDQwMjE1MjMwNzE2WjB8MQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEUMBIGA1UEBxMLU2FudGEgQ2xhcmExFjAUBgNVBAoTDVdoYXRzQXBwIEluYy4xFDASBgNVBAsTC0VuZ2luZWVyaW5nMRQwEgYDVQQDEwtCcmlhbiBBY3RvbjCCAbgwggEsBgcqhkjOOAQBMIIBHwKBgQD9f1OBHXUSKVLfSpwu7OTn9hG3UjzvRADDHj+AtlEmaUVdQCJR+1k9jVj6v8X1ujD2y5tVbNeBO4AdNG/yZmC3a5lQpaSfn+gEexAiwk+7qdf+t8Yb+DtX58aophUPBPuD9tPFHsMCNVQTWhaRMvZ1864rYdcq7/IiAxmd0UgBxwIVAJdgUI8VIwvMspK5gqLrhAvwWBz1AoGBAPfhoIXWmz3ey7yrXDa4V7l5lK+7+jrqgvlXTAs9B4JnUVlXjrrUWU/mcQcQgYC0SRZxI+hMKBYTt88JMozIpuE8FnqLVHyNKOCjrh4rs6Z1kW6jfwv6ITVi8ftiegEkO8yk8b6oUZCJqIPf4VrlnwaSi2ZegHtVJWQBTDv+z0kqA4GFAAKBgQDRGYtLgWh7zyRtQainJfCpiaUbzjJuhMgo4fVWZIvXHaSHBU1t5w//S0lDK2hiqkj8KpMWGywVov9eZxZy37V26dEqr/c2m5qZ0E+ynSu7sqUD7kGx/zeIcGT0H+KAVgkGNQCo5Uc0koLRWYHNtYoIvt5R3X6YZylbPftF/8ayWTALBgcqhkjOOAQDBQADLwAwLAIUAKYCp0d6z4QQdyN74JDfQ2WCyi8CFDUM4CaNB+ceVXdKtOrNTQcc0e+t"; - $classesMd5 = "fjwVxyGxveeMtXfbBZX5+A=="; // 2.11.422 + $classesMd5 = "gGha73KQT1l3G8AMQGgKxg=="; // 2.11.426 $key2 = base64_decode("/UIGKU1FVQa+ATM2A0za7G2KI9S/CwPYjgAbc67v7ep42eO/WeTLx1lb1cHwxpsEgF4+PmYpLd2YpGUdX/A2JQitsHzDwgcdBpUf7psX1BU="); $data = base64_decode($signature) . base64_decode($classesMd5) . $phone; diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index 37163e3f..aec881f2 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -46,8 +46,8 @@ class WhatsProt const WHATSAPP_SERVER = 's.whatsapp.net'; // The hostname used to login/send messages. const WHATSAPP_UPLOAD_HOST = 'https://mms.whatsapp.net/client/iphone/upload.php'; // The upload host. const WHATSAPP_DEVICE = 'Android'; // The device name. - const WHATSAPP_VER = '2.11.422'; // The WhatsApp version. - const WHATSAPP_USER_AGENT = 'WhatsApp/2.11.422 Android/4.3 Device/GalaxyS3'; // User agent used in request/registration code. + const WHATSAPP_VER = '2.11.426'; // The WhatsApp version. + const WHATSAPP_USER_AGENT = 'WhatsApp/2.11.426 Android/4.3 Device/GalaxyS3'; // User agent used in request/registration code. const WHATSAPP_VER_CHECKER = 'https://coderus.openrepos.net/whitesoft/whatsapp_version'; // Check WhatsApp version /** From 28b394c6df718010e4d2a1d181751b2e8c8f6e81 Mon Sep 17 00:00:00 2001 From: mgp25 Date: Tue, 28 Oct 2014 22:50:34 +0100 Subject: [PATCH 081/436] Added onStreamError Event --- src/WhatsAppEvent.php | 9 +++++++++ src/events/WhatsAppEventListener.php | 8 ++++++-- src/events/WhatsAppEventListenerBase.php | 4 ++++ src/events/WhatsAppEventListenerProxy.php | 6 ++++++ src/whatsprot.class.php | 9 ++++++--- 5 files changed, 31 insertions(+), 5 deletions(-) diff --git a/src/WhatsAppEvent.php b/src/WhatsAppEvent.php index 29f09ad1..935cdc53 100755 --- a/src/WhatsAppEvent.php +++ b/src/WhatsAppEvent.php @@ -780,6 +780,15 @@ function fireSendStatusUpdate( $this->fireCallback($callbackEvent); } + function fireStreamError( + $tag + ) { + $callbackEvent = function(WhatsAppEventListener $listener) use ($tag) { + $listener->onStreamError($tag); + }; + $this->fireCallback($callbackEvent); + } + function fireUploadFile( $phone, $name, diff --git a/src/events/WhatsAppEventListener.php b/src/events/WhatsAppEventListener.php index 8cc8e6ce..60e56917 100755 --- a/src/events/WhatsAppEventListener.php +++ b/src/events/WhatsAppEventListener.php @@ -394,12 +394,12 @@ function onGetExtendAccount( function onGetNormalizedJid( $phone, //the user phone number including country code. - $result //the normalized jid + $result //the normalized jid ); function onGetBroadcastLists( $phone, //the user phone number including country code. - $broadcastLists //a multidimensional array with the lists + $broadcastLists //a multidimensional array with the lists ); function onPresence( @@ -452,6 +452,10 @@ function onSendStatusUpdate( $msg // The status message. ); + function onStreamError( + $tag // The error causing the stream error + ); + function onUploadFile( $phone, // The user phone number including the country code. $name, // The filename. diff --git a/src/events/WhatsAppEventListenerBase.php b/src/events/WhatsAppEventListenerBase.php index 1411ff7a..16d0a1f7 100755 --- a/src/events/WhatsAppEventListenerBase.php +++ b/src/events/WhatsAppEventListenerBase.php @@ -396,6 +396,10 @@ function onSendStatusUpdate( $msg ) {} + function onStreamError( + $tag + ) {} + function onUploadFile( $phone, $name, diff --git a/src/events/WhatsAppEventListenerProxy.php b/src/events/WhatsAppEventListenerProxy.php index 9637fc3f..a0869592 100755 --- a/src/events/WhatsAppEventListenerProxy.php +++ b/src/events/WhatsAppEventListenerProxy.php @@ -605,6 +605,12 @@ public function onGetSyncResult( $this->handleEvent(__FUNCTION__, func_get_args()); } + public function onStreamError( + $tag + ) { + $this->handleEvent(__FUNCTION__, func_get_args()); + } + public function onGetReceipt( $from, $id, diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index aec881f2..b97373c5 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -2729,15 +2729,18 @@ protected function processInboundDataNode(ProtocolNode $node, $autoReceipt = tru $children = $node->getChild(0); if ($node->getTag() == "stream:error" && empty($children) == false && $node->getChild(0)->getTag() == "system-shutdown") { - - throw new Exception('Error system-shutdown'); + $this->eventManager()->fireStreamError( + $node->getChild(0)->getTag() + ); } if ($node->getTag() == "stream:error") { - throw new Exception('Error stream error: '.$node->getChild(0)->getTag()); + $this->eventManager()->fireStreamError( + $node->getChild(0)->getTag() + ); } if($node->getTag() == "notification") From 4092425633529ae48f90493bad4058269207a13c Mon Sep 17 00:00:00 2001 From: Ardian Yuli Setyanto Date: Wed, 29 Oct 2014 08:30:34 +0700 Subject: [PATCH 082/436] onMediaMessageSent missing parameter PHP Fatal error: Declaration of WhatsAppEventListenerBase::onMediaMessageSent() must be compatible with WhatsAppEventListener::onMediaMessageSent($phone, $to, $id, $filetype, $url, $filename, $filesize, $filehash, $caption, $icon) --- src/events/WhatsAppEventListenerBase.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/events/WhatsAppEventListenerBase.php b/src/events/WhatsAppEventListenerBase.php index 16d0a1f7..3e0e1c5d 100755 --- a/src/events/WhatsAppEventListenerBase.php +++ b/src/events/WhatsAppEventListenerBase.php @@ -445,6 +445,7 @@ public function onMediaMessageSent( $url, $filename, $filesize, + $filehash, $caption, $icon ) {} From 69a93eb7ad0875cc68efa3ca982f0f2f52124a66 Mon Sep 17 00:00:00 2001 From: mgp25 Date: Thu, 30 Oct 2014 11:41:58 +0100 Subject: [PATCH 083/436] Added mnc data --- src/WhatsAppEvent.php | 7 +- src/countries.csv | 508 +++++++++++----------- src/events/WhatsAppEventListener.php | 3 +- src/events/WhatsAppEventListenerBase.php | 3 +- src/events/WhatsAppEventListenerProxy.php | 3 +- src/whatsprot.class.php | 10 +- 6 files changed, 270 insertions(+), 264 deletions(-) diff --git a/src/WhatsAppEvent.php b/src/WhatsAppEvent.php index 935cdc53..1f49f86a 100755 --- a/src/WhatsAppEvent.php +++ b/src/WhatsAppEvent.php @@ -239,10 +239,11 @@ function fireDissectPhone( $cc, $mcc, $lc, - $lg + $lg, + $mnc ) { - $callbackEvent = function(WhatsAppEventListener $listener) use ($phone, $country, $cc, $mcc, $lc, $lg) { - $listener->onDissectPhone($phone, $country, $cc, $mcc, $lc, $lg); + $callbackEvent = function(WhatsAppEventListener $listener) use ($phone, $country, $cc, $mcc, $lc, $lg, $mnc) { + $listener->onDissectPhone($phone, $country, $cc, $mcc, $lc, $lg, $mnc); }; $this->fireCallback($callbackEvent); } diff --git a/src/countries.csv b/src/countries.csv index a3d79597..4d4d669d 100755 --- a/src/countries.csv +++ b/src/countries.csv @@ -1,254 +1,254 @@ -"Afghanistan",93,412,"AF","ps" -"Albania",355,276,"AL","sq" -"Alberta",1403,302,"CA","en" -"Alberta",1780,302,"CA","en" -"Algeria",213,603,"DZ","ar" -"Andorra",376,213,"AD","ca" -"Angola",244,631,"AO","pt" -"Anguilla",1264,"365","AI","en" -"Antarctica (Australian bases)",6721,232,"AQ","en" -"Antigua and Barbuda",1268,"344","AG","en" -"Argentina",54,722,"AR","es" -"Armenia",374,283,"AM","hy" -"Aruba",297,363,"AW","nl" -"Ascension",247,658,"AC","en" -"Australia",61,505,"AU","en" -"Austria",43,232,"AT","de" -"Azerbaijan",994,400,"AZ","az" -"Bahamas",1242,"364","BS","en" -"Bahrain",973,426,"BH","ar" -"Bangladesh",880,470,"BD","bn" -"Barbados",1246,"342","BB","en" -"Belarus",375,257,"BY","be" -"Belgium",32,206,"BE","nl" -"Belize",501,702,"BZ","es" -"Benin",229,616,"BJ","fr" -"Bermuda",1441,"350","BM","en" -"Bhutan",975,402,"BT","dz" -"Bolivia",591,736,"BO","es" -"Bosnia and Herzegovina",387,218,"BA","bs" -"Botswana",267,652,"BW","en" -"Brazil",55,724,"BR","pt" -"British Columbia", 1250,302,"CA","en" -"British Columbia", 1604,302,"CA","en" -"British Columbia", 1778,302,"CA","en" -"British Indian Ocean Territory",246,348,"IO","en" -"British Virgin Islands",1284,"348","GB","en" -"Brunei",673,528,"BN","ms" -"Bulgaria",359,284,"BG","bg" -"Burkina Faso",226,613,"BF","fr" -"Burundi",257,642,"BI","rn" -"Cambodia",855,456,"KH","km" -"Cameroon",237,624,"CM","fr" -"Cape Verde",238,625,"CV","pt" -"Cayman Islands",1345,"346","GB","en" -"Central African Republic",236,623,"CF","sg" -"Chad",235,622,"TD","fr" -"Chile",56,730,"CL","es" -"China",86,"460|461","CN","en" -"Colombia",57,732,"CO","es" -"Comoros",269,654,"KM","fr" -"Democratic Republic of the Congo",243,630,"CD","fr" -"Republic of the Congo",242,629,"CG","fr" -"Cook Islands",682,548,"CK","en" -"Costa Rica",506,658,"CR","es" -"Cote d'Ivoire",712,"612","CI","fr" -"Croatia",385,219,"HR","hr" -"Cuba",53,368,"CU","es" -"Cyprus",357,280,"CY","el" -"Czech Republic",420,230,"CZ","cs" -"Denmark",45,238,"DK","da" -"Djibouti",253,638,"DJ","fr" -"Dominica",1767,"366","DM","en" -"Dominican Republic",1809,"370","DO","es" -"Dominican Republic",1829,"370","DO","en" -"East Timor",670,514,"TL","pt" -"Ecuador",593,740,"EC","es" -"Egypt",20,602,"EG","ar" -"El Salvador",503,706,"SV","es" -"Equatorial Guinea",240,627,"GQ","es" -"Eritrea",291,657,"ER","ti" -"Estonia",372,248,"EE","et" -"Ethiopia",251,636,"ET","am" -"Falkland Islands",500,750,"FK","en" -"Faroe Islands",298,288,"FO","fo" -"Fiji",679,542,"FJ","en" -"Finland",358,244,"FI","fi" -"France",33,208,"FR","fr" -"French Guiana",594,742,"GF","fr" -"French Polynesia",689,547,"PF","fr" -"Gabon",241,628,"GA","fr" -"Gambia",220,607,"GM","en" -"Gaza Strip",970,0,"PS","ar" -"Georgia",995,282,"GE","ka" -"Germany",49,262,"DE","de" -"Ghana",233,620,"GH","ak" -"Gibraltar",350,266,"GI","en" -"Greece",30,202,"GR","el" -"Greenland",299,290,"GL","kl" -"Grenada",1473,"352","GD","en" -"Guadeloupe",590,340,"GP","fr" -"Guam",1671,"535","GU","en" -"Guatemala",502,704,"GT","es" -"Guinea",224,611,"GN","fr" -"Guinea-Bissau",245,632,"GW","pt" -"Guyana",592,738,"GY","pt" -"Haiti",509,372,"HT","fr" -"Honduras",504,708,"HN","es" -"Hong Kong",852,454,"HK","zh" -"Hungary",36,216,"HU","hu" -"Iceland",354,274,"IS","is" -"India",91,"404|405|406","IN","hi" -"Indonesia",62,510,"ID","id" -"Iraq",964,418,"IQ","ar" -"Iran",98,432,"IR","fa" -"Ireland (Eire)",353,272,"IE","en" -"Israel",972,425,"IL","he" -"Italy",39,222,"IT","it" -"Jamaica",1876,"338","JM","en" -"Japan",81,"440|441","JP","ja" -"Jordan",962,416,"JO","ar" -"Kazakhstan",7,401,"KZ","kk" -"Kenya",254,639,"KE","sw" -"Kiribati",686,545,"KI","en" -"Kuwait",965,419,"KW","ar" -"Kyrgyzstan",996,437,"KG","ky" -"Laos",856,457,"LA","lo" -"Latvia",371,247,"LV","lv" -"Lebanon",961,415,"LB","ar" -"Lesotho",266,651,"LS","st" -"Liberia",231,618,"LR","en" -"Libya",218,606,"LY","ar" -"Liechtenstein",423,295,"LI","de" -"Lithuania",370,246,"LT","lt" -"Luxembourg",352,270,"LU","fr" -"Macau",853,455,"MO","pt" -"Republic of Macedonia",389,294,"MK","mk" -"Madagascar",261,646,"MG","mg" -"Malawi",265,650,"MW","ny" -"Malaysia",60,502,"MY","en" -"Maldives",960,472,"MV","dv" -"Mali",223,610,"ML","fr" -"Malta",356,278,"MT","mt" -"Manitoba",1204,302,"CA","en" -"Marshall Islands",692,551,"MH","mh" -"Martinique",596,340,"MQ","fr" -"Mauritania",222,609,"MR","ar" -"Mauritius",230,617,"MU","en" -"Mayotte",262,654,"YT","fr" -"Mexico",52,334,"MX","es" -"Federated States of Micronesia",691,550,"FM","en" -"Moldova",373,259,"MD","ru" -"Monaco",377,212,"MC","fr" -"Mongolia",976,428,"MN","mn" -"Montenegro",382,297,"ME","sr" -"Montserrat",1664,"354",MS,"en" -"Morocco",212,"604","MA","ar" -"Mozambique",258,643,"MZ","pt" -"Myanmar",95,414,"MM","my" -"Namibia",264,649,"NA","en" -"Nauru",674,536,"NR","na" -"Netherlands",31,204,"NL","nl" -"Netherlands Antilles",599,362,"AN","nl" -"Nepal",977,429,"NP","ne" -"New Brunswick",1506,302,"CA","en" -"New Caledonia",687,546,"NC","fr" -"New Zealand",64,530,"NZ","en" -"Newfoundland",1709,302,"CA","en" -"Nicaragua",505,710,"NI","es" -"Niger",227,614,"NE","fr" -"Nigeria",234,621,"NG","ha" -"Niue",683,555,"NU","en" -"Norfolk Island",6723,505,"NF","en" -"North Korea",850,467,"KP","ko" -"Northern Mariana Islands",1670,"534","MP","en" -"Northwest Territories",1867,302,"CA","en" -"Norway",47,242,"NO","nb" -"Nova Scotia",1902,302,"CA","en" -"Oman",968,422,"OM","ar" -"Ontario",1416,302,"CA","en" -"Ontario",1519,302,"CA","en" -"Ontario",1613,302,"CA","en" -"Ontario",1647,302,"CA","en" -"Ontario",1705,302,"CA","en" -"Ontario",1807,302,"CA","en" -"Ontario",1905,302,"CA","en" -"Pakistan",92,410,"PK","en" -"Palau",680,552,"PW","en" -"Palestine",970,425,"PS","ar" -"Panama",507,714,"PA","es" -"Papua New Guinea",675,537,"PG","ho" -"Paraguay",595,744,"PY","es" -"Peru",51,716,"PE","es" -"Philippines",63,515,"PH","fil" -"Poland",48,260,"PL","pl" -"Portugal",351,268,"PT","pt" -"Qatar",974,427,"QA","ar" -"Quebec",1418,302,"CA","en" -"Quebec",1450,302,"CA","en" -"Quebec",1514,302,"CA","en" -"Quebec",1819,302,"CA","en" -"Reunion",262,647,"RE","fr" -"Romania",40,226,"RO","ro" -"Russia",7,250,"RU","ru" -"Rwanda",250,635,"RW","rw" -"Saint-Barthelemy",590,340,"BL","fr" -"Saint Helena",290,658,"SH","en" -"Saint Kitts and Nevis",1869,"356","KN","en" -"Saint Lucia",1758,"358","LC","en" -"Saint Martin (French side)",590,340, "MF","fr" -"Saint Pierre and Miquelon",508,308,"PM","fr" -"Saint Vincent and the Grenadines",1670,"360","VC","en" -"Samoa",685,549,"WS","sm" -"Sao Tome and Principe",239,626,"ST","pt" -"Saskatchewan",1306,302,"CA","en" -"Saudi Arabia",966,420,"SA","ar" -"Senegal",221,608,"SN","wo" -"Serbia",381,220,"RS","sr" -"Seychelles",248,633,"SC","fr" -"Sierra Leone",232,619,"SL","en" -"Singapore",65,525,"SG","en" -"Slovakia",421,231,"SK","sk" -"Slovenia",386,293,"SI","sl" -"Solomon Islands",677,540,"SB","en" -"Somalia",252,637,"SO","so" -"South Africa",27,655,"ZA","xh" -"South Korea",82,450,"KR","ko" -"South Sudan",211,659,"SS","en" -"Spain",34,214,"es","es" -"Sri Lanka",94,413,"LK","si" -"Sudan",249,634,"SD","ar" -"Suriname",597,746,"SR","nl" -"Swaziland",268,653,"SZ","ss" -"Sweden",46,240,"SE","sv" -"Switzerland",41,228,"CH","de" -"Syria",963,417,"SY","ar" -"Taiwan",886,466,"TW","cmn" -"Tajikistan",992,436,"TJ","tg" -"Tanzania",255,640,"TZ","sw" -"Thailand",66,520,"TH","th" -"Togo",228,615,"TG","fr" -"Tokelau",690,690,"TK","tkl" -"Tonga",676,539,"TO","to" -"Trinidad and Tobago",1868,"374","TT","en" -"Tunisia",216,605,"TN","ar" -"Turkey",90,286,"TR","tr" -"Turkmenistan",993,438,"TM","tk" -"Turks and Caicos Islands",1649,"376","TC","en" -"Tuvalu",688,553,"TV","tvl" -"Uganda",256,641,"UG","sw" -"Ukraine",380,255,"UA","uk" -"United Arab Emirates",971,"424|430|431","AE","ar" -"United Kingdom",44,"234|235","GB","en" -"United States of America",1,"310|311|312|313|314|315|316","en","en" -"Uruguay",598,748,"UY","es" -"Uzbekistan",998,434,"UZ","uz" -"Vanuatu",678,541,"VU","bi" -"Venezuela",58,734,"VE","es" -"Vietnam",84,452,"VN","vi" -"U.S. Virgin Islands",1340,"332","VI","en" -"Wallis and Futuna",681,543,"WF","fr" -"West Bank",970,0,"PS","ar" -"Yemen",967,421,"YE","ar" -"Zambia",260,645,"ZM","en" -"Zimbabwe",263,648,"ZW","en" +"Afghanistan",93,412,"AF","ps","040" +"Albania",355,276,"AL","sq","002" +"Alberta",1403,302,"CA","en","720" +"Alberta",1780,302,"CA","en","720" +"Algeria",213,603,"DZ","ar","001" +"Andorra",376,213,"AD","ca","003" +"Angola",244,631,"AO","pt","002" +"Anguilla",1264,"365","AI","en","840" +"Antarctica (Australian bases)",6721,232,"AQ","en","001" +"Antigua and Barbuda",1268,"344","AG","en","050" +"Argentina",54,722,"AR","es","010" +"Armenia",374,283,"AM","hy","010" +"Aruba",297,363,"AW","nl","001" +"Ascension",247,658,"AC","en","001" +"Australia",61,505,"AU","en","003" +"Austria",43,232,"AT","de","001" +"Azerbaijan",994,400,"AZ","az","001" +"Bahamas",1242,"364","BS","en","039" +"Bahrain",973,426,"BH","ar","001" +"Bangladesh",880,470,"BD","bn","001" +"Barbados",1246,"342","BB","en","750" +"Belarus",375,257,"BY","be","001" +"Belgium",32,206,"BE","nl","001" +"Belize",501,702,"BZ","es","067" +"Benin",229,616,"BJ","fr","003" +"Bermuda",1441,"350","BM","en","001" +"Bhutan",975,402,"BT","dz","011" +"Bolivia",591,736,"BO","es","002" +"Bosnia and Herzegovina",387,218,"BA","bs","003" +"Botswana",267,652,"BW","en","002" +"Brazil",55,724,"BR","pt","002" +"British Columbia", 1250,302,"CA","en","370" +"British Columbia", 1604,302,"CA","en","370" +"British Columbia", 1778,302,"CA","en","370" +"British Indian Ocean Territory",246,348,"IO","en","170" +"British Virgin Islands",1284,"348","GB","en","170" +"Brunei",673,528,"BN","ms","011" +"Bulgaria",359,284,"BG","bg","003" +"Burkina Faso",226,613,"BF","fr","002" +"Burundi",257,642,"BI","rn","001" +"Cambodia",855,456,"KH","km","002" +"Cameroon",237,624,"CM","fr","001" +"Cape Verde",238,625,"CV","pt","001" +"Cayman Islands",1345,"346","GB","en","050" +"Central African Republic",236,623,"CF","sg","001" +"Chad",235,622,"TD","fr","003" +"Chile",56,730,"CL","es","002" +"China",86,"460|461","CN","en","001" +"Colombia",57,732,"CO","es","102" +"Comoros",269,654,"KM","fr","001" +"Democratic Republic of the Congo",243,630,"CD","fr","086" +"Republic of the Congo",242,629,"CG","fr","001" +"Cook Islands",682,548,"CK","en","001" +"Costa Rica",506,712,"CR","es","004" +"Cote d'Ivoire",712,"612","CI","fr","002" +"Croatia",385,219,"HR","hr","001" +"Cuba",53,368,"CU","es","001" +"Cyprus",357,280,"CY","el","001" +"Czech Republic",420,230,"CZ","cs","001" +"Denmark",45,238,"DK","da","001" +"Djibouti",253,638,"DJ","fr","001" +"Dominica",1767,"366","DM","en","020" +"Dominican Republic",1809,"370","DO","es","001" +"Dominican Republic",1829,"370","DO","en","001" +"East Timor",670,514,"TL","pt","001" +"Ecuador",593,740,"EC","es","001" +"Egypt",20,602,"EG","ar","002" +"El Salvador",503,706,"SV","es","001" +"Equatorial Guinea",240,627,"GQ","es","003" +"Eritrea",291,657,"ER","ti","001" +"Estonia",372,248,"EE","et","001" +"Ethiopia",251,636,"ET","am","001" +"Falkland Islands",500,750,"FK","en","001" +"Faroe Islands",298,288,"FO","fo","001" +"Fiji",679,542,"FJ","en","001" +"Finland",358,244,"FI","fi","005" +"France",33,208,"FR","fr","001" +"French Guiana",594,340,"GF","fr","011" +"French Polynesia",689,547,"PF","fr","015" +"Gabon",241,628,"GA","fr","001" +"Gambia",220,607,"GM","en","001" +"Gaza Strip",970,0,"PS","ar","001" +"Georgia",995,282,"GE","ka","001" +"Germany",49,262,"DE","de","001" +"Ghana",233,620,"GH","ak","001" +"Gibraltar",350,266,"GI","en","001" +"Greece",30,202,"GR","el","001" +"Greenland",299,290,"GL","kl","001" +"Grenada",1473,"352","GD","en","030" +"Guadeloupe",590,340,"GP","fr","002" +"Guam",1671,"310","GU","en","032" +"Guatemala",502,704,"GT","es","001" +"Guinea",224,611,"GN","fr","001" +"Guinea-Bissau",245,632,"GW","pt","001" +"Guyana",592,738,"GY","pt","001" +"Haiti",509,372,"HT","fr","001" +"Honduras",504,708,"HN","es","001" +"Hong Kong",852,454,"HK","zh","006" +"Hungary",36,216,"HU","hu","001" +"Iceland",354,274,"IS","is","001" +"India",91,"404|405|406","IN","hi","011" +"Indonesia",62,510,"ID","id","001" +"Iraq",964,418,"IQ","ar","020" +"Iran",98,432,"IR","fa","011" +"Ireland (Eire)",353,272,"IE","en","001" +"Israel",972,425,"IL","he","001" +"Italy",39,222,"IT","it","001" +"Jamaica",1876,"338","JM","en","050" +"Japan",81,"440|441","JP","ja","001" +"Jordan",962,416,"JO","ar","001" +"Kazakhstan",7,401,"KZ","kk","001" +"Kenya",254,639,"KE","sw","002" +"Kiribati",686,545,"KI","en","009" +"Kuwait",965,419,"KW","ar","003" +"Kyrgyzstan",996,437,"KG","ky","001" +"Laos",856,457,"LA","lo","001" +"Latvia",371,247,"LV","lv","001" +"Lebanon",961,415,"LB","ar","003" +"Lesotho",266,651,"LS","st","001" +"Liberia",231,618,"LR","en","007" +"Libya",218,606,"LY","ar","003" +"Liechtenstein",423,295,"LI","de","001" +"Lithuania",370,246,"LT","lt","001" +"Luxembourg",352,270,"LU","fr","001" +"Macau",853,455,"MO","pt","004" +"Republic of Macedonia",389,294,"MK","mk","001" +"Madagascar",261,646,"MG","mg","001" +"Malawi",265,650,"MW","ny","001" +"Malaysia",60,502,"MY","en","013" +"Maldives",960,472,"MV","dv","001" +"Mali",223,610,"ML","fr","001" +"Malta",356,278,"MT","mt","001" +"Manitoba",1204,302,"CA","en","370" +"Marshall Islands",692,551,"MH","mh","001" +"Martinique",596,340,"MQ","fr","001" +"Mauritania",222,609,"MR","ar","002" +"Mauritius",230,617,"MU","en","001" +"Mayotte",262,654,"YT","fr","001" +"Mexico",52,334,"MX","es","030" +"Federated States of Micronesia",691,550,"FM","en","001" +"Moldova",373,259,"MD","ru","001" +"Monaco",377,212,"MC","fr","001" +"Mongolia",976,428,"MN","mn","088" +"Montenegro",382,297,"ME","sr","001" +"Montserrat",1664,"354",MS,"en","860" +"Morocco",212,"604","MA","ar","001" +"Mozambique",258,643,"MZ","pt","001" +"Myanmar",95,414,"MM","my","005" +"Namibia",264,649,"NA","en","001" +"Nauru",674,536,"NR","na","002" +"Netherlands",31,204,"NL","nl","004" +"Netherlands Antilles",599,362,"AN","nl","069" +"Nepal",977,429,"NP","ne","001" +"New Brunswick",1506,302,"CA","en","370" +"New Caledonia",687,546,"NC","fr","001" +"New Zealand",64,530,"NZ","en","001" +"Newfoundland",1709,302,"CA","en","370" +"Nicaragua",505,710,"NI","es","030" +"Niger",227,614,"NE","fr","004" +"Nigeria",234,621,"NG","ha","020" +"Niue",683,555,"NU","en","001" +"Norfolk Island",6723,505,"NF","en","010" +"North Korea",850,467,"KP","ko","005" +"Northern Mariana Islands",1670,"534","MP","en","001" +"Northwest Territories",1867,302,"CA","en","370" +"Norway",47,242,"NO","nb","001" +"Nova Scotia",1902,302,"CA","en","370" +"Oman",968,422,"OM","ar","002" +"Ontario",1416,302,"CA","en","370" +"Ontario",1519,302,"CA","en","370" +"Ontario",1613,302,"CA","en","370" +"Ontario",1647,302,"CA","en","370" +"Ontario",1705,302,"CA","en","370" +"Ontario",1807,302,"CA","en","370" +"Ontario",1905,302,"CA","en","370" +"Pakistan",92,410,"PK","en","001" +"Palau",680,552,"PW","en","001" +"Palestine",970,425,"PS","ar","006" +"Panama",507,714,"PA","es","002" +"Papua New Guinea",675,537,"PG","ho","001" +"Paraguay",595,744,"PY","es","001" +"Peru",51,716,"PE","es","006" +"Philippines",63,515,"PH","fil","002" +"Poland",48,260,"PL","pl","001" +"Portugal",351,268,"PT","pt","001" +"Qatar",974,427,"QA","ar","001" +"Quebec",1418,302,"CA","en","370" +"Quebec",1450,302,"CA","en","370" +"Quebec",1514,302,"CA","en","370" +"Quebec",1819,302,"CA","en","370" +"Reunion",262,647,"RE","fr","002" +"Romania",40,226,"RO","ro","001" +"Russia",7,250,"RU","ru","001" +"Rwanda",250,635,"RW","rw","013" +"Saint-Barthelemy",590,340,"BL","fr","001" +"Saint Helena",290,658,"SH","en","000" +"Saint Kitts and Nevis",1869,"356","KN","en","050" +"Saint Lucia",1758,"358","LC","en","050" +"Saint Martin (French side)",590,340, "MF","fr","001" +"Saint Pierre and Miquelon",508,308,"PM","fr","001" +"Saint Vincent and the Grenadines",1670,"360","VC","en","070" +"Samoa",685,549,"WS","sm","001" +"Sao Tome and Principe",239,626,"ST","pt","001" +"Saskatchewan",1306,302,"CA","en","370" +"Saudi Arabia",966,420,"SA","ar","001" +"Senegal",221,608,"SN","wo","001" +"Serbia",381,220,"RS","sr","001" +"Seychelles",248,633,"SC","fr","001" +"Sierra Leone",232,619,"SL","en","001" +"Singapore",65,525,"SG","en","001" +"Slovakia",421,231,"SK","sk","001" +"Slovenia",386,293,"SI","sl","031" +"Solomon Islands",677,540,"SB","en","001" +"Somalia",252,637,"SO","so","001" +"South Africa",27,655,"ZA","xh","001" +"South Korea",82,450,"KR","ko","005" +"South Sudan",211,659,"SS","en","002" +"Spain",34,214,"es","es","007" +"Sri Lanka",94,413,"LK","si","001" +"Sudan",249,634,"SD","ar","001" +"Suriname",597,746,"SR","nl","002" +"Swaziland",268,653,"SZ","ss","010" +"Sweden",46,240,"SE","sv","001" +"Switzerland",41,228,"CH","de","001" +"Syria",963,417,"SY","ar","001" +"Taiwan",886,466,"TW","cmn","001" +"Tajikistan",992,436,"TJ","tg","001" +"Tanzania",255,640,"TZ","sw","002" +"Thailand",66,520,"TH","th","018" +"Togo",228,615,"TG","fr","001" +"Tokelau",690,690,"TK","tkl","001" +"Tonga",676,539,"TO","to","001" +"Trinidad and Tobago",1868,"374","TT","en","012" +"Tunisia",216,605,"TN","ar","001" +"Turkey",90,286,"TR","tr","001" +"Turkmenistan",993,438,"TM","tk","001" +"Turks and Caicos Islands",1649,"376","TC","en","350" +"Tuvalu",688,553,"TV","tvl","001" +"Uganda",256,641,"UG","sw","001" +"Ukraine",380,255,"UA","uk","001" +"United Arab Emirates",971,"424|430|431","AE","ar","003" +"United Kingdom",44,"234|235","GB","en","002" +"United States of America",1,"310|311|312|313|314|315|316","en","en","150" +"Uruguay",598,748,"UY","es","007" +"Uzbekistan",998,434,"UZ","uz","001" +"Vanuatu",678,541,"VU","bi","005" +"Venezuela",58,734,"VE","es","004" +"Vietnam",84,452,"VN","vi","001" +"U.S. Virgin Islands",1340,"332","VI","en","001" +"Wallis and Futuna",681,543,"WF","fr","001" +"West Bank",970,0,"PS","ar","001" +"Yemen",967,421,"YE","ar","001" +"Zambia",260,645,"ZM","en","001" +"Zimbabwe",263,648,"ZW","en","001" diff --git a/src/events/WhatsAppEventListener.php b/src/events/WhatsAppEventListener.php index 60e56917..7b6b58d8 100755 --- a/src/events/WhatsAppEventListener.php +++ b/src/events/WhatsAppEventListener.php @@ -91,7 +91,8 @@ function onDissectPhone( $cc, // The number's country code. $mcc, // International cell network code for the detected country. $lc, // Location code for the detected country - $lg // Language code for the detected country + $lg, // Language code for the detected country + $mnc // Mobile network provider code ); function onDissectPhoneFailed( diff --git a/src/events/WhatsAppEventListenerBase.php b/src/events/WhatsAppEventListenerBase.php index 3e0e1c5d..da08401a 100755 --- a/src/events/WhatsAppEventListenerBase.php +++ b/src/events/WhatsAppEventListenerBase.php @@ -97,7 +97,8 @@ function onDissectPhone( $cc, $mcc, $lc, - $lg + $lg, + $mnc ) {} function onDissectPhoneFailed( diff --git a/src/events/WhatsAppEventListenerProxy.php b/src/events/WhatsAppEventListenerProxy.php index a0869592..6d0be709 100755 --- a/src/events/WhatsAppEventListenerProxy.php +++ b/src/events/WhatsAppEventListenerProxy.php @@ -118,7 +118,8 @@ function onDissectPhone( $cc, $mcc, $lc, - $lg + $lg, + $mnc ) { $this->handleEvent(__FUNCTION__, func_get_args()); } diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index b97373c5..b557d6a6 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -348,8 +348,8 @@ public function codeRequest($method = 'sms', $countryCode = null, $langCode = nu 'lg' => $langCode, 'lc' => $countryCode, 'token' => urlencode($token), - 'sim_mcc' => '000', //$phone['mcc'] - 'sim_mnc' => '000', // 001 + 'sim_mcc' => $phone['mcc'], + 'sim_mnc' => $phone['mnc'] //'reason' => 'jailbroken', ); @@ -1954,7 +1954,8 @@ protected function dissectPhone() 'phone' => substr($this->phoneNumber, strlen($data[1]), strlen($this->phoneNumber)), 'mcc' => $mcc, 'ISO3166' => @$data[3], - 'ISO639' => @$data[4] + 'ISO639' => @$data[4], + 'mnc' => $data[5] ); $this->eventManager()->fireDissectPhone( @@ -1964,7 +1965,8 @@ protected function dissectPhone() $phone['phone'], $phone['mcc'], $phone['ISO3166'], - $phone['ISO639'] + $phone['ISO639'], + $phone['mnc'] ); return $phone; From faa8ea1c3974f4ddcbc4a710357ef8414ca5da1c Mon Sep 17 00:00:00 2001 From: Jonathan Williamson Date: Thu, 30 Oct 2014 11:51:06 +0000 Subject: [PATCH 084/436] Small demo to show the subtle changes that formatting the entire code base would make. --- src/keystream.class.php | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/src/keystream.class.php b/src/keystream.class.php index 97914672..cc3448e5 100755 --- a/src/keystream.class.php +++ b/src/keystream.class.php @@ -9,7 +9,9 @@ require_once("rc4.php"); require_once("func.php"); -class KeyStream { +class KeyStream +{ + public static $AuthMethod = "WAUTH-2"; const DROP = 768; private $rc4; @@ -18,13 +20,13 @@ class KeyStream { public function __construct($key, $macKey) { - $this->rc4 = new rc4($key, self::DROP); + $this->rc4 = new rc4($key, self::DROP); $this->macKey = $macKey; } public static function GenerateKeys($password, $nonce) { - $array = array( + $array = array( "key",//placeholders "key", "key", @@ -32,11 +34,10 @@ public static function GenerateKeys($password, $nonce) ); $array2 = array(1, 2, 3, 4); $nonce .= '0'; - for($j = 0; $j < count($array); $j++) - { + for ($j = 0; $j < count($array); $j++) { $nonce[(strlen($nonce) - 1)] = chr($array2[$j]); - $foo = wa_pbkdf2("sha1", $password, $nonce, 2, 20, true); - $array[$j] = $foo; + $foo = wa_pbkdf2("sha1", $password, $nonce, 2, 20, true); + $array[$j] = $foo; } return $array; } @@ -45,12 +46,10 @@ public function DecodeMessage($buffer, $macOffset, $offset, $length) { $mac = $this->computeMac($buffer, $offset, $length); //validate mac - for($i = 0; $i < 4; $i++) - { + for ($i = 0; $i < 4; $i++) { $foo = ord($buffer[$macOffset + $i]); $bar = ord($mac[$i]); - if($foo !== $bar) - { + if ($foo !== $bar) { throw new Exception("MAC mismatch: $foo != $bar"); } } @@ -60,8 +59,8 @@ public function DecodeMessage($buffer, $macOffset, $offset, $length) public function EncodeMessage($buffer, $macOffset, $offset, $length) { $data = $this->rc4->cipher($buffer, $offset, $length); - $mac = $this->computeMac($data, $offset, $length); - return substr($data, 0, $macOffset).substr($mac, 0, 4).substr($data, $macOffset + 4); + $mac = $this->computeMac($data, $offset, $length); + return substr($data, 0, $macOffset) . substr($mac, 0, 4) . substr($data, $macOffset + 4); } private function computeMac($buffer, $offset, $length) From c5e0b2ee88e204d8bf2559c3c44ffecb5f441fe1 Mon Sep 17 00:00:00 2001 From: Jonathan Williamson Date: Thu, 30 Oct 2014 16:19:04 +0000 Subject: [PATCH 085/436] Initial format of most files to new PSR-1/PSR-2 standard. Strictly formatting only changes, no other code changes implemented. --- examples/bulk.php | 37 +- examples/contactsync.php | 20 +- examples/registerTool.php | 28 +- src/decode.php | 4 +- src/events/WhatsAppEventListener.php | 17 +- src/events/WhatsAppEventListenerBase.php | 213 +- .../WhatsAppEventListenerLegacyAdapter.php | 14 +- src/events/WhatsAppEventListenerProxy.php | 34 +- src/exception.php | 13 +- src/func.php | 3279 ++++++++++++++++- src/mediauploader.php | 21 +- src/protocol.class.php | 121 +- src/rc4.php | 5 +- src/token.php | 29 +- src/tokenmap.class.php | 392 +- src/vCard.php | 143 +- 16 files changed, 3774 insertions(+), 596 deletions(-) diff --git a/examples/bulk.php b/examples/bulk.php index 1f37438f..1207c4ff 100755 --- a/examples/bulk.php +++ b/examples/bulk.php @@ -1,5 +1,6 @@ Login(); * $wbs->SyncContacts($contacts); @@ -21,9 +22,9 @@ * or * $wbs->SendBroadcast($contacts, "Broadcast Message"); */ - class WaBulkSender { + protected $username; protected $password; protected $nickname; @@ -35,13 +36,13 @@ class WaBulkSender * @param string $username * @param string $password * @param string $nickname - * @param bool $debug + * @param bool $debug */ public function __construct($username, $password, $nickname = "WhatsApp", $debug = false) { $this->username = $username; $this->password = $password; - $this->wa = new WhatsProt($username, null, $nickname, $debug); + $this->wa = new WhatsProt($username, null, $nickname, $debug); $this->bindEvents(); } @@ -61,7 +62,9 @@ public function Login() $this->wa->loginWithPassword($this->password); $this->wa->sendClientConfig(); $this->wa->sendGetServerProperties(); - while($this->wa->pollMessage()); + while ($this->wa->pollMessage()) { + ; + } echo "Ready for work!
"; } @@ -84,7 +87,7 @@ public static function event_onLogin($number) /** * @param string $number - * @param $socket + * @param $socket */ public static function event_onConnect($number, $socket) { @@ -93,8 +96,7 @@ public static function event_onConnect($number, $socket) public static function event_onMessageReceivedServer($mynumber, $from, $id, $type) { - if($from != "broadcast") - { + if ($from != "broadcast") { //unlock echo "$type with id $id from $mynumber to $from received by server
"; static::$sendLock = false; @@ -106,18 +108,17 @@ public static function event_onMessageReceivedServer($mynumber, $from, $id, $typ */ public function SyncContacts($contacts) { - $this->wa->sendSync($contacts); - echo "Synced " . count($contacts) . " contacts
"; + $this->wa->sendSync($contacts); + echo "Synced " . count($contacts) . " contacts
"; } /** * @param string[] $targets - * @param string $message + * @param string $message */ public function SendBroadcast($targets, $message) { - if(count($targets) > 25) - { + if (count($targets) > 25) { echo "Error: too many broadcast targets (" . count($targets) . ")
"; return; } @@ -129,13 +130,12 @@ public function SendBroadcast($targets, $message) /** * @param string[] $targets - * @param $message + * @param $message */ public function SendBulk($targets, $message) { echo "Sending " . count($targets) . " bulk messages...
"; - foreach($targets as $target) - { + foreach ($targets as $target) { $this->wa->sendPresenceSubscription($target); $this->wa->pollMessage(); $this->wa->sendMessageComposing($target); @@ -145,8 +145,7 @@ public function SendBulk($targets, $message) static::$sendLock = true; echo "Sending message from " . $this->username . " to $target... "; $this->wa->sendMessage($target, $message); - while(static::$sendLock) - { + while (static::$sendLock) { //wait for server receipt sleep(1); } diff --git a/examples/contactsync.php b/examples/contactsync.php index 1f3851fe..de873eda 100755 --- a/examples/contactsync.php +++ b/examples/contactsync.php @@ -5,16 +5,13 @@ $username = $_GET["phone"]; $password = $_GET["pass"]; -$u = $_GET["u"]; -if(!is_array($u)) -{ +$u = $_GET["u"]; +if ( ! is_array($u)) { $u = array($u); } $numbers = array(); -foreach($u as $number) -{ - if(substr($number, 0, 1) != "+") - { +foreach ($u as $number) { + if (substr($number, 0, 1) != "+") { //add leading + $number = "+$number"; } @@ -27,12 +24,10 @@ */ function onSyncResult($result) { - foreach($result->existing as $number) - { + foreach ($result->existing as $number) { echo "$number exists
"; } - foreach($result->nonExisting as $number) - { + foreach ($result->nonExisting as $number) { echo "$number does not exist
"; } die();//to break out of the while(true) loop @@ -51,7 +46,6 @@ function onSyncResult($result) $wa->sendSync($numbers); //wait for response -while(true) -{ +while (true) { $wa->pollMessage(); } \ No newline at end of file diff --git a/examples/registerTool.php b/examples/registerTool.php index 7e6a5c83..dbb4b251 100644 --- a/examples/registerTool.php +++ b/examples/registerTool.php @@ -22,26 +22,20 @@ echo "\n\nType sms or voice: "; $option = fgets(STDIN); -try -{ - $w->codeRequest(trim($option)); -} -catch(Exception $e) -{ - echo "\nError: $e"; - exit(0); +try { + $w->codeRequest(trim($option)); +} catch (Exception $e) { + echo "\nError: $e"; + exit(0); } echo "\n\nEnter the received code: "; $code = fgets(STDIN); -try -{ - $result = $w->codeRegister(trim($code)); - echo "\nYour password is: ".$result->pw; -} -catch(Exception $e) -{ - echo "\Error: $e"; - exit(0); +try { + $result = $w->codeRegister(trim($code)); + echo "\nYour password is: " . $result->pw; +} catch (Exception $e) { + echo "\Error: $e"; + exit(0); } diff --git a/src/decode.php b/src/decode.php index 04c710e1..8df9fef0 100755 --- a/src/decode.php +++ b/src/decode.php @@ -2,7 +2,7 @@ function decode($hex) { $hexarr = str_split($hex, 2); - $str = null; + $str = null; foreach ($hexarr as $k => $v) { $str .= " " . getToken(hexdec($v)); } @@ -29,7 +29,7 @@ function hex2str($hexstr) function printhexstr($data, $name) { $data = str2hex($data); - $len = strlen($data); + $len = strlen($data); print("Len: $len - $name\n"); for ($i = 0; $i < $len; $i += 2) { if ((($i - 1) % 32) == 31) { diff --git a/src/events/WhatsAppEventListener.php b/src/events/WhatsAppEventListener.php index 7b6b58d8..43a63e3e 100755 --- a/src/events/WhatsAppEventListener.php +++ b/src/events/WhatsAppEventListener.php @@ -1,11 +1,12 @@ eventName = $eventName; - $this->callback = $callback; + $this->callback = $callback; } - - protected function handleEvent($eventName, array $arguments) + + protected function handleEvent($eventName, array $arguments) { - if( $this->eventName === $eventName ) { - call_user_func_array( $this->callback, $arguments ); + if ($this->eventName === $eventName) { + call_user_func_array($this->callback, $arguments); } } diff --git a/src/events/WhatsAppEventListenerProxy.php b/src/events/WhatsAppEventListenerProxy.php index 6d0be709..17ca1ba5 100755 --- a/src/events/WhatsAppEventListenerProxy.php +++ b/src/events/WhatsAppEventListenerProxy.php @@ -6,8 +6,9 @@ /** * Funnels all events through the abstract handleEvent method. -*/ -abstract class WhatsAppEventListenerProxy implements WhatsAppEventListener { + */ +abstract class WhatsAppEventListenerProxy implements WhatsAppEventListener +{ /** * This method will get all event calls. @@ -16,7 +17,7 @@ abstract class WhatsAppEventListenerProxy implements WhatsAppEventListener { * @param array $arguments * @return */ - abstract protected function handleEvent($eventName, array $arguments ); + abstract protected function handleEvent($eventName, array $arguments); function onClose( $phone, @@ -66,7 +67,7 @@ function onCodeRequestFailed( $this->handleEvent(__FUNCTION__, func_get_args()); } - function onCodeRequestFailedTooRecent( + function onCodeRequestFailedTooRecent( $phone, $method, $reason, @@ -75,7 +76,7 @@ function onCodeRequestFailedTooRecent( $this->handleEvent(__FUNCTION__, func_get_args()); } - function onConnect( + function onConnect( $phone, $socket ) { @@ -248,15 +249,16 @@ function onGetGroupMessage( function onGetPrivacyBlockedList( $phone, $children - /* - $data, - $onGetProfilePicture, - $phone, - $from, - $type, - $thumbnail - */ - ) { + /* + $data, + $onGetProfilePicture, + $phone, + $from, + $type, + $thumbnail + */ + ) + { $this->handleEvent(__FUNCTION__, func_get_args()); } @@ -333,7 +335,7 @@ function onGroupsChatisCreated( $gId, $subject ) { - $this->handleEvent(__FUNCTION__, func_get_args()); + $this->handleEvent(__FUNCTION__, func_get_args()); } function onGroupsChatEnd( @@ -553,7 +555,7 @@ public function onMediaMessageSent( $filename, $filesize, $filehash, - $caption, + $caption, $icon ) { $this->handleEvent(__FUNCTION__, func_get_args()); diff --git a/src/exception.php b/src/exception.php index 0436c5b4..8678bbd7 100755 --- a/src/exception.php +++ b/src/exception.php @@ -1,21 +1,30 @@ message}' in {$this->file}({$this->line})\n" - . "{$this->getTraceAsString()}"; + . "{$this->getTraceAsString()}"; } } diff --git a/src/func.php b/src/func.php index 6fe399e6..dfcf2364 100755 --- a/src/func.php +++ b/src/func.php @@ -2,7 +2,7 @@ /** * Parse the Message Inbound For Emojis * - * @param string $txt + * @param string $txt * The received message, where to find the Emojis. * * @param boolean $span @@ -14,17 +14,19 @@ * * @return string */ -function ParseMessageInboundForEmojis($txt, $span = true) { - $Emojis = ArrayEmojis(); - foreach ($Emojis as $Emoji) { - $txt = str_replace( - array($Emoji['iOS2'], $Emoji['iOS5'], $Emoji['iOS7']), - (($span == true) ? '##'.$Emoji['Hex'].'##' : '##'.$Emoji['Hex'].'##'), - $txt - ); - } - return $txt; +function ParseMessageInboundForEmojis($txt, $span = true) +{ + $Emojis = ArrayEmojis(); + foreach ($Emojis as $Emoji) { + $txt = str_replace( + array($Emoji['iOS2'], $Emoji['iOS5'], $Emoji['iOS7']), + (($span == true) ? '##' . $Emoji['Hex'] . '##' : '##' . $Emoji['Hex'] . '##'), + $txt + ); + } + return $txt; } + /** * This function extracts the phone number. * @@ -34,14 +36,16 @@ function ParseMessageInboundForEmojis($txt, $span = true) { * @return string * Returns the number of phone cleanly. * -**/ -function ExtractNumber($from){ - return str_replace(array("@s.whatsapp.net","@g.us"), "", $from); + **/ +function ExtractNumber($from) +{ + return str_replace(array("@s.whatsapp.net", "@g.us"), "", $from); } + function wa_pbkdf2($algorithm, $password, $salt, $count, $key_length, $raw_output = false) { $algorithm = strtolower($algorithm); - if (!in_array($algorithm, hash_algos(), true)) { + if ( ! in_array($algorithm, hash_algos(), true)) { die('PBKDF2 ERROR: Invalid hash algorithm.'); } if ($count <= 0 || $key_length <= 0) { @@ -85,7 +89,7 @@ function preprocessProfilePicture($path) function createIcon($file) { - if ((extension_loaded('gd')) && (file_exists($file))){ + if ((extension_loaded('gd')) && (file_exists($file))) { return createIconGD($file); } else { return giftThumbnail(); @@ -98,13 +102,13 @@ function createIconGD($file, $size = 100, $raw = false) if ($width > $height) { //landscape $nheight = ($height / $width) * $size; - $nwidth = $size; + $nwidth = $size; } else { - $nwidth = ($width / $height) * $size; + $nwidth = ($width / $height) * $size; $nheight = $size; } $image_p = imagecreatetruecolor($nwidth, $nheight); - $image = imagecreatefromjpeg($file); + $image = imagecreatefromjpeg($file); imagecopyresampled($image_p, $image, 0, 0, 0, 0, $nwidth, $nheight, $width, $height); ob_start(); imagejpeg($image_p); @@ -126,7 +130,7 @@ function createVideoIcon($file) /* should install ffmpeg for the method to work successfully */ if (checkFFMPEG()) { //generate thumbnail - $preview = sys_get_temp_dir().'/'.md5($file).'.jpg'; + $preview = sys_get_temp_dir() . '/' . md5($file) . '.jpg'; @unlink($preview); //capture video preview @@ -144,12 +148,13 @@ function createVideoIcon($file) function checkFFMPEG() { - //check if ffmpeg is intalled - $cmd = "ffmpeg -version"; - $res = exec($cmd, $output, $returnvalue); - if($returnvalue == 0) - return true; - return false; + //check if ffmpeg is intalled + $cmd = "ffmpeg -version"; + $res = exec($cmd, $output, $returnvalue); + if ($returnvalue == 0) { + return true; + } + return false; } function giftThumbnail() @@ -161,33 +166,29 @@ function videoThumbnail() { return '/9j/4QAYRXhpZgAASUkqAAgAAAAAAAAAAAAAAP/sABFEdWNreQABAAQAAABQAAD/4QMpaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wLwA8P3hwYWNrZXQgYmVnaW49Iu+7vyIgaWQ9Ilc1TTBNcENlaGlIenJlU3pOVGN6a2M5ZCI/PiA8eDp4bXBtZXRhIHhtbG5zOng9ImFkb2JlOm5zOm1ldGEvIiB4OnhtcHRrPSJBZG9iZSBYTVAgQ29yZSA1LjAtYzA2MCA2MS4xMzQ3NzcsIDIwMTAvMDIvMTItMTc6MzI6MDAgICAgICAgICI+IDxyZGY6UkRGIHhtbG5zOnJkZj0iaHR0cDovL3d3dy53My5vcmcvMTk5OS8wMi8yMi1yZGYtc3ludGF4LW5zIyI+IDxyZGY6RGVzY3JpcHRpb24gcmRmOmFib3V0PSIiIHhtbG5zOnhtcD0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wLyIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bXA6Q3JlYXRvclRvb2w9IkFkb2JlIFBob3Rvc2hvcCBDUzUgV2luZG93cyIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDo2MTQyRUVCOEI3MDgxMUUyQjNGQkY1OEU5M0U2MDE1MyIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDo2MTQyRUVCOUI3MDgxMUUyQjNGQkY1OEU5M0U2MDE1MyI+IDx4bXBNTTpEZXJpdmVkRnJvbSBzdFJlZjppbnN0YW5jZUlEPSJ4bXAuaWlkOjYxNDJFRUI2QjcwODExRTJCM0ZCRjU4RTkzRTYwMTUzIiBzdFJlZjpkb2N1bWVudElEPSJ4bXAuZGlkOjYxNDJFRUI3QjcwODExRTJCM0ZCRjU4RTkzRTYwMTUzIi8+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8+/+4ADkFkb2JlAGTAAAAAAf/bAIQAAgICAgICAgICAgMCAgIDBAMCAgMEBQQEBAQEBQYFBQUFBQUGBgcHCAcHBgkJCgoJCQwMDAwMDAwMDAwMDAwMDAEDAwMFBAUJBgYJDQsJCw0PDg4ODg8PDAwMDAwPDwwMDAwMDA8MDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwM/8AAEQgAZABkAwERAAIRAQMRAf/EALUAAAEEAwEBAQAAAAAAAAAAAAAGBwgJBAUKAwECAQEAAQUBAQAAAAAAAAAAAAAAAwECBAYHBQgQAAAFBAADBAUFDQkBAAAAAAECAwQFABEGByESCDFRIhNBYTIUCYEz07QVcZGhUmKCkqIjZWZ2OHKzJHSEJZUWNhcRAAIBAQMHCAgEBwEAAAAAAAABAgMRBAUhMdGScwYWQVGRseFSJAdhcaEiQrLSNcESE1PwgTJyI2M0F//aAAwDAQACEQMRAD8Av8oAoAoAoAoAoAoAoAoAoAoAoAoAoAoAoAoDHcPGjQomdOkWxShzGMqcpAAA9NzCHCgEe/2draKAxpPYONx4E4n95lWaVv01QoDBLtvXKxUDsspbSyTohTtV4wiz9NUpvZEijVNUpr+oaAZCa64umuEUXRPnLqScN1DJKt2ENKLmBQhuUxBN7qBQEBCw3GgHTf7gTaRDibb6+y5+ybslXwnK0aoiZJFIVjAQF3SYiblDgFqAhEx+KDrybyTHsbhNaThFckkmka0fzMnFx6CZ3ipUiHV8tdyYCgJuPC9APDvbZG/sS1lnubYkrBMZPDY5zJfYibhJ44VTbiAqcoHYn4JkAxh8Ijw7KAxOgHqKyfqK1FMTObyjWZy7GZ5aPkZVmVJNFw3WSI5anKmig2KSxTiQfBx5b3G9ATpoBP5ZKuYLFslm2ZElHkPFPHzVNfm8oyjdA6pAU5fFyiJQvbjagKXMj+IbmSbhw1hMhlpVqkPISTJFRkcCwhwMciShHByFEfZAxxNbt40A9nSx1JOd2LZxCZdO5QTI4b3eQimycr7sVePU/ZKmKDYEuKatuYA9BgoBout3Mdga5m8SnsYeShsNyVmZgsR1MSSoN5RpcxiiALAWyyRgMHrKNALPoj21D7HwvIseyLGYJ7m2GSBnKzpw3FZRzHPx5kVv2hhNdJQDJiN/xe+gIpddkJlWv9poZTDqlY4ns1sLxqmi2TBNvJNClSeNwMJRHxF5VShfsEe6gJndDu8pLYmm20JIySSeU6oXJCv1OVFJRSPOAqR7oR5QvcvMmI/jF9dAVz9Yelswg93zymDNJjJsWz9McgjEIQyz4GbhwYSvWhyNRP5YlWATkAQDwm4dlAWrdLWV7AyjS2HG2PjWTQ2bY0QYOXbSsRKCo/TZABWz0pfdzc5VkeUDflANAVi7o+Hdvd3t3OSaj1s7kNfyz77WxiROu0jwalff4g7YAdrInAWyphAvh7LekKAuT1hi24VNc4c32fg5i5w2iUY7MkE3sc4bO1UieQdUDlciBgXTABOAh2iIcaAxujTpaddMEZtSOPKouonOcpPLYxDpAJlI2NIUwIN11fZOoHOIDyXKBSl4iIjYCaVAJ/LW6jvFcmaIoi5VdRL1JJuWwioY6BygUL8OIjbjQHNDvpzgLrNwVxpvjaavlOCz44CVVvBmODo/uQpJugMAOAa8oORSAExU4l9NALHo/SScdQOF/wDX2kuko2RfLZA597S8r7MBAQcFUICPEDmEgBx9q1AT363ZbA4zQj1DIIl9MO5ObjkcbYqO00hF4mcVTrAYiQGAE0SnvbtvagIh9CCMPNbinZGGxd7AxUFjDks/IN5AwmU98VIm2bjzJiA3OUTcezlvQD+9cWdYtrHFMCbQ7B87yzIZpd21I+dIuwRYtERKuqBHCKpScx1CFASlAaAxOhrYGU7RPsKeyf7RJjGNFYxkGZsug1N9pK86y3lmbt0hHlR5QG4j20BreuHqayjUeT4FhuucyyuHlV4tzL5QmjLAYARXUKmyKYFEj2MPlnMFrcKAdfoo2LsbZ2scgzrZGW5fKISOQKMsSVPMGTN7sySKRyYPKTTKJRWMIAIgPZQETes/q22DgG7HuC6y2TmcLH4zDsksiQSl01SBJuAM4UDmWRUMAkSOmBgva/ooCc3SXkme5fojDMt2ZluZS+S5eo7k2LlSYMkqMcusJWRTFSTTLxIXmCxb2MF6AVXSXuyT2hvDqsxhtk8pPYHryWhWGJtZRYjszZcEnLeQMg55QUMmou3EQKcTWELltegJ+0B+FEyKpnSULzJqFEpyj6QELCFAcpmzcWLj21NhYtDFI3gYDIpaPiET3OqRu0dKJpFOe4cwgUoAI241tW5+B0MYvkqFdyUVBy92xO1NLlTyZTwN48Xnhd2jVgk25KOX1N/gLHTW0Mv0hKzs3isXByknPs02C7mXRWVFBBNTzRKj5Sqduc1uYRv2BXRX5a4Z+5V6Y/SaZHf28csI9D0mXunbuwd8BjieXkiYxpjHvBmDGIRVSSOq55QOqqCqqgiYClAoWtYKs/8AN8N/cq9MfpL+O7xyQj0PSZ+lty51omMnozD4bHX45I7SdycjLILquB8hMU0kiiksmAELcRtbtEatflxhv7lXpj9Jct+rx3I9D0iX3FlWZ75ydjlOZqsmTqMjiRkdHRaZ02qKJTmUMYpVTqG5lDmuYb+gKjfl3hq+Or0x+kuW/F47kPbpHa07u3YmlsLQwXD4bGl4sj1zIuH0g2cKO3Dl0ICc6p01yFHlApSlsHAAqN+X2HL46vTH6S5b7XjuQ9ukZzaMLO7lzqc2Fl0mCM7PAgRVuwTAjVuk2SBFJFAignMBSlC/ER4iI1G9wcOXx1elaCq30vHch7dJJvXG/dl6wwrFcBxeExT7AxBoVnHe9M3B1lQA4qHVXMVwUDHUOYTGEACrHuHh/fqdK0F63zvHch7dJEjLtPq5/k+T5dkeQPHE3mEi5k5pZMCFKZZ0fmOUlwEQKUPCUL8AAKs4Fw/v1OlaCvGVfuR9ukmybqd3BiuHCyg4bEI5li8IRjBpkZOQBuk1QBBAS3c25iAACH5VY1+3LuNC7VKsZVPzRg5LKrLUrcuTMTXTe6tWr06bhGyUkuXlfrHm+D7jccjqHaOaqpnWyrI8yOxmpVQ5jCsiybpuEgEo8AHzXixjD6eb1BXL07Ub+85bzVSgUBy9boNy7v2uP8Xz311auheWn3Kpsn8yNK39VtwhtF1MQAKca7W2cnUT1BSo2yVRMlI17CI2KHC49ny1FJkiiKBsTsrHlIlUTfN06x5SJFE3aCXZwqGUi9I3DdsJrcKjbK22G5TbJpJmVVMVNMgXOc3AAqiI2xu84fKPoKVTQAyTFJHmsPAVBAweI3q7gqDE4fluNfn/AE59Rl4XLxtHaR6yxj4RX9Pmcfz8++pM6+e45kdxlnZaxVxQKA5dN3m5d27WH+MZ764tXQfLX7lU2T+ZGm79K24w2i6mNuCldpbOVqJ7EPcQCopMlUR9tIIIOMgmEHCCblBSKEFEVSFOQweaXtKYBCvGxebVOLTsy/gZ9yinJ28w9EnqjGJLmVYFVgnJuIC28SN/WibgH5ohXlQxKrDP7y9OkzJ3OEs2QQkhrDJ4q526BJpsXj5zP27B3pG8QfJesuGIU558j9Okxp3WcfSadszOU4pqkMmoUbGSOUSmAfWUbCFZDdpjt2G4FRuyKHmjzqdpUC+0P3e75aKLZE5GrcC5fmAVfCkXimgX2Q9Y94+upoxUSNyE9lbLy8Wnj29loYf1i1h4q/A19nPqZl4VLxtDaR6ywf4RP9Pmcfz8++pM6+eY5kd2lnZaxVxQKA5b96m5d1bVH+Mp364tW/8Alv8AcqmyfzI0/fdW3GG0XUxrQU9ddnbOYqJmtjcxr1FJkiiSG0V/6WV9cWP96WvFxd/416zOuUfefqJYtyXtWutnpG2TOikUTmOFicREPR90ewKtsbLWxD5PleErFO2fkRmXIBy+W0KB1Sj/AJgtgL9+s+7XWussfdXp0GFXr0fiyv8AjlGUO1ZqulVGDZVq1ON0kFlfOUL/AGj2C/3q9yP5kvedr6DyJyTeTIjZosOAcPRVbSFyNJm7Ly8Myc9rcrA4/rFrBxR+Cr7Ofysy8KfjaG0j1k2/hE/0+Zx/Pz76kyr58jmR3yWdlrFXFAoDlp34Ntz7UH+M5364vW/+XH3Kpsn8yNS30/4obRdTGhFyQnaYa7KzmkUZjV+QtgAhjD8gVFJEqiPnp/J46DmpV/MOk41mMaKaahwMcx1BUKIEKUoCIjYOyvLxGhKrBKKtdpkXecYSbb5B2pHcwKCKWPxh1Q7CvX48pfulRIN/0hrDpYTyzf8AJaRUvy+FdIkHU/Pz5ry0ms4SEfC1IPlol9QJksH3716FO706X9K0nn1a8p52bNg1AAAAKAB6ACr2YzkKto1CxfDUbI2xRt2YCHs1Y2WNie2E0AmBZce1uWNUG/5xawsTfg6+zn8rM3Cn46htI9ZLL4RP9Pecfz6++pMq+f45kd/lnZaxVxQKA5Y+oI/LuTahr8BzSd4/6xet+8ufuM9k+tGqb4q25x/vXUxjTKCYbBXZWznKjYbmORuICPbVrRbKQuY9H2eAVY0Y8pC4YI+yNqjaIZSFqxR7OFWNETkLJikHDhUTI3IVzJELF7KjZY2KlogA24VEylpoNmNuXXOaGt2RSo/hLWDiL8JX2c/lZm4U/G0NpDrRIj4RSyJen7OEhUKCn/fnvgvx8TFmIcPkGuBRzI+g5Z2Wu1cWn4Nfhb0CFwoDnh3j0ub5ktr7HeMtWT8zGSOSychGycc3Mugqi6drLJKJqkAwCBk1AuFrgPAbCFejheK3jDK3613aUrLMqtTT5LDEvtxpXyn+nVVqtt5sozanSv1AIcf/AIrmNg9P2esIfgSrYuPsV70NRaTyHurcXyS1uw8y9OXUMh83pjLwt+7V/oacfYr3oai0kb3Rw98ktbsPcmiepdH5rTWXcO+NW+hpx9ivehqLSWvc7DnyT1noMkun+qlH5rTWWcP3Wr9DVOPcU56eotJbwZhvNPWegyC6z6ukfmtN5X8sUp9DVOPMU56ep2lvBWG809d6D2Lg/WWl81pnKf8AiT/Q1TjrE+enqdpTgjDOaeu9B7FxrraS+b0zlFg7P9oN9DVOOcS/16naU4Hwzmnr9hkkiOuwogCOlsnMPoD7HH6Gqcb4l/r1O0pwPhnNPX7DEnsM698mhn0G70llAMpFPy3HLGeWIlvew2IQRD1XrHvO92IXilKlJwSkrHZGx2PPltdlpPddz8Ou1WNWMZOUXarZNq1ZnZZyE0/h6aF6idVsX5c3xh1iOPykoZ8ES/EpHJjAkRIyp0wMPLzCXgA8eF61k2guO5T+Ty38XLb5aA9qALUB8sHdQBYO4KALB3BQBYO4KALB3BQBYO4KALB3BQBYO6gCwd1AfaAKAKAKAKAKAKAKAKAKAKAKAKAKAKA//9k='; } - -//Generate Array of Emojis iOS2, iOS5 and iOS7 -function ArrayEmojis(){ - return array(array('iOS2' => '','iOS5' => '๐Ÿ˜„','iOS7' => '','Hex' => '1F604'), array('iOS2' => '','iOS5' => '๐Ÿ˜ƒ','iOS7' => '','Hex' => '1F603'), array('iOS2' => '','iOS5' => '๐Ÿ˜€','iOS7' => '','Hex' => '1F600'), array('iOS2' => '','iOS5' => '๐Ÿ˜Š','iOS7' => '','Hex' => '1F60A'), array('iOS2' => '','iOS5' => 'โ˜บ','iOS7' => 'โ˜บ๏ธ','Hex' => '263A'), array('iOS2' => '','iOS5' => '๐Ÿ˜‰','iOS7' => '','Hex' => '1F609'), array('iOS2' => '','iOS5' => '๐Ÿ˜','iOS7' => '','Hex' => '1F60D'), array('iOS2' => '','iOS5' => '๐Ÿ˜˜','iOS7' => '','Hex' => '1F618'), array('iOS2' => '','iOS5' => '๐Ÿ˜š','iOS7' => '','Hex' => '1F61A'), array('iOS2' => '','iOS5' => '๐Ÿ˜—','iOS7' => '','Hex' => '1F617'), array('iOS2' => '','iOS5' => '๐Ÿ˜™','iOS7' => '','Hex' => '1F619'), array('iOS2' => '','iOS5' => '๐Ÿ˜œ','iOS7' => '','Hex' => '1F61C'), array('iOS2' => '','iOS5' => '๐Ÿ˜','iOS7' => '','Hex' => '1F61D'), array('iOS2' => '','iOS5' => '๐Ÿ˜›','iOS7' => '','Hex' => '1F61B'), array('iOS2' => '','iOS5' => '๐Ÿ˜ณ','iOS7' => '','Hex' => '1F633'), array('iOS2' => '','iOS5' => '๐Ÿ˜','iOS7' => '','Hex' => '1F601'), array('iOS2' => '','iOS5' => '๐Ÿ˜”','iOS7' => '','Hex' => '1F614'), array('iOS2' => '','iOS5' => '๐Ÿ˜Œ','iOS7' => '','Hex' => '1F60C'), array('iOS2' => '','iOS5' => '๐Ÿ˜’','iOS7' => '','Hex' => '1F612'), array('iOS2' => '','iOS5' => '๐Ÿ˜ž','iOS7' => '','Hex' => '1F61E'), array('iOS2' => '','iOS5' => '๐Ÿ˜ฃ','iOS7' => '','Hex' => '1F623'), array('iOS2' => '','iOS5' => '๐Ÿ˜ข','iOS7' => '','Hex' => '1F622'), array('iOS2' => '','iOS5' => '๐Ÿ˜‚','iOS7' => '','Hex' => '1F602'), array('iOS2' => '','iOS5' => '๐Ÿ˜ญ','iOS7' => '','Hex' => '1F62D'), array('iOS2' => '','iOS5' => '๐Ÿ˜ช','iOS7' => '','Hex' => '1F62A'), array('iOS2' => '','iOS5' => '๐Ÿ˜ฅ','iOS7' => '','Hex' => '1F625'), array('iOS2' => '','iOS5' => '๐Ÿ˜ฐ','iOS7' => '','Hex' => '1F630'), array('iOS2' => '','iOS5' => '๐Ÿ˜…','iOS7' => '','Hex' => '1F605'), array('iOS2' => '','iOS5' => '๐Ÿ˜“','iOS7' => '','Hex' => '1F613'), array('iOS2' => '','iOS5' => '๐Ÿ˜ฉ','iOS7' => '','Hex' => '1F629'), array('iOS2' => '','iOS5' => '๐Ÿ˜ซ','iOS7' => '','Hex' => '1F62B'), array('iOS2' => '','iOS5' => '๐Ÿ˜จ','iOS7' => '','Hex' => '1F628'), array('iOS2' => '','iOS5' => '๐Ÿ˜ฑ','iOS7' => '','Hex' => '1F631'), array('iOS2' => '','iOS5' => '๐Ÿ˜ ','iOS7' => '','Hex' => '1F620'), array('iOS2' => '','iOS5' => '๐Ÿ˜ก','iOS7' => '','Hex' => '1F621'), array('iOS2' => '','iOS5' => '๐Ÿ˜ค','iOS7' => '','Hex' => '1F624'), array('iOS2' => '','iOS5' => '๐Ÿ˜–','iOS7' => '','Hex' => '1F616'), array('iOS2' => '','iOS5' => '๐Ÿ˜†','iOS7' => '','Hex' => '1F606'), array('iOS2' => '','iOS5' => '๐Ÿ˜‹','iOS7' => '','Hex' => '1F60B'), array('iOS2' => '','iOS5' => '๐Ÿ˜ท','iOS7' => '','Hex' => '1F637'), array('iOS2' => '','iOS5' => '๐Ÿ˜Ž','iOS7' => '','Hex' => '1F60E'), array('iOS2' => '','iOS5' => '๐Ÿ˜ด','iOS7' => '','Hex' => '1F634'), array('iOS2' => '','iOS5' => '๐Ÿ˜ต','iOS7' => '','Hex' => '1F635'), array('iOS2' => '','iOS5' => '๐Ÿ˜ฒ','iOS7' => '','Hex' => '1F632'), array('iOS2' => '','iOS5' => '๐Ÿ˜Ÿ','iOS7' => '','Hex' => '1F61F'), array('iOS2' => '','iOS5' => '๐Ÿ˜ฆ','iOS7' => '','Hex' => '1F626'), array('iOS2' => '','iOS5' => '๐Ÿ˜ง','iOS7' => '','Hex' => '1F627'), array('iOS2' => '','iOS5' => '๐Ÿ˜ˆ','iOS7' => '','Hex' => '1F608'), array('iOS2' => '','iOS5' => '๐Ÿ‘ฟ','iOS7' => '','Hex' => '1F47F'), array('iOS2' => '','iOS5' => '๐Ÿ˜ฎ','iOS7' => '','Hex' => '1F62E'), array('iOS2' => '','iOS5' => '๐Ÿ˜ฌ','iOS7' => '','Hex' => '1F62C'), array('iOS2' => '','iOS5' => '๐Ÿ˜','iOS7' => '','Hex' => '1F610'), array('iOS2' => '','iOS5' => '๐Ÿ˜•','iOS7' => '','Hex' => '1F615'), array('iOS2' => '','iOS5' => '๐Ÿ˜ฏ','iOS7' => '','Hex' => '1F62F'), array('iOS2' => '','iOS5' => '๐Ÿ˜ถ','iOS7' => '','Hex' => '1F636'), array('iOS2' => '','iOS5' => '๐Ÿ˜‡','iOS7' => '','Hex' => '1F607'), array('iOS2' => '','iOS5' => '๐Ÿ˜','iOS7' => '','Hex' => '1F60F'), array('iOS2' => '','iOS5' => '๐Ÿ˜‘','iOS7' => '','Hex' => '1F611'), array('iOS2' => '','iOS5' => '๐Ÿ‘ฒ','iOS7' => '','Hex' => '1F472'), array('iOS2' => '','iOS5' => '๐Ÿ‘ณ','iOS7' => '','Hex' => '1F473'), array('iOS2' => '','iOS5' => '๐Ÿ‘ฎ','iOS7' => '','Hex' => '1F46E'), array('iOS2' => '','iOS5' => '๐Ÿ‘ท','iOS7' => '','Hex' => '1F477'), array('iOS2' => '','iOS5' => '๐Ÿ’‚','iOS7' => '','Hex' => '1F482'), array('iOS2' => '','iOS5' => '๐Ÿ‘ถ','iOS7' => '','Hex' => '1F476'), array('iOS2' => '','iOS5' => '๐Ÿ‘ฆ','iOS7' => '','Hex' => '1F466'), array('iOS2' => '','iOS5' => '๐Ÿ‘ง','iOS7' => '','Hex' => '1F467'), array('iOS2' => '','iOS5' => '๐Ÿ‘จ','iOS7' => '','Hex' => '1F468'), array('iOS2' => '','iOS5' => '๐Ÿ‘ฉ','iOS7' => '','Hex' => '1F469'), array('iOS2' => '','iOS5' => '๐Ÿ‘ด','iOS7' => '','Hex' => '1F474'), array('iOS2' => '','iOS5' => '๐Ÿ‘ต','iOS7' => '','Hex' => '1F475'), array('iOS2' => '','iOS5' => '๐Ÿ‘ฑ','iOS7' => '','Hex' => '1F471'), array('iOS2' => '','iOS5' => '๐Ÿ‘ผ','iOS7' => '','Hex' => '1F47C'), array('iOS2' => '','iOS5' => '๐Ÿ‘ธ','iOS7' => '','Hex' => '1F478'), array('iOS2' => '','iOS5' => '๐Ÿ˜บ','iOS7' => '','Hex' => '1F63A'), array('iOS2' => '','iOS5' => '๐Ÿ˜ธ','iOS7' => '','Hex' => '1F638'), array('iOS2' => '','iOS5' => '๐Ÿ˜ป','iOS7' => '','Hex' => '1F63B'), array('iOS2' => '','iOS5' => '๐Ÿ˜ฝ','iOS7' => '','Hex' => '1F63D'), array('iOS2' => '','iOS5' => '๐Ÿ˜ผ','iOS7' => '','Hex' => '1F63C'), array('iOS2' => '','iOS5' => '๐Ÿ™€','iOS7' => '','Hex' => '1F640'), array('iOS2' => '','iOS5' => '๐Ÿ˜ฟ','iOS7' => '','Hex' => '1F63F'), array('iOS2' => '','iOS5' => '๐Ÿ˜น','iOS7' => '','Hex' => '1F639'), array('iOS2' => '','iOS5' => '๐Ÿ˜พ','iOS7' => '','Hex' => '1F63E'), array('iOS2' => '','iOS5' => '๐Ÿ‘น','iOS7' => '','Hex' => '1F479'), array('iOS2' => '','iOS5' => '๐Ÿ‘บ','iOS7' => '','Hex' => '1F47A'), array('iOS2' => '','iOS5' => '๐Ÿ™ˆ','iOS7' => '','Hex' => '1F648'), array('iOS2' => '','iOS5' => '๐Ÿ™‰','iOS7' => '','Hex' => '1F649'), array('iOS2' => '','iOS5' => '๐Ÿ™Š','iOS7' => '','Hex' => '1F64A'), array('iOS2' => '','iOS5' => '๐Ÿ’€','iOS7' => '','Hex' => '1F480'), array('iOS2' => '','iOS5' => '๐Ÿ‘ฝ','iOS7' => '','Hex' => '1F47D'), array('iOS2' => '','iOS5' => '๐Ÿ’ฉ','iOS7' => '','Hex' => '1F4A9'), array('iOS2' => '','iOS5' => '๐Ÿ”ฅ','iOS7' => '','Hex' => '1F525'), array('iOS2' => '','iOS5' => 'โœจ','iOS7' => '','Hex' => '2728'), array('iOS2' => '','iOS5' => '๐ŸŒŸ','iOS7' => '','Hex' => '1F31F'), array('iOS2' => '','iOS5' => '๐Ÿ’ซ','iOS7' => '','Hex' => '1F4AB'), array('iOS2' => '','iOS5' => '๐Ÿ’ฅ','iOS7' => '','Hex' => '1F4A5'), array('iOS2' => '','iOS5' => '๐Ÿ’ข','iOS7' => '','Hex' => '1F4A2'), array('iOS2' => '','iOS5' => '๐Ÿ’ฆ','iOS7' => '','Hex' => '1F4A6'), array('iOS2' => '','iOS5' => '๐Ÿ’ง','iOS7' => '','Hex' => '1F4A7'), array('iOS2' => '','iOS5' => '๐Ÿ’ค','iOS7' => '','Hex' => '1F4A4'), array('iOS2' => '','iOS5' => '๐Ÿ’จ','iOS7' => '','Hex' => '1F4A8'), array('iOS2' => '','iOS5' => '๐Ÿ‘‚','iOS7' => '','Hex' => '1F442'), array('iOS2' => '','iOS5' => '๐Ÿ‘€','iOS7' => '','Hex' => '1F440'), array('iOS2' => '','iOS5' => '๐Ÿ‘ƒ','iOS7' => '','Hex' => '1F443'), array('iOS2' => '','iOS5' => '๐Ÿ‘…','iOS7' => '','Hex' => '1F445'), array('iOS2' => '','iOS5' => '๐Ÿ‘„','iOS7' => '','Hex' => '1F444'), array('iOS2' => '','iOS5' => '๐Ÿ‘','iOS7' => '','Hex' => '1F44D'), array('iOS2' => '','iOS5' => '๐Ÿ‘Ž','iOS7' => '','Hex' => '1F44E'), array('iOS2' => '','iOS5' => '๐Ÿ‘Œ','iOS7' => '','Hex' => '1F44C'), array('iOS2' => '','iOS5' => '๐Ÿ‘Š','iOS7' => '','Hex' => '1F44A'), array('iOS2' => '','iOS5' => 'โœŠ','iOS7' => '','Hex' => '270A'), array('iOS2' => '','iOS5' => 'โœŒ','iOS7' => 'โœŒ๏ธ','Hex' => '270C'), array('iOS2' => '','iOS5' => '๐Ÿ‘‹','iOS7' => '','Hex' => '1F44B'), array('iOS2' => '','iOS5' => 'โœ‹','iOS7' => '','Hex' => '270B'), array('iOS2' => '','iOS5' => '๐Ÿ‘','iOS7' => '','Hex' => '1F450'), array('iOS2' => '','iOS5' => '๐Ÿ‘†','iOS7' => '','Hex' => '1F446'), array('iOS2' => '','iOS5' => '๐Ÿ‘‡','iOS7' => '','Hex' => '1F447'), array('iOS2' => '','iOS5' => '๐Ÿ‘‰','iOS7' => '','Hex' => '1F449'), array('iOS2' => '','iOS5' => '๐Ÿ‘ˆ','iOS7' => '','Hex' => '1F448'), array('iOS2' => '','iOS5' => '๐Ÿ™Œ','iOS7' => '','Hex' => '1F64C'), array('iOS2' => '','iOS5' => '๐Ÿ™','iOS7' => '','Hex' => '1F64F'), array('iOS2' => '','iOS5' => 'โ˜','iOS7' => 'โ˜๏ธ','Hex' => '261D'), array('iOS2' => '','iOS5' => '๐Ÿ‘','iOS7' => '','Hex' => '1F44F'), array('iOS2' => '','iOS5' => '๐Ÿ’ช','iOS7' => '','Hex' => '1F4AA'), array('iOS2' => '','iOS5' => '๐Ÿšถ','iOS7' => '','Hex' => '1F6B6'), array('iOS2' => '','iOS5' => '๐Ÿƒ','iOS7' => '','Hex' => '1F3C3'), array('iOS2' => '','iOS5' => '๐Ÿ’ƒ','iOS7' => '','Hex' => '1F483'), array('iOS2' => '','iOS5' => '๐Ÿ‘ซ','iOS7' => '','Hex' => '1F46B'), array('iOS2' => '','iOS5' => '๐Ÿ‘ช','iOS7' => '','Hex' => '1F46A'), array('iOS2' => '','iOS5' => '๐Ÿ‘ฌ','iOS7' => '','Hex' => '1F46C'), array('iOS2' => '','iOS5' => '๐Ÿ‘ญ','iOS7' => '','Hex' => '1F46D'), array('iOS2' => '','iOS5' => '๐Ÿ’','iOS7' => '','Hex' => '1F48F'), array('iOS2' => '','iOS5' => '๐Ÿ’‘','iOS7' => '','Hex' => '1F491'), array('iOS2' => '','iOS5' => '๐Ÿ‘ฏ','iOS7' => '','Hex' => '1F46F'), array('iOS2' => '','iOS5' => '๐Ÿ™†','iOS7' => '','Hex' => '1F646'), array('iOS2' => '','iOS5' => '๐Ÿ™…','iOS7' => '','Hex' => '1F645'), array('iOS2' => '','iOS5' => '๐Ÿ’','iOS7' => '','Hex' => '1F481'), array('iOS2' => '','iOS5' => '๐Ÿ™‹','iOS7' => '','Hex' => '1F64B'), array('iOS2' => '','iOS5' => '๐Ÿ’†','iOS7' => '','Hex' => '1F486'), array('iOS2' => '','iOS5' => '๐Ÿ’‡','iOS7' => '','Hex' => '1F487'), array('iOS2' => '','iOS5' => '๐Ÿ’…','iOS7' => '','Hex' => '1F485'), array('iOS2' => '','iOS5' => '๐Ÿ‘ฐ','iOS7' => '','Hex' => '1F470'), array('iOS2' => '','iOS5' => '๐Ÿ™Ž','iOS7' => '','Hex' => '1F64E'), array('iOS2' => '','iOS5' => '๐Ÿ™','iOS7' => '','Hex' => '1F64D'), array('iOS2' => '','iOS5' => '๐Ÿ™‡','iOS7' => '','Hex' => '1F647'), array('iOS2' => '','iOS5' => '๐ŸŽฉ','iOS7' => '','Hex' => '1F3A9'), array('iOS2' => '','iOS5' => '๐Ÿ‘‘','iOS7' => '','Hex' => '1F451'), array('iOS2' => '','iOS5' => '๐Ÿ‘’','iOS7' => '','Hex' => '1F452'), array('iOS2' => '','iOS5' => '๐Ÿ‘Ÿ','iOS7' => '','Hex' => '1F45F'), array('iOS2' => '','iOS5' => '๐Ÿ‘ž','iOS7' => '','Hex' => '1F45E'), array('iOS2' => '','iOS5' => '๐Ÿ‘ก','iOS7' => '','Hex' => '1F461'), array('iOS2' => '','iOS5' => '๐Ÿ‘ ','iOS7' => '','Hex' => '1F460'), array('iOS2' => '','iOS5' => '๐Ÿ‘ข','iOS7' => '','Hex' => '1F462'), array('iOS2' => '','iOS5' => '๐Ÿ‘•','iOS7' => '','Hex' => '1F455'), array('iOS2' => '','iOS5' => '๐Ÿ‘”','iOS7' => '','Hex' => '1F454'), array('iOS2' => '','iOS5' => '๐Ÿ‘š','iOS7' => '','Hex' => '1F45A'), array('iOS2' => '','iOS5' => '๐Ÿ‘—','iOS7' => '','Hex' => '1F457'), array('iOS2' => '','iOS5' => '๐ŸŽฝ','iOS7' => '','Hex' => '1F3BD'), array('iOS2' => '','iOS5' => '๐Ÿ‘–','iOS7' => '','Hex' => '1F456'), array('iOS2' => '','iOS5' => '๐Ÿ‘˜','iOS7' => '','Hex' => '1F458'), array('iOS2' => '','iOS5' => '๐Ÿ‘™','iOS7' => '','Hex' => '1F459'), array('iOS2' => '','iOS5' => '๐Ÿ’ผ','iOS7' => '','Hex' => '1F4BC'), array('iOS2' => '','iOS5' => '๐Ÿ‘œ','iOS7' => '','Hex' => '1F45C'), array('iOS2' => '','iOS5' => '๐Ÿ‘','iOS7' => '','Hex' => '1F45D'), array('iOS2' => '','iOS5' => '๐Ÿ‘›','iOS7' => '','Hex' => '1F45B'), array('iOS2' => '','iOS5' => '๐Ÿ‘“','iOS7' => '','Hex' => '1F453'), array('iOS2' => '','iOS5' => '๐ŸŽ€','iOS7' => '','Hex' => '1F380'), array('iOS2' => '','iOS5' => '๐ŸŒ‚','iOS7' => '','Hex' => '1F302'), array('iOS2' => '','iOS5' => '๐Ÿ’„','iOS7' => '','Hex' => '1F484'), array('iOS2' => '','iOS5' => '๐Ÿ’›','iOS7' => '','Hex' => '1F49B'), array('iOS2' => '','iOS5' => '๐Ÿ’™','iOS7' => '','Hex' => '1F499'), array('iOS2' => '','iOS5' => '๐Ÿ’œ','iOS7' => '','Hex' => '1F49C'), array('iOS2' => '','iOS5' => '๐Ÿ’š','iOS7' => '','Hex' => '1F49A'), array('iOS2' => '','iOS5' => 'โค','iOS7' => 'โค๏ธ','Hex' => '2764'), array('iOS2' => '','iOS5' => '๐Ÿ’”','iOS7' => '','Hex' => '1F494'), array('iOS2' => '','iOS5' => '๐Ÿ’—','iOS7' => '','Hex' => '1F497'), array('iOS2' => '','iOS5' => '๐Ÿ’“','iOS7' => '','Hex' => '1F493'), array('iOS2' => '','iOS5' => '๐Ÿ’•','iOS7' => '','Hex' => '1F495'), array('iOS2' => '','iOS5' => '๐Ÿ’–','iOS7' => '','Hex' => '1F496'), array('iOS2' => '','iOS5' => '๐Ÿ’ž','iOS7' => '','Hex' => '1F49E'), array('iOS2' => '','iOS5' => '๐Ÿ’˜','iOS7' => '','Hex' => '1F498'), array('iOS2' => '','iOS5' => '๐Ÿ’Œ','iOS7' => '','Hex' => '1F48C'), array('iOS2' => '','iOS5' => '๐Ÿ’‹','iOS7' => '','Hex' => '1F48B'), array('iOS2' => '','iOS5' => '๐Ÿ’','iOS7' => '','Hex' => '1F48D'), array('iOS2' => '','iOS5' => '๐Ÿ’Ž','iOS7' => '','Hex' => '1F48E'), array('iOS2' => '','iOS5' => '๐Ÿ‘ค','iOS7' => '','Hex' => '1F464'), array('iOS2' => '','iOS5' => '๐Ÿ‘ฅ','iOS7' => '','Hex' => '1F465'), array('iOS2' => '','iOS5' => '๐Ÿ’ฌ','iOS7' => '','Hex' => '1F4AC'), array('iOS2' => '','iOS5' => '๐Ÿ‘ฃ','iOS7' => '','Hex' => '1F463'), array('iOS2' => '','iOS5' => '๐Ÿ’ญ','iOS7' => '','Hex' => '1F4AD'), array('iOS2' => '','iOS5' => '๐Ÿ ','iOS7' => '','Hex' => '1F3E0'), array('iOS2' => '','iOS5' => '๐Ÿก','iOS7' => '','Hex' => '1F3E1'), array('iOS2' => '','iOS5' => '๐Ÿซ','iOS7' => '','Hex' => '1F3EB'), array('iOS2' => '','iOS5' => '๐Ÿข','iOS7' => '','Hex' => '1F3E2'), array('iOS2' => '','iOS5' => '๐Ÿฃ','iOS7' => '','Hex' => '1F3E3'), array('iOS2' => '','iOS5' => '๐Ÿฅ','iOS7' => '','Hex' => '1F3E5'), array('iOS2' => '','iOS5' => '๐Ÿฆ','iOS7' => '','Hex' => '1F3E6'), array('iOS2' => '','iOS5' => '๐Ÿช','iOS7' => '','Hex' => '1F3EA'), array('iOS2' => '','iOS5' => '๐Ÿฉ','iOS7' => '','Hex' => '1F3E9'), array('iOS2' => '','iOS5' => '๐Ÿจ','iOS7' => '','Hex' => '1F3E8'), array('iOS2' => '','iOS5' => '๐Ÿ’’','iOS7' => '','Hex' => '1F492'), array('iOS2' => '','iOS5' => 'โ›ช','iOS7' => 'โ›ช๏ธ','Hex' => '26EA'), array('iOS2' => '','iOS5' => '๐Ÿฌ','iOS7' => '','Hex' => '1F3EC'), array('iOS2' => '','iOS5' => '๐Ÿค','iOS7' => '','Hex' => '1F3E4'), array('iOS2' => '','iOS5' => '๐ŸŒ‡','iOS7' => '','Hex' => '1F307'), array('iOS2' => '','iOS5' => '๐ŸŒ†','iOS7' => '','Hex' => '1F306'), array('iOS2' => '','iOS5' => '๐Ÿฏ','iOS7' => '','Hex' => '1F3EF'), array('iOS2' => '','iOS5' => '๐Ÿฐ','iOS7' => '','Hex' => '1F3F0'), array('iOS2' => '','iOS5' => 'โ›บ','iOS7' => 'โ›บ๏ธ','Hex' => '26FA'), array('iOS2' => '','iOS5' => '๐Ÿญ','iOS7' => '','Hex' => '1F3ED'), array('iOS2' => '','iOS5' => '๐Ÿ—ผ','iOS7' => '','Hex' => '1F5FC'), array('iOS2' => '','iOS5' => '๐Ÿ—พ','iOS7' => '','Hex' => '1F5FE'), array('iOS2' => '','iOS5' => '๐Ÿ—ป','iOS7' => '','Hex' => '1F5FB'), array('iOS2' => '','iOS5' => '๐ŸŒ„','iOS7' => '','Hex' => '1F304'), array('iOS2' => '','iOS5' => '๐ŸŒ…','iOS7' => '','Hex' => '1F305'), array('iOS2' => '','iOS5' => '๐ŸŒƒ','iOS7' => '','Hex' => '1F303'), array('iOS2' => '','iOS5' => '๐Ÿ—ฝ','iOS7' => '','Hex' => '1F5FD'), array('iOS2' => '','iOS5' => '๐ŸŒ‰','iOS7' => '','Hex' => '1F309'), array('iOS2' => '','iOS5' => '๐ŸŽ ','iOS7' => '','Hex' => '1F3A0'), array('iOS2' => '','iOS5' => '๐ŸŽก','iOS7' => '','Hex' => '1F3A1'), array('iOS2' => '','iOS5' => 'โ›ฒ','iOS7' => 'โ›ฒ๏ธ','Hex' => '26F2'), array('iOS2' => '','iOS5' => '๐ŸŽข','iOS7' => '','Hex' => '1F3A2'), array('iOS2' => '','iOS5' => '๐Ÿšข','iOS7' => '','Hex' => '1F6A2'), array('iOS2' => '','iOS5' => 'โ›ต','iOS7' => 'โ›ต๏ธ','Hex' => '26F5'), array('iOS2' => '','iOS5' => '๐Ÿšค','iOS7' => '','Hex' => '1F6A4'), array('iOS2' => '','iOS5' => '๐Ÿšฃ','iOS7' => '','Hex' => '1F6A3'), array('iOS2' => '','iOS5' => 'โš“','iOS7' => 'โš“๏ธ','Hex' => '2693'), array('iOS2' => '','iOS5' => '๐Ÿš€','iOS7' => '','Hex' => '1F680'), array('iOS2' => '','iOS5' => 'โœˆ','iOS7' => 'โœˆ๏ธ','Hex' => '2708'), array('iOS2' => '','iOS5' => '๐Ÿ’บ','iOS7' => '','Hex' => '1F4BA'), array('iOS2' => '','iOS5' => '๐Ÿš','iOS7' => '','Hex' => '1F681'), array('iOS2' => '','iOS5' => '๐Ÿš‚','iOS7' => '','Hex' => '1F682'), array('iOS2' => '','iOS5' => '๐ŸšŠ','iOS7' => '','Hex' => '1F68A'), array('iOS2' => '','iOS5' => '๐Ÿš‰','iOS7' => '','Hex' => '1F689'), array('iOS2' => '','iOS5' => '๐Ÿšž','iOS7' => '','Hex' => '1F69E'), array('iOS2' => '','iOS5' => '๐Ÿš†','iOS7' => '','Hex' => '1F686'), array('iOS2' => '','iOS5' => '๐Ÿš„','iOS7' => '','Hex' => '1F684'), array('iOS2' => '','iOS5' => '๐Ÿš…','iOS7' => '','Hex' => '1F685'), array('iOS2' => '','iOS5' => '๐Ÿšˆ','iOS7' => '','Hex' => '1F688'), array('iOS2' => '','iOS5' => '๐Ÿš‡','iOS7' => '','Hex' => '1F687'), array('iOS2' => '','iOS5' => '๐Ÿš','iOS7' => '','Hex' => '1F69D'), array('iOS2' => '','iOS5' => '๐Ÿš‹','iOS7' => '','Hex' => '1F68B'), array('iOS2' => '','iOS5' => '๐Ÿšƒ','iOS7' => '','Hex' => '1F683'), array('iOS2' => '','iOS5' => '๐ŸšŽ','iOS7' => '','Hex' => '1F68E'), array('iOS2' => '','iOS5' => '๐ŸšŒ','iOS7' => '','Hex' => '1F68C'), array('iOS2' => '','iOS5' => '๐Ÿš','iOS7' => '','Hex' => '1F68D'), array('iOS2' => '','iOS5' => '๐Ÿš™','iOS7' => '','Hex' => '1F699'), array('iOS2' => '','iOS5' => '๐Ÿš˜','iOS7' => '','Hex' => '1F698'), array('iOS2' => '','iOS5' => '๐Ÿš—','iOS7' => '','Hex' => '1F697'), array('iOS2' => '','iOS5' => '๐Ÿš•','iOS7' => '','Hex' => '1F695'), array('iOS2' => '','iOS5' => '๐Ÿš–','iOS7' => '','Hex' => '1F696'), array('iOS2' => '','iOS5' => '๐Ÿš›','iOS7' => '','Hex' => '1F69B'), array('iOS2' => '','iOS5' => '๐Ÿšš','iOS7' => '','Hex' => '1F69A'), array('iOS2' => '','iOS5' => '๐Ÿšจ','iOS7' => '','Hex' => '1F6A8'), array('iOS2' => '','iOS5' => '๐Ÿš“','iOS7' => '','Hex' => '1F693'), array('iOS2' => '','iOS5' => '๐Ÿš”','iOS7' => '','Hex' => '1F694'), array('iOS2' => '','iOS5' => '๐Ÿš’','iOS7' => '','Hex' => '1F692'), array('iOS2' => '','iOS5' => '๐Ÿš‘','iOS7' => '','Hex' => '1F691'), array('iOS2' => '','iOS5' => '๐Ÿš','iOS7' => '','Hex' => '1F690'), array('iOS2' => '','iOS5' => '๐Ÿšฒ','iOS7' => '','Hex' => '1F6B2'), array('iOS2' => '','iOS5' => '๐Ÿšก','iOS7' => '','Hex' => '1F6A1'), array('iOS2' => '','iOS5' => '๐ŸšŸ','iOS7' => '','Hex' => '1F69F'), array('iOS2' => '','iOS5' => '๐Ÿš ','iOS7' => '','Hex' => '1F6A0'), array('iOS2' => '','iOS5' => '๐Ÿšœ','iOS7' => '','Hex' => '1F69C'), array('iOS2' => '','iOS5' => '๐Ÿ’ˆ','iOS7' => '','Hex' => '1F488'), array('iOS2' => '','iOS5' => '๐Ÿš','iOS7' => '','Hex' => '1F68F'), array('iOS2' => '','iOS5' => '๐ŸŽซ','iOS7' => '','Hex' => '1F3AB'), array('iOS2' => '','iOS5' => '๐Ÿšฆ','iOS7' => '','Hex' => '1F6A6'), array('iOS2' => '','iOS5' => '๐Ÿšฅ','iOS7' => '','Hex' => '1F6A5'), array('iOS2' => '','iOS5' => 'โš ','iOS7' => 'โš ๏ธ','Hex' => '26A0'), array('iOS2' => '','iOS5' => '๐Ÿšง','iOS7' => '','Hex' => '1F6A7'), array('iOS2' => '','iOS5' => '๐Ÿ”ฐ','iOS7' => '','Hex' => '1F530'), array('iOS2' => '','iOS5' => 'โ›ฝ','iOS7' => 'โ›ฝ๏ธ','Hex' => '26FD'), array('iOS2' => '','iOS5' => '๐Ÿฎ','iOS7' => '','Hex' => '1F3EE'), array('iOS2' => '','iOS5' => '๐ŸŽฐ','iOS7' => '','Hex' => '1F3B0'), array('iOS2' => '','iOS5' => 'โ™จ','iOS7' => 'โ™จ๏ธ','Hex' => '2668'), array('iOS2' => '','iOS5' => '๐Ÿ—ฟ','iOS7' => '','Hex' => '1F5FF'), array('iOS2' => '','iOS5' => '๐ŸŽช','iOS7' => '','Hex' => '1F3AA'), array('iOS2' => '','iOS5' => '๐ŸŽญ','iOS7' => '','Hex' => '1F3AD'), array('iOS2' => '','iOS5' => '๐Ÿ“','iOS7' => '','Hex' => '1F4CD'), array('iOS2' => '','iOS5' => '๐Ÿšฉ','iOS7' => '','Hex' => '1F6A9'), array('iOS2' => '','iOS5' => '๐Ÿ‡ฏ๐Ÿ‡ต','iOS7' => '','Hex' => '1F1EF_1F1F5'), array('iOS2' => '','iOS5' => '๐Ÿ‡ฐ๐Ÿ‡ท','iOS7' => '','Hex' => '1F1F0_1F1F7'), array('iOS2' => '','iOS5' => '๐Ÿ‡ฉ๐Ÿ‡ช','iOS7' => '','Hex' => '1F1E9_1F1EA'), array('iOS2' => '','iOS5' => '๐Ÿ‡จ๐Ÿ‡ณ','iOS7' => '','Hex' => '1F1E8_1F1F3'), array('iOS2' => '','iOS5' => '๐Ÿ‡บ๐Ÿ‡ธ','iOS7' => '','Hex' => '1F1FA_1F1F8'), array('iOS2' => '','iOS5' => '๐Ÿ‡ซ๐Ÿ‡ท','iOS7' => '','Hex' => '1F1EB_1F1F7'), array('iOS2' => '','iOS5' => '๐Ÿ‡ช๐Ÿ‡ธ','iOS7' => '','Hex' => '1F1EA_1F1F8'), array('iOS2' => '','iOS5' => '๐Ÿ‡ฎ๐Ÿ‡น','iOS7' => '','Hex' => '1F1EE_1F1F9'), array('iOS2' => '','iOS5' => '๐Ÿ‡ท๐Ÿ‡บ','iOS7' => '','Hex' => '1F1F7_1F1FA'), array('iOS2' => '','iOS5' => '๐Ÿ‡ฌ๐Ÿ‡ง','iOS7' => '','Hex' => '1F1EC_1F1E7'), array('iOS2' => '','iOS5' => '','iOS7' => '','Hex' => ''), array('iOS2' => '','iOS5' => '๐Ÿถ','iOS7' => '','Hex' => '1F436'), array('iOS2' => '','iOS5' => '๐Ÿบ','iOS7' => '','Hex' => '1F43A'), array('iOS2' => '','iOS5' => '๐Ÿฑ','iOS7' => '','Hex' => '1F431'), array('iOS2' => '','iOS5' => '๐Ÿญ','iOS7' => '','Hex' => '1F42D'), array('iOS2' => '','iOS5' => '๐Ÿน','iOS7' => '','Hex' => '1F439'), array('iOS2' => '','iOS5' => '๐Ÿฐ','iOS7' => '','Hex' => '1F430'), array('iOS2' => '','iOS5' => '๐Ÿธ','iOS7' => '','Hex' => '1F438'), array('iOS2' => '','iOS5' => '๐Ÿฏ','iOS7' => '','Hex' => '1F42F'), array('iOS2' => '','iOS5' => '๐Ÿจ','iOS7' => '','Hex' => '1F428'), array('iOS2' => '','iOS5' => '๐Ÿป','iOS7' => '','Hex' => '1F43B'), array('iOS2' => '','iOS5' => '๐Ÿท','iOS7' => '','Hex' => '1F437'), array('iOS2' => '','iOS5' => '๐Ÿฝ','iOS7' => '','Hex' => '1F43D'), array('iOS2' => '','iOS5' => '๐Ÿฎ','iOS7' => '','Hex' => '1F42E'), array('iOS2' => '','iOS5' => '๐Ÿ—','iOS7' => '','Hex' => '1F417'), array('iOS2' => '','iOS5' => '๐Ÿต','iOS7' => '','Hex' => '1F435'), array('iOS2' => '','iOS5' => '๐Ÿ’','iOS7' => '','Hex' => '1F412'), array('iOS2' => '','iOS5' => '๐Ÿด','iOS7' => '','Hex' => '1F434'), array('iOS2' => '','iOS5' => '๐Ÿ‘','iOS7' => '','Hex' => '1F411'), array('iOS2' => '','iOS5' => '๐Ÿ˜','iOS7' => '','Hex' => '1F418'), array('iOS2' => '','iOS5' => '๐Ÿผ','iOS7' => '','Hex' => '1F43C'), array('iOS2' => '','iOS5' => '๐Ÿง','iOS7' => '','Hex' => '1F427'), array('iOS2' => '','iOS5' => '๐Ÿฆ','iOS7' => '','Hex' => '1F426'), array('iOS2' => '','iOS5' => '๐Ÿค','iOS7' => '','Hex' => '1F424'), array('iOS2' => '','iOS5' => '๐Ÿฅ','iOS7' => '','Hex' => '1F425'), array('iOS2' => '','iOS5' => '๐Ÿฃ','iOS7' => '','Hex' => '1F423'), array('iOS2' => '','iOS5' => '๐Ÿ”','iOS7' => '','Hex' => '1F414'), array('iOS2' => '','iOS5' => '๐Ÿ','iOS7' => '','Hex' => '1F40D'), array('iOS2' => '','iOS5' => '๐Ÿข','iOS7' => '','Hex' => '1F422'), array('iOS2' => '','iOS5' => '๐Ÿ›','iOS7' => '','Hex' => '1F41B'), array('iOS2' => '','iOS5' => '๐Ÿ','iOS7' => '','Hex' => '1F41D'), array('iOS2' => '','iOS5' => '๐Ÿœ','iOS7' => '','Hex' => '1F41C'), array('iOS2' => '','iOS5' => '๐Ÿž','iOS7' => '','Hex' => '1F41E'), array('iOS2' => '','iOS5' => '๐ŸŒ','iOS7' => '','Hex' => '1F40C'), array('iOS2' => '','iOS5' => '๐Ÿ™','iOS7' => '','Hex' => '1F419'), array('iOS2' => '','iOS5' => '๐Ÿš','iOS7' => '','Hex' => '1F41A'), array('iOS2' => '','iOS5' => '๐Ÿ ','iOS7' => '','Hex' => '1F420'), array('iOS2' => '','iOS5' => '๐ŸŸ','iOS7' => '','Hex' => '1F41F'), array('iOS2' => '','iOS5' => '๐Ÿฌ','iOS7' => '','Hex' => '1F42C'), array('iOS2' => '','iOS5' => '๐Ÿณ','iOS7' => '','Hex' => '1F433'), array('iOS2' => '','iOS5' => '๐Ÿ‹','iOS7' => '','Hex' => '1F40B'), array('iOS2' => '','iOS5' => '๐Ÿ„','iOS7' => '','Hex' => '1F404'), array('iOS2' => '','iOS5' => '๐Ÿ','iOS7' => '','Hex' => '1F40F'), array('iOS2' => '','iOS5' => '๐Ÿ€','iOS7' => '','Hex' => '1F400'), array('iOS2' => '','iOS5' => '๐Ÿƒ','iOS7' => '','Hex' => '1F403'), array('iOS2' => '','iOS5' => '๐Ÿ…','iOS7' => '','Hex' => '1F405'), array('iOS2' => '','iOS5' => '๐Ÿ‡','iOS7' => '','Hex' => '1F407'), array('iOS2' => '','iOS5' => '๐Ÿ‰','iOS7' => '','Hex' => '1F409'), array('iOS2' => '','iOS5' => '๐ŸŽ','iOS7' => '','Hex' => '1F40E'), array('iOS2' => '','iOS5' => '๐Ÿ','iOS7' => '','Hex' => '1F410'), array('iOS2' => '','iOS5' => '๐Ÿ“','iOS7' => '','Hex' => '1F413'), array('iOS2' => '','iOS5' => '๐Ÿ•','iOS7' => '','Hex' => '1F415'), array('iOS2' => '','iOS5' => '๐Ÿ–','iOS7' => '','Hex' => '1F416'), array('iOS2' => '','iOS5' => '๐Ÿ','iOS7' => '','Hex' => '1F401'), array('iOS2' => '','iOS5' => '๐Ÿ‚','iOS7' => '','Hex' => '1F402'), array('iOS2' => '','iOS5' => '๐Ÿฒ','iOS7' => '','Hex' => '1F432'), array('iOS2' => '','iOS5' => '๐Ÿก','iOS7' => '','Hex' => '1F421'), array('iOS2' => '','iOS5' => '๐ŸŠ','iOS7' => '','Hex' => '1F40A'), array('iOS2' => '','iOS5' => '๐Ÿซ','iOS7' => '','Hex' => '1F42B'), array('iOS2' => '','iOS5' => '๐Ÿช','iOS7' => '','Hex' => '1F42A'), array('iOS2' => '','iOS5' => '๐Ÿ†','iOS7' => '','Hex' => '1F406'), array('iOS2' => '','iOS5' => '๐Ÿˆ','iOS7' => '','Hex' => '1F408'), array('iOS2' => '','iOS5' => '๐Ÿฉ','iOS7' => '','Hex' => '1F429'), array('iOS2' => '','iOS5' => '๐Ÿพ','iOS7' => '','Hex' => '1F43E'), array('iOS2' => '','iOS5' => '๐Ÿ’','iOS7' => '','Hex' => '1F490'), array('iOS2' => '','iOS5' => '๐ŸŒธ','iOS7' => '','Hex' => '1F338'), array('iOS2' => '','iOS5' => '๐ŸŒท','iOS7' => '','Hex' => '1F337'), array('iOS2' => '','iOS5' => '๐Ÿ€','iOS7' => '','Hex' => '1F340'), array('iOS2' => '','iOS5' => '๐ŸŒน','iOS7' => '','Hex' => '1F339'), array('iOS2' => '','iOS5' => '๐ŸŒป','iOS7' => '','Hex' => '1F33B'), array('iOS2' => '','iOS5' => '๐ŸŒบ','iOS7' => '','Hex' => '1F33A'), array('iOS2' => '','iOS5' => '๐Ÿ','iOS7' => '','Hex' => '1F341'), array('iOS2' => '','iOS5' => '๐Ÿƒ','iOS7' => '','Hex' => '1F343'), array('iOS2' => '','iOS5' => '๐Ÿ‚','iOS7' => '','Hex' => '1F342'), array('iOS2' => '','iOS5' => '๐ŸŒฟ','iOS7' => '','Hex' => '1F33F'), array('iOS2' => '','iOS5' => '๐ŸŒพ','iOS7' => '','Hex' => '1F33E'), array('iOS2' => '','iOS5' => '๐Ÿ„','iOS7' => '','Hex' => '1F344'), array('iOS2' => '','iOS5' => '๐ŸŒต','iOS7' => '','Hex' => '1F335'), array('iOS2' => '','iOS5' => '๐ŸŒด','iOS7' => '','Hex' => '1F334'), array('iOS2' => '','iOS5' => '๐ŸŒฒ','iOS7' => '','Hex' => '1F332'), array('iOS2' => '','iOS5' => '๐ŸŒณ','iOS7' => '','Hex' => '1F333'), array('iOS2' => '','iOS5' => '๐ŸŒฐ','iOS7' => '','Hex' => '1F330'), array('iOS2' => '','iOS5' => '๐ŸŒฑ','iOS7' => '','Hex' => '1F331'), array('iOS2' => '','iOS5' => '๐ŸŒผ','iOS7' => '','Hex' => '1F33C'), array('iOS2' => '','iOS5' => '๐ŸŒ','iOS7' => '','Hex' => '1F310'), array('iOS2' => '','iOS5' => '๐ŸŒž','iOS7' => '','Hex' => '1F31E'), array('iOS2' => '','iOS5' => '๐ŸŒ','iOS7' => '','Hex' => '1F31D'), array('iOS2' => '','iOS5' => '๐ŸŒš','iOS7' => '','Hex' => '1F31A'), array('iOS2' => '','iOS5' => '๐ŸŒ‘','iOS7' => '','Hex' => '1F311'), array('iOS2' => '','iOS5' => '๐ŸŒ’','iOS7' => '','Hex' => '1F312'), array('iOS2' => '','iOS5' => '๐ŸŒ“','iOS7' => '','Hex' => '1F313'), array('iOS2' => '','iOS5' => '๐ŸŒ”','iOS7' => '','Hex' => '1F314'), array('iOS2' => '','iOS5' => '๐ŸŒ•','iOS7' => '','Hex' => '1F315'), array('iOS2' => '','iOS5' => '๐ŸŒ–','iOS7' => '','Hex' => '1F316'), array('iOS2' => '','iOS5' => '๐ŸŒ—','iOS7' => '','Hex' => '1F317'), array('iOS2' => '','iOS5' => '๐ŸŒ˜','iOS7' => '','Hex' => '1F318'), array('iOS2' => '','iOS5' => '๐ŸŒœ','iOS7' => '','Hex' => '1F31C'), array('iOS2' => '','iOS5' => '๐ŸŒ›','iOS7' => '','Hex' => '1F31B'), array('iOS2' => '','iOS5' => '๐ŸŒ™','iOS7' => '','Hex' => '1F319'), array('iOS2' => '','iOS5' => '๐ŸŒ','iOS7' => '','Hex' => '1F30D'), array('iOS2' => '','iOS5' => '๐ŸŒŽ','iOS7' => '','Hex' => '1F30E'), array('iOS2' => '','iOS5' => '๐ŸŒ','iOS7' => '','Hex' => '1F30F'), array('iOS2' => '','iOS5' => '๐ŸŒ‹','iOS7' => '','Hex' => '1F30B'), array('iOS2' => '','iOS5' => '๐ŸŒŒ','iOS7' => '','Hex' => '1F30C'), array('iOS2' => '','iOS5' => '๐ŸŒ ','iOS7' => '','Hex' => '1F320'), array('iOS2' => '','iOS5' => 'โญ','iOS7' => 'โญ๏ธ','Hex' => '2B50'), array('iOS2' => '','iOS5' => 'โ˜€','iOS7' => 'โ˜€๏ธ','Hex' => '2600'), array('iOS2' => '','iOS5' => 'โ›…','iOS7' => 'โ›…๏ธ','Hex' => '26C5'), array('iOS2' => '','iOS5' => 'โ˜','iOS7' => 'โ˜๏ธ','Hex' => '2601'), array('iOS2' => '','iOS5' => 'โšก','iOS7' => 'โšก๏ธ','Hex' => '26A1'), array('iOS2' => '','iOS5' => 'โ˜”','iOS7' => 'โ˜”๏ธ','Hex' => '2614'), array('iOS2' => '','iOS5' => 'โ„','iOS7' => 'โ„๏ธ','Hex' => '2744'), array('iOS2' => '','iOS5' => 'โ›„','iOS7' => 'โ›„๏ธ','Hex' => '26C4'), array('iOS2' => '','iOS5' => '๐ŸŒ€','iOS7' => '๐ŸŒ€','Hex' => '1F300'), array('iOS2' => '','iOS5' => '๐ŸŒ','iOS7' => '','Hex' => '1F301'), array('iOS2' => '','iOS5' => '๐ŸŒˆ','iOS7' => '','Hex' => '1F308'), array('iOS2' => '','iOS5' => '๐ŸŒŠ','iOS7' => '','Hex' => '1F30A'), array('iOS2' => '','iOS5' => '๐ŸŽ','iOS7' => '','Hex' => '1F38D'), array('iOS2' => '','iOS5' => '๐Ÿ’','iOS7' => '','Hex' => '1F49D'), array('iOS2' => '','iOS5' => '๐ŸŽŽ','iOS7' => '','Hex' => '1F38E'), array('iOS2' => '','iOS5' => '๐ŸŽ’','iOS7' => '','Hex' => '1F392'), array('iOS2' => '','iOS5' => '๐ŸŽ“','iOS7' => '','Hex' => '1F393'), array('iOS2' => '','iOS5' => '๐ŸŽ','iOS7' => '','Hex' => '1F38F'), array('iOS2' => '','iOS5' => '๐ŸŽ†','iOS7' => '','Hex' => '1F386'), array('iOS2' => '','iOS5' => '๐ŸŽ‡','iOS7' => '','Hex' => '1F387'), array('iOS2' => '','iOS5' => '๐ŸŽ','iOS7' => '','Hex' => '1F390'), array('iOS2' => '','iOS5' => '๐ŸŽ‘','iOS7' => '','Hex' => '1F391'), array('iOS2' => '','iOS5' => '๐ŸŽƒ','iOS7' => '','Hex' => '1F383'), array('iOS2' => '','iOS5' => '๐Ÿ‘ป','iOS7' => '','Hex' => '1F47B'), array('iOS2' => '','iOS5' => '๐ŸŽ…','iOS7' => '','Hex' => '1F385'), array('iOS2' => '','iOS5' => '๐ŸŽ„','iOS7' => '','Hex' => '1F384'), array('iOS2' => '','iOS5' => '๐ŸŽ','iOS7' => '','Hex' => '1F381'), array('iOS2' => '','iOS5' => '๐ŸŽ‹','iOS7' => '','Hex' => '1F38B'), array('iOS2' => '','iOS5' => '๐ŸŽ‰','iOS7' => '','Hex' => '1F389'), array('iOS2' => '','iOS5' => '๐ŸŽŠ','iOS7' => '','Hex' => '1F38A'), array('iOS2' => '','iOS5' => '๐ŸŽˆ','iOS7' => '','Hex' => '1F388'), array('iOS2' => '','iOS5' => '๐ŸŽŒ','iOS7' => '','Hex' => '1F38C'), array('iOS2' => '','iOS5' => '๐Ÿ”ฎ','iOS7' => '','Hex' => '1F52E'), array('iOS2' => '','iOS5' => '๐ŸŽฅ','iOS7' => '','Hex' => '1F3A5'), array('iOS2' => '','iOS5' => '๐Ÿ“ท','iOS7' => '','Hex' => '1F4F7'), array('iOS2' => '','iOS5' => '๐Ÿ“น','iOS7' => '','Hex' => '1F4F9'), array('iOS2' => '','iOS5' => '๐Ÿ“ผ','iOS7' => '','Hex' => '1F4FC'), array('iOS2' => '','iOS5' => '๐Ÿ’ฟ','iOS7' => '','Hex' => '1F4BF'), array('iOS2' => '','iOS5' => '๐Ÿ“€','iOS7' => '','Hex' => '1F4C0'), array('iOS2' => '','iOS5' => '๐Ÿ’ฝ','iOS7' => '','Hex' => '1F4BD'), array('iOS2' => '','iOS5' => '๐Ÿ’พ','iOS7' => '','Hex' => '1F4BE'), array('iOS2' => '','iOS5' => '๐Ÿ’ป','iOS7' => '','Hex' => '1F4BB'), array('iOS2' => '','iOS5' => '๐Ÿ“ฑ','iOS7' => '','Hex' => '1F4F1'), array('iOS2' => '','iOS5' => 'โ˜Ž','iOS7' => 'โ˜Ž๏ธ','Hex' => '260E'), array('iOS2' => '','iOS5' => '๐Ÿ“ž','iOS7' => '','Hex' => '1F4DE'), array('iOS2' => '','iOS5' => '๐Ÿ“Ÿ','iOS7' => '','Hex' => '1F4DF'), array('iOS2' => '','iOS5' => '๐Ÿ“ ','iOS7' => '','Hex' => '1F4E0'), array('iOS2' => '','iOS5' => '๐Ÿ“ก','iOS7' => '','Hex' => '1F4E1'), array('iOS2' => '','iOS5' => '๐Ÿ“บ','iOS7' => '','Hex' => '1F4FA'), array('iOS2' => '','iOS5' => '๐Ÿ“ป','iOS7' => '','Hex' => '1F4FB'), array('iOS2' => '','iOS5' => '๐Ÿ”Š','iOS7' => '','Hex' => '1F50A'), array('iOS2' => '','iOS5' => '๐Ÿ”‰','iOS7' => '','Hex' => '1F509'), array('iOS2' => '','iOS5' => '๐Ÿ”ˆ','iOS7' => '','Hex' => '1F508'), array('iOS2' => '','iOS5' => '๐Ÿ”‡','iOS7' => '','Hex' => '1F507'), array('iOS2' => '','iOS5' => '๐Ÿ””','iOS7' => '','Hex' => '1F514'), array('iOS2' => '','iOS5' => '๐Ÿ”•','iOS7' => '','Hex' => '1F515'), array('iOS2' => '','iOS5' => '๐Ÿ“ข','iOS7' => '','Hex' => '1F4E2'), array('iOS2' => '','iOS5' => '๐Ÿ“ฃ','iOS7' => '','Hex' => '1F4E3'), array('iOS2' => '','iOS5' => 'โณ','iOS7' => '','Hex' => '23F3'), array('iOS2' => '','iOS5' => 'โŒ›','iOS7' => 'โŒ›๏ธ','Hex' => '231B'), array('iOS2' => '','iOS5' => 'โฐ','iOS7' => 'โฐ','Hex' => '23F0'), array('iOS2' => '','iOS5' => 'โŒš','iOS7' => 'โŒš๏ธ','Hex' => '231A'), array('iOS2' => '','iOS5' => '๐Ÿ”“','iOS7' => '','Hex' => '1F513'), array('iOS2' => '','iOS5' => '๐Ÿ”’','iOS7' => '','Hex' => '1F512'), array('iOS2' => '','iOS5' => '๐Ÿ”','iOS7' => '','Hex' => '1F50F'), array('iOS2' => '','iOS5' => '๐Ÿ”','iOS7' => '','Hex' => '1F510'), array('iOS2' => '','iOS5' => '๐Ÿ”‘','iOS7' => '','Hex' => '1F511'), array('iOS2' => '','iOS5' => '๐Ÿ”Ž','iOS7' => '','Hex' => '1F50E'), array('iOS2' => '','iOS5' => '๐Ÿ’ก','iOS7' => '','Hex' => '1F4A1'), array('iOS2' => '','iOS5' => '๐Ÿ”ฆ','iOS7' => '','Hex' => '1F526'), array('iOS2' => '','iOS5' => '๐Ÿ”†','iOS7' => '','Hex' => '1F506'), array('iOS2' => '','iOS5' => '๐Ÿ”…','iOS7' => '','Hex' => '1F505'), array('iOS2' => '','iOS5' => '๐Ÿ”Œ','iOS7' => '','Hex' => '1F50C'), array('iOS2' => '','iOS5' => '๐Ÿ”‹','iOS7' => '','Hex' => '1F50B'), array('iOS2' => '','iOS5' => '๐Ÿ”','iOS7' => '','Hex' => '1F50D'), array('iOS2' => '','iOS5' => '๐Ÿ›','iOS7' => '','Hex' => '1F6C1'), array('iOS2' => '','iOS5' => '๐Ÿ›€','iOS7' => '','Hex' => '1F6C0'), array('iOS2' => '','iOS5' => '๐Ÿšฟ','iOS7' => '','Hex' => '1F6BF'), array('iOS2' => '','iOS5' => '๐Ÿšฝ','iOS7' => '','Hex' => '1F6BD'), array('iOS2' => '','iOS5' => '๐Ÿ”ง','iOS7' => '','Hex' => '1F527'), array('iOS2' => '','iOS5' => '๐Ÿ”ฉ','iOS7' => '','Hex' => '1F529'), array('iOS2' => '','iOS5' => '๐Ÿ”จ','iOS7' => '','Hex' => '1F528'), array('iOS2' => '','iOS5' => '๐Ÿšช','iOS7' => '','Hex' => '1F6AA'), array('iOS2' => '','iOS5' => '๐Ÿšฌ','iOS7' => '','Hex' => '1F6AC'), array('iOS2' => '','iOS5' => '๐Ÿ’ฃ','iOS7' => '','Hex' => '1F4A3'), array('iOS2' => '','iOS5' => '๐Ÿ”ซ','iOS7' => '','Hex' => '1F52B'), array('iOS2' => '','iOS5' => '๐Ÿ”ช','iOS7' => '','Hex' => '1F52A'), array('iOS2' => '','iOS5' => '๐Ÿ’Š','iOS7' => '','Hex' => '1F48A'), array('iOS2' => '','iOS5' => '๐Ÿ’‰','iOS7' => '','Hex' => '1F489'), array('iOS2' => '','iOS5' => '๐Ÿ’ฐ','iOS7' => '','Hex' => '1F4B0'), array('iOS2' => '','iOS5' => '๐Ÿ’ด','iOS7' => '','Hex' => '1F4B4'), array('iOS2' => '','iOS5' => '๐Ÿ’ต','iOS7' => '','Hex' => '1F4B5'), array('iOS2' => '','iOS5' => '๐Ÿ’ท','iOS7' => '','Hex' => '1F4B7'), array('iOS2' => '','iOS5' => '๐Ÿ’ถ','iOS7' => '','Hex' => '1F4B6'), array('iOS2' => '','iOS5' => '๐Ÿ’ณ','iOS7' => '','Hex' => '1F4B3'), array('iOS2' => '','iOS5' => '๐Ÿ’ธ','iOS7' => '','Hex' => '1F4B8'), array('iOS2' => '','iOS5' => '๐Ÿ“ฒ','iOS7' => '','Hex' => '1F4F2'), array('iOS2' => '','iOS5' => '๐Ÿ“ง','iOS7' => '','Hex' => '1F4E7'), array('iOS2' => '','iOS5' => '๐Ÿ“ฅ','iOS7' => '','Hex' => '1F4E5'), array('iOS2' => '','iOS5' => '๐Ÿ“ค','iOS7' => '','Hex' => '1F4E4'), array('iOS2' => '','iOS5' => 'โœ‰','iOS7' => 'โœ‰๏ธ','Hex' => '2709'), array('iOS2' => '','iOS5' => '๐Ÿ“ฉ','iOS7' => '','Hex' => '1F4E9'), array('iOS2' => '','iOS5' => '๐Ÿ“จ','iOS7' => '','Hex' => '1F4E8'), array('iOS2' => '','iOS5' => '๐Ÿ“ฏ','iOS7' => '','Hex' => '1F4EF'), array('iOS2' => '','iOS5' => '๐Ÿ“ซ','iOS7' => '','Hex' => '1F4EB'), array('iOS2' => '','iOS5' => '๐Ÿ“ช','iOS7' => '','Hex' => '1F4EA'), array('iOS2' => '','iOS5' => '๐Ÿ“ฌ','iOS7' => '','Hex' => '1F4EC'), array('iOS2' => '','iOS5' => '๐Ÿ“ญ','iOS7' => '','Hex' => '1F4ED'), array('iOS2' => '','iOS5' => '๐Ÿ“ฎ','iOS7' => '','Hex' => '1F4EE'), array('iOS2' => '','iOS5' => '๐Ÿ“ฆ','iOS7' => '','Hex' => '1F4E6'), array('iOS2' => '','iOS5' => '๐Ÿ“','iOS7' => '','Hex' => '1F4DD'), array('iOS2' => '','iOS5' => '๐Ÿ“„','iOS7' => '','Hex' => '1F4C4'), array('iOS2' => '','iOS5' => '๐Ÿ“ƒ','iOS7' => '','Hex' => '1F4C3'), array('iOS2' => '','iOS5' => '๐Ÿ“‘','iOS7' => '','Hex' => '1F4D1'), array('iOS2' => '','iOS5' => '๐Ÿ“Š','iOS7' => '','Hex' => '1F4CA'), array('iOS2' => '','iOS5' => '๐Ÿ“ˆ','iOS7' => '','Hex' => '1F4C8'), array('iOS2' => '','iOS5' => '๐Ÿ“‰','iOS7' => '','Hex' => '1F4C9'), array('iOS2' => '','iOS5' => '๐Ÿ“œ','iOS7' => '','Hex' => '1F4DC'), array('iOS2' => '','iOS5' => '๐Ÿ“‹','iOS7' => '','Hex' => '1F4CB'), array('iOS2' => '','iOS5' => '๐Ÿ“…','iOS7' => '','Hex' => '1F4C5'), array('iOS2' => '','iOS5' => '๐Ÿ“†','iOS7' => '','Hex' => '1F4C6'), array('iOS2' => '','iOS5' => '๐Ÿ“‡','iOS7' => '','Hex' => '1F4C7'), array('iOS2' => '','iOS5' => '๐Ÿ“','iOS7' => '','Hex' => '1F4C1'), array('iOS2' => '','iOS5' => '๐Ÿ“‚','iOS7' => '','Hex' => '1F4C2'), array('iOS2' => '','iOS5' => 'โœ‚','iOS7' => 'โœ‚๏ธ','Hex' => '2702'), array('iOS2' => '','iOS5' => '๐Ÿ“Œ','iOS7' => '','Hex' => '1F4CC'), array('iOS2' => '','iOS5' => '๐Ÿ“Ž','iOS7' => '','Hex' => '1F4CE'), array('iOS2' => '','iOS5' => 'โœ’','iOS7' => 'โœ’๏ธ','Hex' => '2712'), array('iOS2' => '','iOS5' => 'โœ','iOS7' => 'โœ๏ธ','Hex' => '270F'), array('iOS2' => '','iOS5' => '๐Ÿ“','iOS7' => '','Hex' => '1F4CF'), array('iOS2' => '','iOS5' => '๐Ÿ“','iOS7' => '','Hex' => '1F4D0'), array('iOS2' => '','iOS5' => '๐Ÿ“•','iOS7' => '','Hex' => '1F4D5'), array('iOS2' => '','iOS5' => '๐Ÿ“—','iOS7' => '','Hex' => '1F4D7'), array('iOS2' => '','iOS5' => '๐Ÿ“˜','iOS7' => '','Hex' => '1F4D8'), array('iOS2' => '','iOS5' => '๐Ÿ“™','iOS7' => '','Hex' => '1F4D9'), array('iOS2' => '','iOS5' => '๐Ÿ““','iOS7' => '','Hex' => '1F4D3'), array('iOS2' => '','iOS5' => '๐Ÿ“”','iOS7' => '','Hex' => '1F4D4'), array('iOS2' => '','iOS5' => '๐Ÿ“’','iOS7' => '','Hex' => '1F4D2'), array('iOS2' => '','iOS5' => '๐Ÿ“š','iOS7' => '','Hex' => '1F4DA'), array('iOS2' => '','iOS5' => '๐Ÿ“–','iOS7' => '','Hex' => '1F4D6'), array('iOS2' => '','iOS5' => '๐Ÿ”–','iOS7' => '','Hex' => '1F516'), array('iOS2' => '','iOS5' => '๐Ÿ“›','iOS7' => '','Hex' => '1F4DB'), array('iOS2' => '','iOS5' => '๐Ÿ”ฌ','iOS7' => '','Hex' => '1F52C'), array('iOS2' => '','iOS5' => '๐Ÿ”ญ','iOS7' => '','Hex' => '1F52D'), array('iOS2' => '','iOS5' => '๐Ÿ“ฐ','iOS7' => '','Hex' => '1F4F0'), array('iOS2' => '','iOS5' => '๐ŸŽจ','iOS7' => '','Hex' => '1F3A8'), array('iOS2' => '','iOS5' => '๐ŸŽฌ','iOS7' => '','Hex' => '1F3AC'), array('iOS2' => '','iOS5' => '๐ŸŽค','iOS7' => '','Hex' => '1F3A4'), array('iOS2' => '','iOS5' => '๐ŸŽง','iOS7' => '','Hex' => '1F3A7'), array('iOS2' => '','iOS5' => '๐ŸŽผ','iOS7' => '','Hex' => '1F3BC'), array('iOS2' => '','iOS5' => '๐ŸŽต','iOS7' => '','Hex' => '1F3B5'), array('iOS2' => '','iOS5' => '๐ŸŽถ','iOS7' => '','Hex' => '1F3B6'), array('iOS2' => '','iOS5' => '๐ŸŽน','iOS7' => '','Hex' => '1F3B9'), array('iOS2' => '','iOS5' => '๐ŸŽป','iOS7' => '','Hex' => '1F3BB'), array('iOS2' => '','iOS5' => '๐ŸŽบ','iOS7' => '','Hex' => '1F3BA'), array('iOS2' => '','iOS5' => '๐ŸŽท','iOS7' => '','Hex' => '1F3B7'), array('iOS2' => '','iOS5' => '๐ŸŽธ','iOS7' => '','Hex' => '1F3B8'), array('iOS2' => '','iOS5' => '๐Ÿ‘พ','iOS7' => '','Hex' => '1F47E'), array('iOS2' => '','iOS5' => '๐ŸŽฎ','iOS7' => '','Hex' => '1F3AE'), array('iOS2' => '','iOS5' => '๐Ÿƒ','iOS7' => '','Hex' => '1F0CF'), array('iOS2' => '','iOS5' => '๐ŸŽด','iOS7' => '','Hex' => '1F3B4'), array('iOS2' => '','iOS5' => '๐Ÿ€„','iOS7' => '๐Ÿ€„๏ธ','Hex' => '1F004'), array('iOS2' => '','iOS5' => '๐ŸŽฒ','iOS7' => '','Hex' => '1F3B2'), array('iOS2' => '','iOS5' => '๐ŸŽฏ','iOS7' => '','Hex' => '1F3AF'), array('iOS2' => '','iOS5' => '๐Ÿˆ','iOS7' => '','Hex' => '1F3C8'), array('iOS2' => '','iOS5' => '๐Ÿ€','iOS7' => '','Hex' => '1F3C0'), array('iOS2' => '','iOS5' => 'โšฝ','iOS7' => 'โšฝ๏ธ','Hex' => '26BD'), array('iOS2' => '','iOS5' => 'โšพ','iOS7' => 'โšพ๏ธ','Hex' => '26BE'), array('iOS2' => '','iOS5' => '๐ŸŽพ','iOS7' => '','Hex' => '1F3BE'), array('iOS2' => '','iOS5' => '๐ŸŽฑ','iOS7' => '','Hex' => '1F3B1'), array('iOS2' => '','iOS5' => '๐Ÿ‰','iOS7' => '','Hex' => '1F3C9'), array('iOS2' => '','iOS5' => '๐ŸŽณ','iOS7' => '','Hex' => '1F3B3'), array('iOS2' => '','iOS5' => 'โ›ณ','iOS7' => 'โ›ณ๏ธ','Hex' => '26F3'), array('iOS2' => '','iOS5' => '๐Ÿšต','iOS7' => '','Hex' => '1F6B5'), array('iOS2' => '','iOS5' => '๐Ÿšด','iOS7' => '','Hex' => '1F6B4'), array('iOS2' => '','iOS5' => '๐Ÿ','iOS7' => '','Hex' => '1F3C1'), array('iOS2' => '','iOS5' => '๐Ÿ‡','iOS7' => '','Hex' => '1F3C7'), array('iOS2' => '','iOS5' => '๐Ÿ†','iOS7' => '','Hex' => '1F3C6'), array('iOS2' => '','iOS5' => '๐ŸŽฟ','iOS7' => '','Hex' => '1F3BF'), array('iOS2' => '','iOS5' => '๐Ÿ‚','iOS7' => '','Hex' => '1F3C2'), array('iOS2' => '','iOS5' => '๐ŸŠ','iOS7' => '','Hex' => '1F3CA'), array('iOS2' => '','iOS5' => '๐Ÿ„','iOS7' => '','Hex' => '1F3C4'), array('iOS2' => '','iOS5' => '๐ŸŽฃ','iOS7' => '','Hex' => '1F3A3'), array('iOS2' => '','iOS5' => 'โ˜•','iOS7' => 'โ˜•๏ธ','Hex' => '2615'), array('iOS2' => '','iOS5' => '๐Ÿต','iOS7' => '','Hex' => '1F375'), array('iOS2' => '','iOS5' => '๐Ÿถ','iOS7' => '','Hex' => '1F376'), array('iOS2' => '','iOS5' => '๐Ÿผ','iOS7' => '','Hex' => '1F37C'), array('iOS2' => '','iOS5' => '๐Ÿบ','iOS7' => '','Hex' => '1F37A'), array('iOS2' => '','iOS5' => '๐Ÿป','iOS7' => '','Hex' => '1F37B'), array('iOS2' => '','iOS5' => '๐Ÿธ','iOS7' => '','Hex' => '1F378'), array('iOS2' => '','iOS5' => '๐Ÿน','iOS7' => '','Hex' => '1F379'), array('iOS2' => '','iOS5' => '๐Ÿท','iOS7' => '','Hex' => '1F377'), array('iOS2' => '','iOS5' => '๐Ÿด','iOS7' => '','Hex' => '1F374'), array('iOS2' => '','iOS5' => '๐Ÿ•','iOS7' => '','Hex' => '1F355'), array('iOS2' => '','iOS5' => '๐Ÿ”','iOS7' => '','Hex' => '1F354'), array('iOS2' => '','iOS5' => '๐ŸŸ','iOS7' => '','Hex' => '1F35F'), array('iOS2' => '','iOS5' => '๐Ÿ—','iOS7' => '','Hex' => '1F357'), array('iOS2' => '','iOS5' => '๐Ÿ–','iOS7' => '','Hex' => '1F356'), array('iOS2' => '','iOS5' => '๐Ÿ','iOS7' => '','Hex' => '1F35D'), array('iOS2' => '','iOS5' => '๐Ÿ›','iOS7' => '','Hex' => '1F35B'), array('iOS2' => '','iOS5' => '๐Ÿค','iOS7' => '','Hex' => '1F364'), array('iOS2' => '','iOS5' => '๐Ÿฑ','iOS7' => '','Hex' => '1F371'), array('iOS2' => '','iOS5' => '๐Ÿฃ','iOS7' => '','Hex' => '1F363'), array('iOS2' => '','iOS5' => '๐Ÿฅ','iOS7' => '','Hex' => '1F365'), array('iOS2' => '','iOS5' => '๐Ÿ™','iOS7' => '','Hex' => '1F359'), array('iOS2' => '','iOS5' => '๐Ÿ˜','iOS7' => '','Hex' => '1F358'), array('iOS2' => '','iOS5' => '๐Ÿš','iOS7' => '','Hex' => '1F35A'), array('iOS2' => '','iOS5' => '๐Ÿœ','iOS7' => '','Hex' => '1F35C'), array('iOS2' => '','iOS5' => '๐Ÿฒ','iOS7' => '','Hex' => '1F372'), array('iOS2' => '','iOS5' => '๐Ÿข','iOS7' => '','Hex' => '1F362'), array('iOS2' => '','iOS5' => '๐Ÿก','iOS7' => '','Hex' => '1F361'), array('iOS2' => '','iOS5' => '๐Ÿณ','iOS7' => '','Hex' => '1F373'), array('iOS2' => '','iOS5' => '๐Ÿž','iOS7' => '','Hex' => '1F35E'), array('iOS2' => '','iOS5' => '๐Ÿฉ','iOS7' => '','Hex' => '1F369'), array('iOS2' => '','iOS5' => '๐Ÿฎ','iOS7' => '','Hex' => '1F36E'), array('iOS2' => '','iOS5' => '๐Ÿฆ','iOS7' => '','Hex' => '1F366'), array('iOS2' => '','iOS5' => '๐Ÿจ','iOS7' => '','Hex' => '1F368'), array('iOS2' => '','iOS5' => '๐Ÿง','iOS7' => '','Hex' => '1F367'), array('iOS2' => '','iOS5' => '๐ŸŽ‚','iOS7' => '','Hex' => '1F382'), array('iOS2' => '','iOS5' => '๐Ÿฐ','iOS7' => '','Hex' => '1F370'), array('iOS2' => '','iOS5' => '๐Ÿช','iOS7' => '','Hex' => '1F36A'), array('iOS2' => '','iOS5' => '๐Ÿซ','iOS7' => '','Hex' => '1F36B'), array('iOS2' => '','iOS5' => '๐Ÿฌ','iOS7' => '','Hex' => '1F36C'), array('iOS2' => '','iOS5' => '๐Ÿญ','iOS7' => '','Hex' => '1F36D'), array('iOS2' => '','iOS5' => '๐Ÿฏ','iOS7' => '','Hex' => '1F36F'), array('iOS2' => '','iOS5' => '๐ŸŽ','iOS7' => '','Hex' => '1F34E'), array('iOS2' => '','iOS5' => '๐Ÿ','iOS7' => '','Hex' => '1F34F'), array('iOS2' => '','iOS5' => '๐ŸŠ','iOS7' => '','Hex' => '1F34A'), array('iOS2' => '','iOS5' => '๐Ÿ‹','iOS7' => '','Hex' => '1F34B'), array('iOS2' => '','iOS5' => '๐Ÿ’','iOS7' => '','Hex' => '1F352'), array('iOS2' => '','iOS5' => '๐Ÿ‡','iOS7' => '','Hex' => '1F347'), array('iOS2' => '','iOS5' => '๐Ÿ‰','iOS7' => '','Hex' => '1F349'), array('iOS2' => '','iOS5' => '๐Ÿ“','iOS7' => '','Hex' => '1F353'), array('iOS2' => '','iOS5' => '๐Ÿ‘','iOS7' => '','Hex' => '1F351'), array('iOS2' => '','iOS5' => '๐Ÿˆ','iOS7' => '','Hex' => '1F348'), array('iOS2' => '','iOS5' => '๐ŸŒ','iOS7' => '','Hex' => '1F34C'), array('iOS2' => '','iOS5' => '๐Ÿ','iOS7' => '','Hex' => '1F350'), array('iOS2' => '','iOS5' => '๐Ÿ','iOS7' => '','Hex' => '1F34D'), array('iOS2' => '','iOS5' => '๐Ÿ ','iOS7' => '','Hex' => '1F360'), array('iOS2' => '','iOS5' => '๐Ÿ†','iOS7' => '','Hex' => '1F346'), array('iOS2' => '','iOS5' => '๐Ÿ…','iOS7' => '','Hex' => '1F345'), array('iOS2' => '','iOS5' => '๐ŸŒฝ','iOS7' => '','Hex' => '1F33D'), array('iOS2' => '','iOS5' => '1โƒฃ','iOS7' => '','Hex' => '0031_20E3'), array('iOS2' => '','iOS5' => '2โƒฃ','iOS7' => '','Hex' => '0032_20E3'), array('iOS2' => '','iOS5' => '3โƒฃ','iOS7' => '','Heex' => '0034_20E3'), array('iOS2' => '','iOS5' => '2โƒฃ','iOS7' => '','Hex' => '0032_20E3'), array('iOS2' => '','iOS5' => '0โƒฃ','iOS7' => '','Hex' => '0030_20E3'), array('iOS2' => '','iOS5' => '5โƒฃ','iOS7' => '','Hex' => '0035_20E3'), array('iOS2' => '','iOS5' => '6โƒฃ','iOS7' => '','Hex' => '0036_20E3'), array('iOS2' => '','iOS5' => '7โƒฃ','iOS7' => '','Hex' => '0037_20E3'), array('iOS2' => '','iOS5' => '8โƒฃ','iOS7' => '','Hex' => '0038_20E3'), array('iOS2' => '','iOS5' => '9โƒฃ','iOS7' => '','Hex' => '0039_20E3'), array('iOS2' => '','iOS5' => '๐Ÿ”Ÿ','iOS7' => '','Hex' => '1F51F'), array('iOS2' => '','iOS5' => '๐Ÿ”ข','iOS7' => '','Hex' => '1F522'), array('iOS2' => '','iOS5' => '#โƒฃ','iOS7' => '','Hex' => '0023_20E3'), array('iOS2' => '','iOS5' => '๐Ÿ”ฃ','iOS7' => '','Hex' => '1F523'), array('iOS2' => '','iOS5' => 'โฌ†','iOS7' => 'โฌ†๏ธ','Hex' => '2B06'), array('iOS2' => '','iOS5' => 'โฌ‡','iOS7' => 'โฌ‡๏ธ','Hex' => '2B07'), array('iOS2' => '','iOS5' => 'โฌ…','iOS7' => 'โฌ…๏ธ','Hex' => '2B05'), array('iOS2' => '','iOS5' => 'โžก','iOS7' => 'โžก๏ธ','Hex' => '27A1'), array('iOS2' => '','iOS5' => '๐Ÿ” ','iOS7' => '','Hex' => '1F520'), array('iOS2' => '','iOS5' => '๐Ÿ”ก','iOS7' => '','Hex' => '1F521'), array('iOS2' => '','iOS5' => '๐Ÿ”ค','iOS7' => '','Hex' => '1F524'), array('iOS2' => '','iOS5' => 'โ†—','iOS7' => 'โ†—๏ธ','Hex' => '2197'), array('iOS2' => '','iOS5' => 'โ†–','iOS7' => 'โ†–๏ธ','Hex' => '2196'), array('iOS2' => '','iOS5' => 'โ†˜','iOS7' => 'โ†˜๏ธ','Hex' => '2198'), array('iOS2' => '','iOS5' => 'โ†™','iOS7' => 'โ†™๏ธ','Hex' => '2199'), array('iOS2' => '','iOS5' => 'โ†”','iOS7' => 'โ†”๏ธ','Hex' => '2194'), array('iOS2' => '','iOS5' => 'โ†•','iOS7' => 'โ†•๏ธ','Hex' => '2195'), array('iOS2' => '','iOS5' => '๐Ÿ”„','iOS7' => '','Hex' => '1F504'), array('iOS2' => '','iOS5' => 'โ—€','iOS7' => 'โ—€๏ธ','Hex' => '25C0'), array('iOS2' => '','iOS5' => 'โ–ถ','iOS7' => 'โ–ถ๏ธ','Hex' => '25B6'), array('iOS2' => '','iOS5' => '๐Ÿ”ผ','iOS7' => '','Hex' => '1F53C'), array('iOS2' => '','iOS5' => '๐Ÿ”ฝ','iOS7' => '','Hex' => '1F53D'), array('iOS2' => '','iOS5' => 'โ†ฉ','iOS7' => 'โ†ฉ๏ธ','Hex' => '21A9'), array('iOS2' => '','iOS5' => 'โ†ช','iOS7' => 'โ†ช๏ธ','Hex' => '21AA'), array('iOS2' => '','iOS5' => 'โ„น','iOS7' => 'โ„น๏ธ','Hex' => '2139'), array('iOS2' => '','iOS5' => 'โช','iOS7' => '','Hex' => '23EA'), array('iOS2' => '','iOS5' => 'โฉ','iOS7' => '','Hex' => '23E9'), array('iOS2' => '','iOS5' => 'โซ','iOS7' => '','Hex' => '23EB'), array('iOS2' => '','iOS5' => 'โฌ','iOS7' => '','Hex' => '23EC'), array('iOS2' => '','iOS5' => 'โคต','iOS7' => 'โคต๏ธ','Hex' => '2935'), array('iOS2' => '','iOS5' => 'โคด','iOS7' => 'โคด๏ธ','Hex' => '2934'), array('iOS2' => '','iOS5' => '๐Ÿ†—','iOS7' => '','Hex' => '1F197'), array('iOS2' => '','iOS5' => '๐Ÿ”€','iOS7' => '','Hex' => '1F500'), array('iOS2' => '','iOS5' => '๐Ÿ”','iOS7' => '','Hex' => '1F501'), array('iOS2' => '','iOS5' => '๐Ÿ”‚','iOS7' => '','Hex' => '1F502'), array('iOS2' => '','iOS5' => '๐Ÿ†•','iOS7' => '','Hex' => '1F195'), array('iOS2' => '','iOS5' => '๐Ÿ†™','iOS7' => '','Hex' => '1F199'), array('iOS2' => '','iOS5' => '๐Ÿ†’','iOS7' => '','Hex' => '1F192'), array('iOS2' => '','iOS5' => '๐Ÿ†“','iOS7' => '','Hex' => '1F193'), array('iOS2' => '','iOS5' => '๐Ÿ†–','iOS7' => '','Hex' => '1F196'), array('iOS2' => '','iOS5' => '๐Ÿ“ถ','iOS7' => '','Hex' => '1F4F6'), array('iOS2' => '','iOS5' => '๐ŸŽฆ','iOS7' => '','Hex' => '1F3A6'), array('iOS2' => '','iOS5' => '๐Ÿˆ','iOS7' => '','Hex' => '1F201'), array('iOS2' => '','iOS5' => '๐Ÿˆฏ','iOS7' => '๐Ÿˆฏ๏ธ','Hex' => '1F22F'), array('iOS2' => '','iOS5' => '๐Ÿˆณ','iOS7' => '','Hex' => '1F233'), array('iOS2' => '','iOS5' => '๐Ÿˆต','iOS7' => '','Hex' => '1F235'), array('iOS2' => '','iOS5' => '๐Ÿˆด','iOS7' => '','Hex' => '1F234'), array('iOS2' => '','iOS5' => '๐Ÿˆฒ','iOS7' => '','Hex' => '1F232'), array('iOS2' => '','iOS5' => '๐Ÿ‰','iOS7' => '','Hex' => '1F250'), array('iOS2' => '','iOS5' => '๐Ÿˆน','iOS7' => '','Hex' => '1F239'), array('iOS2' => '','iOS5' => '๐Ÿˆบ','iOS7' => '','Hex' => '1F23A'), array('iOS2' => '','iOS5' => '๐Ÿˆถ','iOS7' => '','Hex' => '1F236'), array('iOS2' => '','iOS5' => '๐Ÿˆš','iOS7' => '๐Ÿˆš๏ธ','Hex' => '1F21A'), array('iOS2' => '','iOS5' => '๐Ÿšป','iOS7' => '','Hex' => '1F6BB'), array('iOS2' => '','iOS5' => '๐Ÿšน','iOS7' => '','Hex' => '1F6B9'), array('iOS2' => '','iOS5' => '๐Ÿšบ','iOS7' => '','Hex' => '1F6BA'), array('iOS2' => '','iOS5' => '๐Ÿšผ','iOS7' => '','Hex' => '1F6BC'), array('iOS2' => '','iOS5' => '๐Ÿšพ','iOS7' => '','Hex' => '1F6BE'), array('iOS2' => '','iOS5' => '๐Ÿšฐ','iOS7' => '','Hex' => '1F6B0'), array('iOS2' => '','iOS5' => '๐Ÿšฎ','iOS7' => '','Hex' => '1F6AE'), array('iOS2' => '','iOS5' => '๐Ÿ…ฟ','iOS7' => '๐Ÿ…ฟ๏ธ','Hex' => '1F17F'), array('iOS2' => '','iOS5' => 'โ™ฟ','iOS7' => 'โ™ฟ๏ธ','Hex' => '267F'), array('iOS2' => '','iOS5' => '๐Ÿšญ','iOS7' => '','Hex' => '1F6AD'), array('iOS2' => '','iOS5' => '๐Ÿˆท','iOS7' => '','Hex' => '1F237'), array('iOS2' => '','iOS5' => '๐Ÿˆธ','iOS7' => '','Hex' => '1F238'), array('iOS2' => '','iOS5' => '๐Ÿˆ‚','iOS7' => '','Hex' => '1F202'), array('iOS2' => '','iOS5' => 'โ“‚','iOS7' => 'โ“‚๏ธ','Hex' => '24C2'), array('iOS2' => '','iOS5' => '๐Ÿ›‚','iOS7' => '','Hex' => '1F6C2'), array('iOS2' => '','iOS5' => '๐Ÿ›„','iOS7' => '','Hex' => '1F6C4'), array('iOS2' => '','iOS5' => '๐Ÿ›…','iOS7' => '','Hex' => '1F6C5'), array('iOS2' => '','iOS5' => '๐Ÿ›ƒ','iOS7' => '','Hex' => '1F6C3'), array('iOS2' => '','iOS5' => '๐Ÿ‰‘','iOS7' => '','Hex' => '1F251'), array('iOS2' => '','iOS5' => 'ใŠ™','iOS7' => 'ใŠ™๏ธ','Hex' => '3299'), array('iOS2' => '','iOS5' => 'ใŠ—','iOS7' => 'ใŠ—๏ธ','Hex' => '3297'), array('iOS2' => '','iOS5' => '๐Ÿ†‘','iOS7' => '','Hex' => '1F191'), array('iOS2' => '','iOS5' => '๐Ÿ†˜','iOS7' => '','Hex' => '1F198'), array('iOS2' => '','iOS5' => '๐Ÿ†”','iOS7' => '','Hex' => '1F194'), array('iOS2' => '','iOS5' => '๐Ÿšซ','iOS7' => '','Hex' => '1F6AB'), array('iOS2' => '','iOS5' => '๐Ÿ”ž','iOS7' => '','Hex' => '1F51E'), array('iOS2' => '','iOS5' => '๐Ÿ“ต','iOS7' => '','Hex' => '1F4F5'), array('iOS2' => '','iOS5' => '๐Ÿšฏ','iOS7' => '','Hex' => '1F6AF'), array('iOS2' => '','iOS5' => '๐Ÿšฑ','iOS7' => '','Hex' => '1F6B1'), array('iOS2' => '','iOS5' => '๐Ÿšณ','iOS7' => '','Hex' => '1F6B3'), array('iOS2' => '','iOS5' => '๐Ÿšท','iOS7' => '','Hex' => '1F6B7'), array('iOS2' => '','iOS5' => '๐Ÿšธ','iOS7' => '','Hex' => '1F6B8'), array('iOS2' => '','iOS5' => 'โ›”','iOS7' => 'โ›”๏ธ','Hex' => '26D4'), array('iOS2' => '','iOS5' => 'โœณ','iOS7' => 'โœณ๏ธ','Hex' => '2733'), array('iOS2' => '','iOS5' => 'โ‡','iOS7' => 'โ‡๏ธ','Hex' => '2747'), array('iOS2' => '','iOS5' => 'โŽ','iOS7' => '','Hex' => '274E'), array('iOS2' => '','iOS5' => 'โœ…','iOS7' => '','Hex' => '2705'), array('iOS2' => '','iOS5' => 'โœด','iOS7' => 'โœด๏ธ','Hex' => '2734'), array('iOS2' => '','iOS5' => '๐Ÿ’Ÿ','iOS7' => '','Hex' => '1F49F'), array('iOS2' => '','iOS5' => '๐Ÿ†š','iOS7' => '','Hex' => '1F19A'), array('iOS2' => '','iOS5' => '๐Ÿ“ณ','iOS7' => '','Hex' => '1F4F3'), array('iOS2' => '','iOS5' => '๐Ÿ“ด','iOS7' => '','Hex' => '1F4F4'), array('iOS2' => '','iOS5' => '๐Ÿ…ฐ','iOS7' => '','Hex' => '1F170'), array('iOS2' => '','iOS5' => '๐Ÿ…ฑ','iOS7' => '','Hex' => '1F171'), array('iOS2' => '','iOS5' => '๐Ÿ†Ž','iOS7' => '','Hex' => '1F18E'), array('iOS2' => '','iOS5' => '๐Ÿ…พ','iOS7' => '','Hex' => '1F17E'), array('iOS2' => '','iOS5' => '๐Ÿ’ ','iOS7' => '','Hex' => '1F4A0'), array('iOS2' => '','iOS5' => 'โžฟ','iOS7' => '','Hex' => '27BF'), array('iOS2' => '','iOS5' => 'โ™ป','iOS7' => 'โ™ป๏ธ','Hex' => '267B'), array('iOS2' => '','iOS5' => 'โ™ˆ','iOS7' => 'โ™ˆ๏ธ','Hex' => '2648'), array('iOS2' => '','iOS5' => 'โ™‰','iOS7' => 'โ™‰๏ธ','Hex' => '2649'), array('iOS2' => '','iOS5' => 'โ™Š','iOS7' => 'โ™Š๏ธ','Hex' => '264A'), array('iOS2' => '','iOS5' => 'โ™‹','iOS7' => 'โ™‹๏ธ','Hex' => '264B'), array('iOS2' => '','iOS5' => 'โ™Œ','iOS7' => 'โ™Œ๏ธ','Hex' => '264C'), array('iOS2' => '','iOS5' => 'โ™','iOS7' => 'โ™๏ธ','Hex' => '264D'), array('iOS2' => '','iOS5' => 'โ™Ž','iOS7' => 'โ™Ž๏ธ','Hex' => '264E'), array('iOS2' => '','iOS5' => 'โ™','iOS7' => 'โ™๏ธ','Hex' => '264F'), array('iOS2' => '','iOS5' => 'โ™','iOS7' => 'โ™๏ธ','Hex' => '2650'), array('iOS2' => '','iOS5' => 'โ™‘','iOS7' => 'โ™‘๏ธ','Hex' => '2651'), array('iOS2' => '','iOS5' => 'โ™’','iOS7' => 'โ™’๏ธ','Hex' => '2652'), array('iOS2' => '','iOS5' => 'โ™“','iOS7' => 'โ™“๏ธ','Hex' => '2653'), array('iOS2' => '','iOS5' => 'โ›Ž','iOS7' => '','Hex' => '26CE'), array('iOS2' => '','iOS5' => '๐Ÿ”ฏ','iOS7' => '','Hex' => '1F52F'), array('iOS2' => '','iOS5' => '๐Ÿง','iOS7' => '','Hex' => '1F3E7'), array('iOS2' => '','iOS5' => '๐Ÿ’น','iOS7' => '','Hex' => '1F4B9'), array('iOS2' => '','iOS5' => '๐Ÿ’ฒ','iOS7' => '','Hex' => '1F4B2'), array('iOS2' => '','iOS5' => '๐Ÿ’ฑ','iOS7' => '','Hex' => '1F4B1'), array('iOS2' => 'ยฉ','iOS5' => 'ยฉ','iOS7' => '','Hex' => '00A9'), array('iOS2' => 'ยฎ','iOS5' => 'ยฎ','iOS7' => '','Hex' => '00AE'), array('iOS2' => 'โ„ข','iOS5' => 'โ„ข','iOS7' => '','Hex' => '2122'), array('iOS2' => '','iOS5' => 'ใ€ฝ','iOS7' => 'ใ€ฝ๏ธ','Hex' => '303D'), array('iOS2' => '','iOS5' => 'ใ€ฐ','iOS7' => '','Hex' => '3030'), array('iOS2' => '','iOS5' => '๐Ÿ”','iOS7' => '','Hex' => '1F51D'), array('iOS2' => '','iOS5' => '๐Ÿ”š','iOS7' => '','Hex' => '1F51A'), array('iOS2' => '','iOS5' => '๐Ÿ”™','iOS7' => '','Hex' => '1F519'), array('iOS2' => '','iOS5' => '๐Ÿ”›','iOS7' => '','Hex' => '1F51B'), array('iOS2' => '','iOS5' => '๐Ÿ”œ','iOS7' => '','Hex' => '1F51C'), array('iOS2' => '','iOS5' => 'โŒ','iOS7' => '','Hex' => '274C'), array('iOS2' => '','iOS5' => 'โญ•','iOS7' => 'โญ•๏ธ','Hex' => '2B55'), array('iOS2' => '','iOS5' => 'โ—','iOS7' => 'โ—๏ธ','Hex' => '2757'), array('iOS2' => '','iOS5' => 'โ“','iOS7' => '','Hex' => '2753'), array('iOS2' => '','iOS5' => 'โ•','iOS7' => '','Hex' => '2755'), array('iOS2' => '','iOS5' => 'โ”','iOS7' => '','Hex' => '2754'), array('iOS2' => '','iOS5' => '๐Ÿ”ƒ','iOS7' => '','Hex' => '1F503'), array('iOS2' => '','iOS5' => '๐Ÿ•›','iOS7' => '','Hex' => '1F55B'), array('iOS2' => '','iOS5' => '๐Ÿ•ง','iOS7' => '','Hex' => '1F567'), array('iOS2' => '','iOS5' => '๐Ÿ•','iOS7' => '','Hex' => '1F550'), array('iOS2' => '','iOS5' => '๐Ÿ•œ','iOS7' => '','Hex' => '1F55C'), array('iOS2' => '','iOS5' => '๐Ÿ•‘','iOS7' => '','Hex' => '1F551'), array('iOS2' => '','iOS5' => '๐Ÿ•','iOS7' => '','Hex' => '1F55D'), array('iOS2' => '','iOS5' => '๐Ÿ•’','iOS7' => '','Hex' => '1F552'), array('iOS2' => '','iOS5' => '๐Ÿ•ž','iOS7' => '','Hex' => '1F55E'), array('iOS2' => '','iOS5' => '๐Ÿ•“','iOS7' => '','Hex' => '1F553'), array('iOS2' => '','iOS5' => '๐Ÿ•Ÿ','iOS7' => '','Hex' => '1F55F'), array('iOS2' => '','iOS5' => '๐Ÿ•”','iOS7' => '','Hex' => '1F554'), array('iOS2' => '','iOS5' => '๐Ÿ• ','iOS7' => '','Hex' => '1F560'), array('iOS2' => '','iOS5' => '๐Ÿ••','iOS7' => '','Hex' => '1F555'), array('iOS2' => '','iOS5' => '๐Ÿ•–','iOS7' => '','Hex' => '1F556'), array('iOS2' => '','iOS5' => '๐Ÿ•—','iOS7' => '','Hex' => '1F557'), array('iOS2' => '','iOS5' => '๐Ÿ•˜','iOS7' => '','Hex' => '1F558'), array('iOS2' => '','iOS5' => '๐Ÿ•™','iOS7' => '','Hex' => '1F559'), array('iOS2' => '','iOS5' => '๐Ÿ•š','iOS7' => '','Hex' => '1F55A'), array('iOS2' => '','iOS5' => '๐Ÿ•ก','iOS7' => '','Hex' => '1F561'), array('iOS2' => '','iOS5' => '๐Ÿ•ข','iOS7' => '','Hex' => '1F562'), array('iOS2' => '','iOS5' => '๐Ÿ•ฃ','iOS7' => '','Hex' => '1F563'), array('iOS2' => '','iOS5' => '๐Ÿ•ค','iOS7' => '','Hex' => '1F564'), array('iOS2' => '','iOS5' => '๐Ÿ•ฅ','iOS7' => '','Hex' => '1F565'), array('iOS2' => '','iOS5' => '๐Ÿ•ฆ','iOS7' => '','Hex' => '1F566'), array('iOS2' => '','iOS5' => 'โœ–','iOS7' => 'โœ–๏ธ','Hex' => '2716'), array('iOS2' => '','iOS5' => 'โž•','iOS7' => '','Hex' => '2795'), array('iOS2' => '','iOS5' => 'โž–','iOS7' => '','Hex' => '2796'), array('iOS2' => '','iOS5' => 'โž—','iOS7' => '','Hex' => '2797'), array('iOS2' => '','iOS5' => 'โ™ ','iOS7' => 'โ™ ๏ธ','Hex' => '2660'), array('iOS2' => '','iOS5' => 'โ™ฅ','iOS7' => 'โ™ฅ๏ธ','Hex' => '2665'), array('iOS2' => '','iOS5' => 'โ™ฃ','iOS7' => 'โ™ฃ๏ธ','Hex' => '2663'), array('iOS2' => '','iOS5' => 'โ™ฆ','iOS7' => 'โ™ฆ๏ธ','Hex' => '2666'), array('iOS2' => '','iOS5' => '๐Ÿ’ฎ','iOS7' => '','Hex' => '1F4AE'), array('iOS2' => '','iOS5' => '๐Ÿ’ฏ','iOS7' => '','Hex' => '1F4AF'), array('iOS2' => '','iOS5' => 'โœ”','iOS7' => 'โœ”๏ธ','Hex' => '2714'), array('iOS2' => '','iOS5' => 'โ˜‘','iOS7' => 'โ˜‘๏ธ','Hex' => '2611'), array('iOS2' => '','iOS5' => '๐Ÿ”˜','iOS7' => '','Hex' => '1F518'), array('iOS2' => '','iOS5' => '๐Ÿ”—','iOS7' => '','Hex' => '1F517'), array('iOS2' => '','iOS5' => 'โžฐ','iOS7' => '','Hex' => '27B0'), array('iOS2' => '','iOS5' => '๐Ÿ”ฑ','iOS7' => '','Hex' => '1F531'), array('iOS2' => '','iOS5' => '๐Ÿ”ฒ','iOS7' => '','Hex' => '1F532'), array('iOS2' => '','iOS5' => '๐Ÿ”ณ','iOS7' => '','Hex' => '1F533'), array('iOS2' => '','iOS5' => 'โ—ผ','iOS7' => 'โ—ผ๏ธ','Hex' => '25FC'), array('iOS2' => '','iOS5' => 'โ—ป','iOS7' => 'โ—ป๏ธ','Hex' => '25FB'), array('iOS2' => '','iOS5' => 'โ—พ','iOS7' => 'โ—พ๏ธ','Hex' => '25FE'), array('iOS2' => '','iOS5' => 'โ—ฝ','iOS7' => 'โ—ฝ๏ธ','Hex' => '25FD'), array('iOS2' => '','iOS5' => 'โ–ช','iOS7' => 'โ–ช๏ธ','Hex' => '25AA'), array('iOS2' => '','iOS5' => 'โ–ซ','iOS7' => 'โ–ซ๏ธ','Hex' => '25AB'), array('iOS2' => '','iOS5' => '๐Ÿ”บ','iOS7' => '','Hex' => '1F53A'), array('iOS2' => '','iOS5' => 'โฌœ','iOS7' => 'โฌœ๏ธ','Hex' => '2B1C'), array('iOS2' => '','iOS5' => 'โฌ›','iOS7' => 'โฌ›๏ธ','Hex' => '2B1B'), array('iOS2' => '','iOS5' => 'โšซ','iOS7' => 'โšซ๏ธ','Hex' => '26AB'), array('iOS2' => '','iOS5' => 'โšช','iOS7' => 'โšช๏ธ','Hex' => '26AA'), array('iOS2' => '','iOS5' => '๐Ÿ”ด','iOS7' => '','Hex' => '1F534'), array('iOS2' => '','iOS5' => '๐Ÿ”ต','iOS7' => '','Hex' => '1F535'), array('iOS2' => '','iOS5' => '๐Ÿ”ป','iOS7' => '','Hex' => '1F53B'), array('iOS2' => '','iOS5' => '๐Ÿ”ถ','iOS7' => '','Hex' => '1F536'), array('iOS2' => '','iOS5' => '๐Ÿ”ท','iOS7' => '','Hex' => '1F537'), array('iOS2' => '','iOS5' => '๐Ÿ”ธ','iOS7' => '','Hex' => '1F538'), array('iOS2' => '','iOS5' => '๐Ÿ”น','iOS7' => '','Hex' => '1F539'), array('iOS2' => '','iOS5' => 'โ‰','iOS7' => 'โ‰๏ธ','Hex' => '2049'), array('iOS2' => '','iOS5' => 'โ€ผ','iOS7' => 'โ€ผ๏ธ','Hex' => '203C')); -} - function updateData($nameFile, $WAver, $classesMD5 = "") { - $file = __DIR__."/".$nameFile; - $open = fopen($file, 'r+'); - $content = fread($open,filesize($file)); - fclose($open); + $file = __DIR__ . "/" . $nameFile; + $open = fopen($file, 'r+'); + $content = fread($open, filesize($file)); + fclose($open); - $content = explode("\n",$content); + $content = explode("\n", $content); - if ($file == __DIR__.'/token.php') - $content[5] = ' $classesMd5 = '."\"".trim($classesMD5)."\"; // $WAver"; - else if ($file == __DIR__.'/whatsprot.class.php'){ - $content[48] = ' const WHATSAPP_VER = \''.trim($WAver). '\'; // The WhatsApp version.'; - $content[49] = ' const WHATSAPP_USER_AGENT = \'WhatsApp/'.trim($WAver).' Android/4.3 Device/GalaxyS3\'; // User agent used in request/registration code.'; - } + if ($file == __DIR__ . '/token.php') { + $content[5] = ' $classesMd5 = ' . "\"" . trim($classesMD5) . "\"; // $WAver"; + } else { + if ($file == __DIR__ . '/whatsprot.class.php') { + $content[48] = ' const WHATSAPP_VER = \'' . trim($WAver) . '\'; // The WhatsApp version.'; + $content[49] = ' const WHATSAPP_USER_AGENT = \'WhatsApp/' . trim($WAver) . ' Android/4.3 Device/GalaxyS3\'; // User agent used in request/registration code.'; + } + } - $content = implode("\n",$content); + $content = implode("\n", $content); - $open = fopen($file,'w'); - fwrite($open,$content); - fclose($open); + $open = fopen($file, 'w'); + fwrite($open, $content); + fclose($open); } /** @@ -195,39 +196,3173 @@ function updateData($nameFile, $WAver, $classesMD5 = "") * * @param string $number * Your number with international code, e.g. 49123456789 - * @param int $sku + * @param int $sku * The Time in years (1, 3 or 5) you want to extend the account-expiration. * * @return string * Returns the link. * -**/ + **/ function generatePaymentLink($number, $sku) { - if ( $sku != 1 or $sku != 3 or $sku != 5 ) - $sku = 1; - $base = "https://www.whatsapp.com/payments/cksum_pay.php?phone="; - $middle = "&cksum="; - $end = "&sku=".$sku; - $checksum = md5($number."abc"); - $link = $base.$number.$middle.$checksum.$end; - return $link; + if ($sku != 1 or $sku != 3 or $sku != 5) { + $sku = 1; + } + $base = "https://www.whatsapp.com/payments/cksum_pay.php?phone="; + $middle = "&cksum="; + $end = "&sku=" . $sku; + $checksum = md5($number . "abc"); + $link = $base . $number . $middle . $checksum . $end; + return $link; } // Gets mime type of a file using various methods -function get_mime($file) { - if (function_exists("finfo_file")) { - $finfo = finfo_open(FILEINFO_MIME_TYPE); - $mime = finfo_file($finfo, $file); - finfo_close($finfo); - return $mime; - } else if (function_exists("mime_content_type")) { - return mime_content_type($file); - } else if (!strncasecmp(PHP_OS, 'WIN', 3) == 0 && !stristr(ini_get("disable_functions"), "shell_exec")) { - $file = escapeshellarg($file); - $mime = shell_exec("file -bi " . $file); - return $mime; - } else { - return false; - } +function get_mime($file) +{ + if (function_exists("finfo_file")) { + $finfo = finfo_open(FILEINFO_MIME_TYPE); + $mime = finfo_file($finfo, $file); + finfo_close($finfo); + return $mime; + } else { + if (function_exists("mime_content_type")) { + return mime_content_type($file); + } else { + if ( ! strncasecmp(PHP_OS, 'WIN', 3) == 0 && ! stristr(ini_get("disable_functions"), "shell_exec")) { + $file = escapeshellarg($file); + $mime = shell_exec("file -bi " . $file); + return $mime; + } else { + return false; + } + } + } + +//Generate Array of Emojis iOS2, iOS5 and iOS7 + function ArrayEmojis() + { + return array( + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ˜„', + 'iOS7' => '', + 'Hex' => '1F604' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ˜ƒ', + 'iOS7' => '', + 'Hex' => '1F603' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿ˜€', 'iOS7' => '', 'Hex' => '1F600'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ˜Š', + 'iOS7' => '', + 'Hex' => '1F60A' + ), + array( + 'iOS2' => '', + 'iOS5' => 'โ˜บ', + 'iOS7' => 'โ˜บ๏ธ', + 'Hex' => '263A' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ˜‰', + 'iOS7' => '', + 'Hex' => '1F609' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ˜', + 'iOS7' => '', + 'Hex' => '1F60D' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ˜˜', + 'iOS7' => '', + 'Hex' => '1F618' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ˜š', + 'iOS7' => '', + 'Hex' => '1F61A' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿ˜—', 'iOS7' => '', 'Hex' => '1F617'), + array('iOS2' => '', 'iOS5' => '๐Ÿ˜™', 'iOS7' => '', 'Hex' => '1F619'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ˜œ', + 'iOS7' => '', + 'Hex' => '1F61C' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ˜', + 'iOS7' => '', + 'Hex' => '1F61D' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿ˜›', 'iOS7' => '', 'Hex' => '1F61B'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ˜ณ', + 'iOS7' => '', + 'Hex' => '1F633' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ˜', + 'iOS7' => '', + 'Hex' => '1F601' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ˜”', + 'iOS7' => '', + 'Hex' => '1F614' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ˜Œ', + 'iOS7' => '', + 'Hex' => '1F60C' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ˜’', + 'iOS7' => '', + 'Hex' => '1F612' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ˜ž', + 'iOS7' => '', + 'Hex' => '1F61E' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ˜ฃ', + 'iOS7' => '', + 'Hex' => '1F623' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ˜ข', + 'iOS7' => '', + 'Hex' => '1F622' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ˜‚', + 'iOS7' => '', + 'Hex' => '1F602' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ˜ญ', + 'iOS7' => '', + 'Hex' => '1F62D' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ˜ช', + 'iOS7' => '', + 'Hex' => '1F62A' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ˜ฅ', + 'iOS7' => '', + 'Hex' => '1F625' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ˜ฐ', + 'iOS7' => '', + 'Hex' => '1F630' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿ˜…', 'iOS7' => '', 'Hex' => '1F605'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ˜“', + 'iOS7' => '', + 'Hex' => '1F613' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿ˜ฉ', 'iOS7' => '', 'Hex' => '1F629'), + array('iOS2' => '', 'iOS5' => '๐Ÿ˜ซ', 'iOS7' => '', 'Hex' => '1F62B'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ˜จ', + 'iOS7' => '', + 'Hex' => '1F628' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ˜ฑ', + 'iOS7' => '', + 'Hex' => '1F631' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ˜ ', + 'iOS7' => '', + 'Hex' => '1F620' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ˜ก', + 'iOS7' => '', + 'Hex' => '1F621' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿ˜ค', 'iOS7' => '', 'Hex' => '1F624'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ˜–', + 'iOS7' => '', + 'Hex' => '1F616' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿ˜†', 'iOS7' => '', 'Hex' => '1F606'), + array('iOS2' => '', 'iOS5' => '๐Ÿ˜‹', 'iOS7' => '', 'Hex' => '1F60B'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ˜ท', + 'iOS7' => '', + 'Hex' => '1F637' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿ˜Ž', 'iOS7' => '', 'Hex' => '1F60E'), + array('iOS2' => '', 'iOS5' => '๐Ÿ˜ด', 'iOS7' => '', 'Hex' => '1F634'), + array('iOS2' => '', 'iOS5' => '๐Ÿ˜ต', 'iOS7' => '', 'Hex' => '1F635'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ˜ฒ', + 'iOS7' => '', + 'Hex' => '1F632' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿ˜Ÿ', 'iOS7' => '', 'Hex' => '1F61F'), + array('iOS2' => '', 'iOS5' => '๐Ÿ˜ฆ', 'iOS7' => '', 'Hex' => '1F626'), + array('iOS2' => '', 'iOS5' => '๐Ÿ˜ง', 'iOS7' => '', 'Hex' => '1F627'), + array('iOS2' => '', 'iOS5' => '๐Ÿ˜ˆ', 'iOS7' => '', 'Hex' => '1F608'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ‘ฟ', + 'iOS7' => '', + 'Hex' => '1F47F' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿ˜ฎ', 'iOS7' => '', 'Hex' => '1F62E'), + array('iOS2' => '', 'iOS5' => '๐Ÿ˜ฌ', 'iOS7' => '', 'Hex' => '1F62C'), + array('iOS2' => '', 'iOS5' => '๐Ÿ˜', 'iOS7' => '', 'Hex' => '1F610'), + array('iOS2' => '', 'iOS5' => '๐Ÿ˜•', 'iOS7' => '', 'Hex' => '1F615'), + array('iOS2' => '', 'iOS5' => '๐Ÿ˜ฏ', 'iOS7' => '', 'Hex' => '1F62F'), + array('iOS2' => '', 'iOS5' => '๐Ÿ˜ถ', 'iOS7' => '', 'Hex' => '1F636'), + array('iOS2' => '', 'iOS5' => '๐Ÿ˜‡', 'iOS7' => '', 'Hex' => '1F607'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ˜', + 'iOS7' => '', + 'Hex' => '1F60F' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿ˜‘', 'iOS7' => '', 'Hex' => '1F611'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ‘ฒ', + 'iOS7' => '', + 'Hex' => '1F472' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ‘ณ', + 'iOS7' => '', + 'Hex' => '1F473' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ‘ฎ', + 'iOS7' => '', + 'Hex' => '1F46E' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ‘ท', + 'iOS7' => '', + 'Hex' => '1F477' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ’‚', + 'iOS7' => '', + 'Hex' => '1F482' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ‘ถ', + 'iOS7' => '', + 'Hex' => '1F476' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ‘ฆ', + 'iOS7' => '', + 'Hex' => '1F466' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ‘ง', + 'iOS7' => '', + 'Hex' => '1F467' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ‘จ', + 'iOS7' => '', + 'Hex' => '1F468' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ‘ฉ', + 'iOS7' => '', + 'Hex' => '1F469' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ‘ด', + 'iOS7' => '', + 'Hex' => '1F474' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ‘ต', + 'iOS7' => '', + 'Hex' => '1F475' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ‘ฑ', + 'iOS7' => '', + 'Hex' => '1F471' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ‘ผ', + 'iOS7' => '', + 'Hex' => '1F47C' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ‘ธ', + 'iOS7' => '', + 'Hex' => '1F478' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿ˜บ', 'iOS7' => '', 'Hex' => '1F63A'), + array('iOS2' => '', 'iOS5' => '๐Ÿ˜ธ', 'iOS7' => '', 'Hex' => '1F638'), + array('iOS2' => '', 'iOS5' => '๐Ÿ˜ป', 'iOS7' => '', 'Hex' => '1F63B'), + array('iOS2' => '', 'iOS5' => '๐Ÿ˜ฝ', 'iOS7' => '', 'Hex' => '1F63D'), + array('iOS2' => '', 'iOS5' => '๐Ÿ˜ผ', 'iOS7' => '', 'Hex' => '1F63C'), + array('iOS2' => '', 'iOS5' => '๐Ÿ™€', 'iOS7' => '', 'Hex' => '1F640'), + array('iOS2' => '', 'iOS5' => '๐Ÿ˜ฟ', 'iOS7' => '', 'Hex' => '1F63F'), + array('iOS2' => '', 'iOS5' => '๐Ÿ˜น', 'iOS7' => '', 'Hex' => '1F639'), + array('iOS2' => '', 'iOS5' => '๐Ÿ˜พ', 'iOS7' => '', 'Hex' => '1F63E'), + array('iOS2' => '', 'iOS5' => '๐Ÿ‘น', 'iOS7' => '', 'Hex' => '1F479'), + array('iOS2' => '', 'iOS5' => '๐Ÿ‘บ', 'iOS7' => '', 'Hex' => '1F47A'), + array('iOS2' => '', 'iOS5' => '๐Ÿ™ˆ', 'iOS7' => '', 'Hex' => '1F648'), + array('iOS2' => '', 'iOS5' => '๐Ÿ™‰', 'iOS7' => '', 'Hex' => '1F649'), + array('iOS2' => '', 'iOS5' => '๐Ÿ™Š', 'iOS7' => '', 'Hex' => '1F64A'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ’€', + 'iOS7' => '', + 'Hex' => '1F480' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ‘ฝ', + 'iOS7' => '', + 'Hex' => '1F47D' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ’ฉ', + 'iOS7' => '', + 'Hex' => '1F4A9' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ”ฅ', + 'iOS7' => '', + 'Hex' => '1F525' + ), + array('iOS2' => '', 'iOS5' => 'โœจ', 'iOS7' => '', 'Hex' => '2728'), + array( + 'iOS2' => '', + 'iOS5' => '๐ŸŒŸ', + 'iOS7' => '', + 'Hex' => '1F31F' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿ’ซ', 'iOS7' => '', 'Hex' => '1F4AB'), + array('iOS2' => '', 'iOS5' => '๐Ÿ’ฅ', 'iOS7' => '', 'Hex' => '1F4A5'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ’ข', + 'iOS7' => '', + 'Hex' => '1F4A2' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ’ฆ', + 'iOS7' => '', + 'Hex' => '1F4A6' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿ’ง', 'iOS7' => '', 'Hex' => '1F4A7'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ’ค', + 'iOS7' => '', + 'Hex' => '1F4A4' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ’จ', + 'iOS7' => '', + 'Hex' => '1F4A8' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ‘‚', + 'iOS7' => '', + 'Hex' => '1F442' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ‘€', + 'iOS7' => '', + 'Hex' => '1F440' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ‘ƒ', + 'iOS7' => '', + 'Hex' => '1F443' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿ‘…', 'iOS7' => '', 'Hex' => '1F445'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ‘„', + 'iOS7' => '', + 'Hex' => '1F444' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ‘', + 'iOS7' => '', + 'Hex' => '1F44D' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ‘Ž', + 'iOS7' => '', + 'Hex' => '1F44E' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ‘Œ', + 'iOS7' => '', + 'Hex' => '1F44C' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ‘Š', + 'iOS7' => '', + 'Hex' => '1F44A' + ), + array('iOS2' => '', 'iOS5' => 'โœŠ', 'iOS7' => '', 'Hex' => '270A'), + array( + 'iOS2' => '', + 'iOS5' => 'โœŒ', + 'iOS7' => 'โœŒ๏ธ', + 'Hex' => '270C' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ‘‹', + 'iOS7' => '', + 'Hex' => '1F44B' + ), + array('iOS2' => '', 'iOS5' => 'โœ‹', 'iOS7' => '', 'Hex' => '270B'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ‘', + 'iOS7' => '', + 'Hex' => '1F450' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ‘†', + 'iOS7' => '', + 'Hex' => '1F446' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ‘‡', + 'iOS7' => '', + 'Hex' => '1F447' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ‘‰', + 'iOS7' => '', + 'Hex' => '1F449' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ‘ˆ', + 'iOS7' => '', + 'Hex' => '1F448' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ™Œ', + 'iOS7' => '', + 'Hex' => '1F64C' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ™', + 'iOS7' => '', + 'Hex' => '1F64F' + ), + array( + 'iOS2' => '', + 'iOS5' => 'โ˜', + 'iOS7' => 'โ˜๏ธ', + 'Hex' => '261D' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ‘', + 'iOS7' => '', + 'Hex' => '1F44F' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ’ช', + 'iOS7' => '', + 'Hex' => '1F4AA' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿšถ', + 'iOS7' => '', + 'Hex' => '1F6B6' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿƒ', + 'iOS7' => '', + 'Hex' => '1F3C3' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ’ƒ', + 'iOS7' => '', + 'Hex' => '1F483' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ‘ซ', + 'iOS7' => '', + 'Hex' => '1F46B' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿ‘ช', 'iOS7' => '', 'Hex' => '1F46A'), + array('iOS2' => '', 'iOS5' => '๐Ÿ‘ฌ', 'iOS7' => '', 'Hex' => '1F46C'), + array('iOS2' => '', 'iOS5' => '๐Ÿ‘ญ', 'iOS7' => '', 'Hex' => '1F46D'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ’', + 'iOS7' => '', + 'Hex' => '1F48F' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ’‘', + 'iOS7' => '', + 'Hex' => '1F491' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ‘ฏ', + 'iOS7' => '', + 'Hex' => '1F46F' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ™†', + 'iOS7' => '', + 'Hex' => '1F646' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ™…', + 'iOS7' => '', + 'Hex' => '1F645' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ’', + 'iOS7' => '', + 'Hex' => '1F481' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿ™‹', 'iOS7' => '', 'Hex' => '1F64B'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ’†', + 'iOS7' => '', + 'Hex' => '1F486' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ’‡', + 'iOS7' => '', + 'Hex' => '1F487' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ’…', + 'iOS7' => '', + 'Hex' => '1F485' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿ‘ฐ', 'iOS7' => '', 'Hex' => '1F470'), + array('iOS2' => '', 'iOS5' => '๐Ÿ™Ž', 'iOS7' => '', 'Hex' => '1F64E'), + array('iOS2' => '', 'iOS5' => '๐Ÿ™', 'iOS7' => '', 'Hex' => '1F64D'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ™‡', + 'iOS7' => '', + 'Hex' => '1F647' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐ŸŽฉ', + 'iOS7' => '', + 'Hex' => '1F3A9' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ‘‘', + 'iOS7' => '', + 'Hex' => '1F451' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ‘’', + 'iOS7' => '', + 'Hex' => '1F452' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ‘Ÿ', + 'iOS7' => '', + 'Hex' => '1F45F' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿ‘ž', 'iOS7' => '', 'Hex' => '1F45E'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ‘ก', + 'iOS7' => '', + 'Hex' => '1F461' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ‘ ', + 'iOS7' => '', + 'Hex' => '1F460' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ‘ข', + 'iOS7' => '', + 'Hex' => '1F462' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ‘•', + 'iOS7' => '', + 'Hex' => '1F455' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ‘”', + 'iOS7' => '', + 'Hex' => '1F454' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿ‘š', 'iOS7' => '', 'Hex' => '1F45A'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ‘—', + 'iOS7' => '', + 'Hex' => '1F457' + ), + array('iOS2' => '', 'iOS5' => '๐ŸŽฝ', 'iOS7' => '', 'Hex' => '1F3BD'), + array('iOS2' => '', 'iOS5' => '๐Ÿ‘–', 'iOS7' => '', 'Hex' => '1F456'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ‘˜', + 'iOS7' => '', + 'Hex' => '1F458' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ‘™', + 'iOS7' => '', + 'Hex' => '1F459' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ’ผ', + 'iOS7' => '', + 'Hex' => '1F4BC' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ‘œ', + 'iOS7' => '', + 'Hex' => '1F45C' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿ‘', 'iOS7' => '', 'Hex' => '1F45D'), + array('iOS2' => '', 'iOS5' => '๐Ÿ‘›', 'iOS7' => '', 'Hex' => '1F45B'), + array('iOS2' => '', 'iOS5' => '๐Ÿ‘“', 'iOS7' => '', 'Hex' => '1F453'), + array( + 'iOS2' => '', + 'iOS5' => '๐ŸŽ€', + 'iOS7' => '', + 'Hex' => '1F380' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐ŸŒ‚', + 'iOS7' => '', + 'Hex' => '1F302' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ’„', + 'iOS7' => '', + 'Hex' => '1F484' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ’›', + 'iOS7' => '', + 'Hex' => '1F49B' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ’™', + 'iOS7' => '', + 'Hex' => '1F499' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ’œ', + 'iOS7' => '', + 'Hex' => '1F49C' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ’š', + 'iOS7' => '', + 'Hex' => '1F49A' + ), + array( + 'iOS2' => '', + 'iOS5' => 'โค', + 'iOS7' => 'โค๏ธ', + 'Hex' => '2764' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ’”', + 'iOS7' => '', + 'Hex' => '1F494' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ’—', + 'iOS7' => '', + 'Hex' => '1F497' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ’“', + 'iOS7' => '', + 'Hex' => '1F493' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿ’•', 'iOS7' => '', 'Hex' => '1F495'), + array('iOS2' => '', 'iOS5' => '๐Ÿ’–', 'iOS7' => '', 'Hex' => '1F496'), + array('iOS2' => '', 'iOS5' => '๐Ÿ’ž', 'iOS7' => '', 'Hex' => '1F49E'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ’˜', + 'iOS7' => '', + 'Hex' => '1F498' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿ’Œ', 'iOS7' => '', 'Hex' => '1F48C'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ’‹', + 'iOS7' => '', + 'Hex' => '1F48B' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ’', + 'iOS7' => '', + 'Hex' => '1F48D' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ’Ž', + 'iOS7' => '', + 'Hex' => '1F48E' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿ‘ค', 'iOS7' => '', 'Hex' => '1F464'), + array('iOS2' => '', 'iOS5' => '๐Ÿ‘ฅ', 'iOS7' => '', 'Hex' => '1F465'), + array('iOS2' => '', 'iOS5' => '๐Ÿ’ฌ', 'iOS7' => '', 'Hex' => '1F4AC'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ‘ฃ', + 'iOS7' => '', + 'Hex' => '1F463' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿ’ญ', 'iOS7' => '', 'Hex' => '1F4AD'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ ', + 'iOS7' => '', + 'Hex' => '1F3E0' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿก', 'iOS7' => '', 'Hex' => '1F3E1'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿซ', + 'iOS7' => '', + 'Hex' => '1F3EB' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿข', + 'iOS7' => '', + 'Hex' => '1F3E2' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿฃ', + 'iOS7' => '', + 'Hex' => '1F3E3' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿฅ', + 'iOS7' => '', + 'Hex' => '1F3E5' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿฆ', + 'iOS7' => '', + 'Hex' => '1F3E6' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿช', + 'iOS7' => '', + 'Hex' => '1F3EA' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿฉ', + 'iOS7' => '', + 'Hex' => '1F3E9' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿจ', + 'iOS7' => '', + 'Hex' => '1F3E8' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ’’', + 'iOS7' => '', + 'Hex' => '1F492' + ), + array( + 'iOS2' => '', + 'iOS5' => 'โ›ช', + 'iOS7' => 'โ›ช๏ธ', + 'Hex' => '26EA' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿฌ', + 'iOS7' => '', + 'Hex' => '1F3EC' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿค', 'iOS7' => '', 'Hex' => '1F3E4'), + array( + 'iOS2' => '', + 'iOS5' => '๐ŸŒ‡', + 'iOS7' => '', + 'Hex' => '1F307' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐ŸŒ†', + 'iOS7' => '', + 'Hex' => '1F306' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿฏ', + 'iOS7' => '', + 'Hex' => '1F3EF' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿฐ', + 'iOS7' => '', + 'Hex' => '1F3F0' + ), + array( + 'iOS2' => '', + 'iOS5' => 'โ›บ', + 'iOS7' => 'โ›บ๏ธ', + 'Hex' => '26FA' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿญ', + 'iOS7' => '', + 'Hex' => '1F3ED' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ—ผ', + 'iOS7' => '', + 'Hex' => '1F5FC' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿ—พ', 'iOS7' => '', 'Hex' => '1F5FE'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ—ป', + 'iOS7' => '', + 'Hex' => '1F5FB' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐ŸŒ„', + 'iOS7' => '', + 'Hex' => '1F304' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐ŸŒ…', + 'iOS7' => '', + 'Hex' => '1F305' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐ŸŒƒ', + 'iOS7' => '', + 'Hex' => '1F303' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ—ฝ', + 'iOS7' => '', + 'Hex' => '1F5FD' + ), + array('iOS2' => '', 'iOS5' => '๐ŸŒ‰', 'iOS7' => '', 'Hex' => '1F309'), + array('iOS2' => '', 'iOS5' => '๐ŸŽ ', 'iOS7' => '', 'Hex' => '1F3A0'), + array( + 'iOS2' => '', + 'iOS5' => '๐ŸŽก', + 'iOS7' => '', + 'Hex' => '1F3A1' + ), + array( + 'iOS2' => '', + 'iOS5' => 'โ›ฒ', + 'iOS7' => 'โ›ฒ๏ธ', + 'Hex' => '26F2' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐ŸŽข', + 'iOS7' => '', + 'Hex' => '1F3A2' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿšข', + 'iOS7' => '', + 'Hex' => '1F6A2' + ), + array( + 'iOS2' => '', + 'iOS5' => 'โ›ต', + 'iOS7' => 'โ›ต๏ธ', + 'Hex' => '26F5' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿšค', + 'iOS7' => '', + 'Hex' => '1F6A4' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿšฃ', 'iOS7' => '', 'Hex' => '1F6A3'), + array('iOS2' => '', 'iOS5' => 'โš“', 'iOS7' => 'โš“๏ธ', 'Hex' => '2693'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿš€', + 'iOS7' => '', + 'Hex' => '1F680' + ), + array( + 'iOS2' => '', + 'iOS5' => 'โœˆ', + 'iOS7' => 'โœˆ๏ธ', + 'Hex' => '2708' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ’บ', + 'iOS7' => '', + 'Hex' => '1F4BA' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿš', 'iOS7' => '', 'Hex' => '1F681'), + array('iOS2' => '', 'iOS5' => '๐Ÿš‚', 'iOS7' => '', 'Hex' => '1F682'), + array('iOS2' => '', 'iOS5' => '๐ŸšŠ', 'iOS7' => '', 'Hex' => '1F68A'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿš‰', + 'iOS7' => '', + 'Hex' => '1F689' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿšž', 'iOS7' => '', 'Hex' => '1F69E'), + array('iOS2' => '', 'iOS5' => '๐Ÿš†', 'iOS7' => '', 'Hex' => '1F686'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿš„', + 'iOS7' => '', + 'Hex' => '1F684' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿš…', + 'iOS7' => '', + 'Hex' => '1F685' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿšˆ', 'iOS7' => '', 'Hex' => '1F688'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿš‡', + 'iOS7' => '', + 'Hex' => '1F687' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿš', 'iOS7' => '', 'Hex' => '1F69D'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿš‹', + 'iOS7' => '', + 'Hex' => '1F68B' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿšƒ', 'iOS7' => '', 'Hex' => '1F683'), + array('iOS2' => '', 'iOS5' => '๐ŸšŽ', 'iOS7' => '', 'Hex' => '1F68E'), + array( + 'iOS2' => '', + 'iOS5' => '๐ŸšŒ', + 'iOS7' => '', + 'Hex' => '1F68C' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿš', 'iOS7' => '', 'Hex' => '1F68D'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿš™', + 'iOS7' => '', + 'Hex' => '1F699' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿš˜', 'iOS7' => '', 'Hex' => '1F698'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿš—', + 'iOS7' => '', + 'Hex' => '1F697' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿš•', + 'iOS7' => '', + 'Hex' => '1F695' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿš–', 'iOS7' => '', 'Hex' => '1F696'), + array('iOS2' => '', 'iOS5' => '๐Ÿš›', 'iOS7' => '', 'Hex' => '1F69B'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿšš', + 'iOS7' => '', + 'Hex' => '1F69A' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿšจ', 'iOS7' => '', 'Hex' => '1F6A8'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿš“', + 'iOS7' => '', + 'Hex' => '1F693' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿš”', 'iOS7' => '', 'Hex' => '1F694'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿš’', + 'iOS7' => '', + 'Hex' => '1F692' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿš‘', + 'iOS7' => '', + 'Hex' => '1F691' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿš', 'iOS7' => '', 'Hex' => '1F690'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿšฒ', + 'iOS7' => '', + 'Hex' => '1F6B2' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿšก', 'iOS7' => '', 'Hex' => '1F6A1'), + array('iOS2' => '', 'iOS5' => '๐ŸšŸ', 'iOS7' => '', 'Hex' => '1F69F'), + array('iOS2' => '', 'iOS5' => '๐Ÿš ', 'iOS7' => '', 'Hex' => '1F6A0'), + array('iOS2' => '', 'iOS5' => '๐Ÿšœ', 'iOS7' => '', 'Hex' => '1F69C'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ’ˆ', + 'iOS7' => '', + 'Hex' => '1F488' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿš', + 'iOS7' => '', + 'Hex' => '1F68F' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐ŸŽซ', + 'iOS7' => '', + 'Hex' => '1F3AB' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿšฆ', 'iOS7' => '', 'Hex' => '1F6A6'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿšฅ', + 'iOS7' => '', + 'Hex' => '1F6A5' + ), + array( + 'iOS2' => '', + 'iOS5' => 'โš ', + 'iOS7' => 'โš ๏ธ', + 'Hex' => '26A0' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿšง', + 'iOS7' => '', + 'Hex' => '1F6A7' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ”ฐ', + 'iOS7' => '', + 'Hex' => '1F530' + ), + array( + 'iOS2' => '', + 'iOS5' => 'โ›ฝ', + 'iOS7' => 'โ›ฝ๏ธ', + 'Hex' => '26FD' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿฎ', 'iOS7' => '', 'Hex' => '1F3EE'), + array( + 'iOS2' => '', + 'iOS5' => '๐ŸŽฐ', + 'iOS7' => '', + 'Hex' => '1F3B0' + ), + array( + 'iOS2' => '', + 'iOS5' => 'โ™จ', + 'iOS7' => 'โ™จ๏ธ', + 'Hex' => '2668' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿ—ฟ', 'iOS7' => '', 'Hex' => '1F5FF'), + array('iOS2' => '', 'iOS5' => '๐ŸŽช', 'iOS7' => '', 'Hex' => '1F3AA'), + array('iOS2' => '', 'iOS5' => '๐ŸŽญ', 'iOS7' => '', 'Hex' => '1F3AD'), + array('iOS2' => '', 'iOS5' => '๐Ÿ“', 'iOS7' => '', 'Hex' => '1F4CD'), + array('iOS2' => '', 'iOS5' => '๐Ÿšฉ', 'iOS7' => '', 'Hex' => '1F6A9'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ‡ฏ๐Ÿ‡ต', + 'iOS7' => '', + 'Hex' => '1F1EF_1F1F5' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ‡ฐ๐Ÿ‡ท', + 'iOS7' => '', + 'Hex' => '1F1F0_1F1F7' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ‡ฉ๐Ÿ‡ช', + 'iOS7' => '', + 'Hex' => '1F1E9_1F1EA' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ‡จ๐Ÿ‡ณ', + 'iOS7' => '', + 'Hex' => '1F1E8_1F1F3' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ‡บ๐Ÿ‡ธ', + 'iOS7' => '', + 'Hex' => '1F1FA_1F1F8' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ‡ซ๐Ÿ‡ท', + 'iOS7' => '', + 'Hex' => '1F1EB_1F1F7' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ‡ช๐Ÿ‡ธ', + 'iOS7' => '', + 'Hex' => '1F1EA_1F1F8' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ‡ฎ๐Ÿ‡น', + 'iOS7' => '', + 'Hex' => '1F1EE_1F1F9' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ‡ท๐Ÿ‡บ', + 'iOS7' => '', + 'Hex' => '1F1F7_1F1FA' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ‡ฌ๐Ÿ‡ง', + 'iOS7' => '', + 'Hex' => '1F1EC_1F1E7' + ), + array( + 'iOS2' => '', + 'iOS5' => '', + 'iOS7' => '', + 'Hex' => '' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿถ', + 'iOS7' => '', + 'Hex' => '1F436' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿบ', + 'iOS7' => '', + 'Hex' => '1F43A' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿฑ', + 'iOS7' => '', + 'Hex' => '1F431' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿญ', + 'iOS7' => '', + 'Hex' => '1F42D' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿน', + 'iOS7' => '', + 'Hex' => '1F439' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿฐ', + 'iOS7' => '', + 'Hex' => '1F430' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿธ', + 'iOS7' => '', + 'Hex' => '1F438' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿฏ', + 'iOS7' => '', + 'Hex' => '1F42F' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿจ', + 'iOS7' => '', + 'Hex' => '1F428' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿป', + 'iOS7' => '', + 'Hex' => '1F43B' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿท', + 'iOS7' => '', + 'Hex' => '1F437' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿฝ', 'iOS7' => '', 'Hex' => '1F43D'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿฎ', + 'iOS7' => '', + 'Hex' => '1F42E' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ—', + 'iOS7' => '', + 'Hex' => '1F417' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿต', + 'iOS7' => '', + 'Hex' => '1F435' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ’', + 'iOS7' => '', + 'Hex' => '1F412' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿด', + 'iOS7' => '', + 'Hex' => '1F434' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ‘', + 'iOS7' => '', + 'Hex' => '1F411' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ˜', + 'iOS7' => '', + 'Hex' => '1F418' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿผ', 'iOS7' => '', 'Hex' => '1F43C'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿง', + 'iOS7' => '', + 'Hex' => '1F427' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿฆ', + 'iOS7' => '', + 'Hex' => '1F426' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿค', + 'iOS7' => '', + 'Hex' => '1F424' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿฅ', 'iOS7' => '', 'Hex' => '1F425'), + array('iOS2' => '', 'iOS5' => '๐Ÿฃ', 'iOS7' => '', 'Hex' => '1F423'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ”', + 'iOS7' => '', + 'Hex' => '1F414' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ', + 'iOS7' => '', + 'Hex' => '1F40D' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿข', 'iOS7' => '', 'Hex' => '1F422'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ›', + 'iOS7' => '', + 'Hex' => '1F41B' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿ', 'iOS7' => '', 'Hex' => '1F41D'), + array('iOS2' => '', 'iOS5' => '๐Ÿœ', 'iOS7' => '', 'Hex' => '1F41C'), + array('iOS2' => '', 'iOS5' => '๐Ÿž', 'iOS7' => '', 'Hex' => '1F41E'), + array('iOS2' => '', 'iOS5' => '๐ŸŒ', 'iOS7' => '', 'Hex' => '1F40C'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ™', + 'iOS7' => '', + 'Hex' => '1F419' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿš', + 'iOS7' => '', + 'Hex' => '1F41A' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ ', + 'iOS7' => '', + 'Hex' => '1F420' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐ŸŸ', + 'iOS7' => '', + 'Hex' => '1F41F' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿฌ', + 'iOS7' => '', + 'Hex' => '1F42C' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿณ', + 'iOS7' => '', + 'Hex' => '1F433' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿ‹', 'iOS7' => '', 'Hex' => '1F40B'), + array('iOS2' => '', 'iOS5' => '๐Ÿ„', 'iOS7' => '', 'Hex' => '1F404'), + array('iOS2' => '', 'iOS5' => '๐Ÿ', 'iOS7' => '', 'Hex' => '1F40F'), + array('iOS2' => '', 'iOS5' => '๐Ÿ€', 'iOS7' => '', 'Hex' => '1F400'), + array('iOS2' => '', 'iOS5' => '๐Ÿƒ', 'iOS7' => '', 'Hex' => '1F403'), + array('iOS2' => '', 'iOS5' => '๐Ÿ…', 'iOS7' => '', 'Hex' => '1F405'), + array('iOS2' => '', 'iOS5' => '๐Ÿ‡', 'iOS7' => '', 'Hex' => '1F407'), + array('iOS2' => '', 'iOS5' => '๐Ÿ‰', 'iOS7' => '', 'Hex' => '1F409'), + array( + 'iOS2' => '', + 'iOS5' => '๐ŸŽ', + 'iOS7' => '', + 'Hex' => '1F40E' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿ', 'iOS7' => '', 'Hex' => '1F410'), + array('iOS2' => '', 'iOS5' => '๐Ÿ“', 'iOS7' => '', 'Hex' => '1F413'), + array('iOS2' => '', 'iOS5' => '๐Ÿ•', 'iOS7' => '', 'Hex' => '1F415'), + array('iOS2' => '', 'iOS5' => '๐Ÿ–', 'iOS7' => '', 'Hex' => '1F416'), + array('iOS2' => '', 'iOS5' => '๐Ÿ', 'iOS7' => '', 'Hex' => '1F401'), + array('iOS2' => '', 'iOS5' => '๐Ÿ‚', 'iOS7' => '', 'Hex' => '1F402'), + array('iOS2' => '', 'iOS5' => '๐Ÿฒ', 'iOS7' => '', 'Hex' => '1F432'), + array('iOS2' => '', 'iOS5' => '๐Ÿก', 'iOS7' => '', 'Hex' => '1F421'), + array('iOS2' => '', 'iOS5' => '๐ŸŠ', 'iOS7' => '', 'Hex' => '1F40A'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿซ', + 'iOS7' => '', + 'Hex' => '1F42B' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿช', 'iOS7' => '', 'Hex' => '1F42A'), + array('iOS2' => '', 'iOS5' => '๐Ÿ†', 'iOS7' => '', 'Hex' => '1F406'), + array('iOS2' => '', 'iOS5' => '๐Ÿˆ', 'iOS7' => '', 'Hex' => '1F408'), + array('iOS2' => '', 'iOS5' => '๐Ÿฉ', 'iOS7' => '', 'Hex' => '1F429'), + array('iOS2' => '', 'iOS5' => '๐Ÿพ', 'iOS7' => '', 'Hex' => '1F43E'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ’', + 'iOS7' => '', + 'Hex' => '1F490' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐ŸŒธ', + 'iOS7' => '', + 'Hex' => '1F338' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐ŸŒท', + 'iOS7' => '', + 'Hex' => '1F337' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ€', + 'iOS7' => '', + 'Hex' => '1F340' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐ŸŒน', + 'iOS7' => '', + 'Hex' => '1F339' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐ŸŒป', + 'iOS7' => '', + 'Hex' => '1F33B' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐ŸŒบ', + 'iOS7' => '', + 'Hex' => '1F33A' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ', + 'iOS7' => '', + 'Hex' => '1F341' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿƒ', + 'iOS7' => '', + 'Hex' => '1F343' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ‚', + 'iOS7' => '', + 'Hex' => '1F342' + ), + array('iOS2' => '', 'iOS5' => '๐ŸŒฟ', 'iOS7' => '', 'Hex' => '1F33F'), + array( + 'iOS2' => '', + 'iOS5' => '๐ŸŒพ', + 'iOS7' => '', + 'Hex' => '1F33E' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿ„', 'iOS7' => '', 'Hex' => '1F344'), + array( + 'iOS2' => '', + 'iOS5' => '๐ŸŒต', + 'iOS7' => '', + 'Hex' => '1F335' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐ŸŒด', + 'iOS7' => '', + 'Hex' => '1F334' + ), + array('iOS2' => '', 'iOS5' => '๐ŸŒฒ', 'iOS7' => '', 'Hex' => '1F332'), + array('iOS2' => '', 'iOS5' => '๐ŸŒณ', 'iOS7' => '', 'Hex' => '1F333'), + array('iOS2' => '', 'iOS5' => '๐ŸŒฐ', 'iOS7' => '', 'Hex' => '1F330'), + array('iOS2' => '', 'iOS5' => '๐ŸŒฑ', 'iOS7' => '', 'Hex' => '1F331'), + array('iOS2' => '', 'iOS5' => '๐ŸŒผ', 'iOS7' => '', 'Hex' => '1F33C'), + array('iOS2' => '', 'iOS5' => '๐ŸŒ', 'iOS7' => '', 'Hex' => '1F310'), + array('iOS2' => '', 'iOS5' => '๐ŸŒž', 'iOS7' => '', 'Hex' => '1F31E'), + array('iOS2' => '', 'iOS5' => '๐ŸŒ', 'iOS7' => '', 'Hex' => '1F31D'), + array('iOS2' => '', 'iOS5' => '๐ŸŒš', 'iOS7' => '', 'Hex' => '1F31A'), + array('iOS2' => '', 'iOS5' => '๐ŸŒ‘', 'iOS7' => '', 'Hex' => '1F311'), + array('iOS2' => '', 'iOS5' => '๐ŸŒ’', 'iOS7' => '', 'Hex' => '1F312'), + array('iOS2' => '', 'iOS5' => '๐ŸŒ“', 'iOS7' => '', 'Hex' => '1F313'), + array('iOS2' => '', 'iOS5' => '๐ŸŒ”', 'iOS7' => '', 'Hex' => '1F314'), + array('iOS2' => '', 'iOS5' => '๐ŸŒ•', 'iOS7' => '', 'Hex' => '1F315'), + array('iOS2' => '', 'iOS5' => '๐ŸŒ–', 'iOS7' => '', 'Hex' => '1F316'), + array('iOS2' => '', 'iOS5' => '๐ŸŒ—', 'iOS7' => '', 'Hex' => '1F317'), + array('iOS2' => '', 'iOS5' => '๐ŸŒ˜', 'iOS7' => '', 'Hex' => '1F318'), + array('iOS2' => '', 'iOS5' => '๐ŸŒœ', 'iOS7' => '', 'Hex' => '1F31C'), + array('iOS2' => '', 'iOS5' => '๐ŸŒ›', 'iOS7' => '', 'Hex' => '1F31B'), + array( + 'iOS2' => '', + 'iOS5' => '๐ŸŒ™', + 'iOS7' => '', + 'Hex' => '1F319' + ), + array('iOS2' => '', 'iOS5' => '๐ŸŒ', 'iOS7' => '', 'Hex' => '1F30D'), + array('iOS2' => '', 'iOS5' => '๐ŸŒŽ', 'iOS7' => '', 'Hex' => '1F30E'), + array('iOS2' => '', 'iOS5' => '๐ŸŒ', 'iOS7' => '', 'Hex' => '1F30F'), + array('iOS2' => '', 'iOS5' => '๐ŸŒ‹', 'iOS7' => '', 'Hex' => '1F30B'), + array('iOS2' => '', 'iOS5' => '๐ŸŒŒ', 'iOS7' => '', 'Hex' => '1F30C'), + array('iOS2' => '', 'iOS5' => '๐ŸŒ ', 'iOS7' => '', 'Hex' => '1F320'), + array('iOS2' => '', 'iOS5' => 'โญ', 'iOS7' => 'โญ๏ธ', 'Hex' => '2B50'), + array( + 'iOS2' => '', + 'iOS5' => 'โ˜€', + 'iOS7' => 'โ˜€๏ธ', + 'Hex' => '2600' + ), + array('iOS2' => '', 'iOS5' => 'โ›…', 'iOS7' => 'โ›…๏ธ', 'Hex' => '26C5'), + array( + 'iOS2' => '', + 'iOS5' => 'โ˜', + 'iOS7' => 'โ˜๏ธ', + 'Hex' => '2601' + ), + array( + 'iOS2' => '', + 'iOS5' => 'โšก', + 'iOS7' => 'โšก๏ธ', + 'Hex' => '26A1' + ), + array( + 'iOS2' => '', + 'iOS5' => 'โ˜”', + 'iOS7' => 'โ˜”๏ธ', + 'Hex' => '2614' + ), + array('iOS2' => '', 'iOS5' => 'โ„', 'iOS7' => 'โ„๏ธ', 'Hex' => '2744'), + array( + 'iOS2' => '', + 'iOS5' => 'โ›„', + 'iOS7' => 'โ›„๏ธ', + 'Hex' => '26C4' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐ŸŒ€', + 'iOS7' => '๐ŸŒ€', + 'Hex' => '1F300' + ), + array('iOS2' => '', 'iOS5' => '๐ŸŒ', 'iOS7' => '', 'Hex' => '1F301'), + array( + 'iOS2' => '', + 'iOS5' => '๐ŸŒˆ', + 'iOS7' => '', + 'Hex' => '1F308' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐ŸŒŠ', + 'iOS7' => '', + 'Hex' => '1F30A' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐ŸŽ', + 'iOS7' => '', + 'Hex' => '1F38D' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ’', + 'iOS7' => '', + 'Hex' => '1F49D' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐ŸŽŽ', + 'iOS7' => '', + 'Hex' => '1F38E' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐ŸŽ’', + 'iOS7' => '', + 'Hex' => '1F392' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐ŸŽ“', + 'iOS7' => '', + 'Hex' => '1F393' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐ŸŽ', + 'iOS7' => '', + 'Hex' => '1F38F' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐ŸŽ†', + 'iOS7' => '', + 'Hex' => '1F386' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐ŸŽ‡', + 'iOS7' => '', + 'Hex' => '1F387' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐ŸŽ', + 'iOS7' => '', + 'Hex' => '1F390' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐ŸŽ‘', + 'iOS7' => '', + 'Hex' => '1F391' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐ŸŽƒ', + 'iOS7' => '', + 'Hex' => '1F383' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ‘ป', + 'iOS7' => '', + 'Hex' => '1F47B' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐ŸŽ…', + 'iOS7' => '', + 'Hex' => '1F385' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐ŸŽ„', + 'iOS7' => '', + 'Hex' => '1F384' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐ŸŽ', + 'iOS7' => '', + 'Hex' => '1F381' + ), + array('iOS2' => '', 'iOS5' => '๐ŸŽ‹', 'iOS7' => '', 'Hex' => '1F38B'), + array( + 'iOS2' => '', + 'iOS5' => '๐ŸŽ‰', + 'iOS7' => '', + 'Hex' => '1F389' + ), + array('iOS2' => '', 'iOS5' => '๐ŸŽŠ', 'iOS7' => '', 'Hex' => '1F38A'), + array( + 'iOS2' => '', + 'iOS5' => '๐ŸŽˆ', + 'iOS7' => '', + 'Hex' => '1F388' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐ŸŽŒ', + 'iOS7' => '', + 'Hex' => '1F38C' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿ”ฎ', 'iOS7' => '', 'Hex' => '1F52E'), + array( + 'iOS2' => '', + 'iOS5' => '๐ŸŽฅ', + 'iOS7' => '', + 'Hex' => '1F3A5' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ“ท', + 'iOS7' => '', + 'Hex' => '1F4F7' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿ“น', 'iOS7' => '', 'Hex' => '1F4F9'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ“ผ', + 'iOS7' => '', + 'Hex' => '1F4FC' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ’ฟ', + 'iOS7' => '', + 'Hex' => '1F4BF' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ“€', + 'iOS7' => '', + 'Hex' => '1F4C0' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ’ฝ', + 'iOS7' => '', + 'Hex' => '1F4BD' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿ’พ', 'iOS7' => '', 'Hex' => '1F4BE'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ’ป', + 'iOS7' => '', + 'Hex' => '1F4BB' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ“ฑ', + 'iOS7' => '', + 'Hex' => '1F4F1' + ), + array( + 'iOS2' => '', + 'iOS5' => 'โ˜Ž', + 'iOS7' => 'โ˜Ž๏ธ', + 'Hex' => '260E' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿ“ž', 'iOS7' => '', 'Hex' => '1F4DE'), + array('iOS2' => '', 'iOS5' => '๐Ÿ“Ÿ', 'iOS7' => '', 'Hex' => '1F4DF'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ“ ', + 'iOS7' => '', + 'Hex' => '1F4E0' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ“ก', + 'iOS7' => '', + 'Hex' => '1F4E1' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ“บ', + 'iOS7' => '', + 'Hex' => '1F4FA' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ“ป', + 'iOS7' => '', + 'Hex' => '1F4FB' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿ”Š', 'iOS7' => '', 'Hex' => '1F50A'), + array('iOS2' => '', 'iOS5' => '๐Ÿ”‰', 'iOS7' => '', 'Hex' => '1F509'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ”ˆ', + 'iOS7' => '', + 'Hex' => '1F508' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿ”‡', 'iOS7' => '', 'Hex' => '1F507'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ””', + 'iOS7' => '', + 'Hex' => '1F514' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿ”•', 'iOS7' => '', 'Hex' => '1F515'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ“ข', + 'iOS7' => '', + 'Hex' => '1F4E2' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ“ฃ', + 'iOS7' => '', + 'Hex' => '1F4E3' + ), + array('iOS2' => '', 'iOS5' => 'โณ', 'iOS7' => '', 'Hex' => '23F3'), + array('iOS2' => '', 'iOS5' => 'โŒ›', 'iOS7' => 'โŒ›๏ธ', 'Hex' => '231B'), + array('iOS2' => '', 'iOS5' => 'โฐ', 'iOS7' => 'โฐ', 'Hex' => '23F0'), + array('iOS2' => '', 'iOS5' => 'โŒš', 'iOS7' => 'โŒš๏ธ', 'Hex' => '231A'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ”“', + 'iOS7' => '', + 'Hex' => '1F513' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ”’', + 'iOS7' => '', + 'Hex' => '1F512' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿ”', 'iOS7' => '', 'Hex' => '1F50F'), + array('iOS2' => '', 'iOS5' => '๐Ÿ”', 'iOS7' => '', 'Hex' => '1F510'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ”‘', + 'iOS7' => '', + 'Hex' => '1F511' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿ”Ž', 'iOS7' => '', 'Hex' => '1F50E'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ’ก', + 'iOS7' => '', + 'Hex' => '1F4A1' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿ”ฆ', 'iOS7' => '', 'Hex' => '1F526'), + array('iOS2' => '', 'iOS5' => '๐Ÿ”†', 'iOS7' => '', 'Hex' => '1F506'), + array('iOS2' => '', 'iOS5' => '๐Ÿ”…', 'iOS7' => '', 'Hex' => '1F505'), + array('iOS2' => '', 'iOS5' => '๐Ÿ”Œ', 'iOS7' => '', 'Hex' => '1F50C'), + array('iOS2' => '', 'iOS5' => '๐Ÿ”‹', 'iOS7' => '', 'Hex' => '1F50B'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ”', + 'iOS7' => '', + 'Hex' => '1F50D' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿ›', 'iOS7' => '', 'Hex' => '1F6C1'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ›€', + 'iOS7' => '', + 'Hex' => '1F6C0' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿšฟ', 'iOS7' => '', 'Hex' => '1F6BF'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿšฝ', + 'iOS7' => '', + 'Hex' => '1F6BD' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿ”ง', 'iOS7' => '', 'Hex' => '1F527'), + array('iOS2' => '', 'iOS5' => '๐Ÿ”ฉ', 'iOS7' => '', 'Hex' => '1F529'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ”จ', + 'iOS7' => '', + 'Hex' => '1F528' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿšช', 'iOS7' => '', 'Hex' => '1F6AA'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿšฌ', + 'iOS7' => '', + 'Hex' => '1F6AC' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ’ฃ', + 'iOS7' => '', + 'Hex' => '1F4A3' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ”ซ', + 'iOS7' => '', + 'Hex' => '1F52B' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿ”ช', 'iOS7' => '', 'Hex' => '1F52A'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ’Š', + 'iOS7' => '', + 'Hex' => '1F48A' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ’‰', + 'iOS7' => '', + 'Hex' => '1F489' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ’ฐ', + 'iOS7' => '', + 'Hex' => '1F4B0' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿ’ด', 'iOS7' => '', 'Hex' => '1F4B4'), + array('iOS2' => '', 'iOS5' => '๐Ÿ’ต', 'iOS7' => '', 'Hex' => '1F4B5'), + array('iOS2' => '', 'iOS5' => '๐Ÿ’ท', 'iOS7' => '', 'Hex' => '1F4B7'), + array('iOS2' => '', 'iOS5' => '๐Ÿ’ถ', 'iOS7' => '', 'Hex' => '1F4B6'), + array('iOS2' => '', 'iOS5' => '๐Ÿ’ณ', 'iOS7' => '', 'Hex' => '1F4B3'), + array('iOS2' => '', 'iOS5' => '๐Ÿ’ธ', 'iOS7' => '', 'Hex' => '1F4B8'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ“ฒ', + 'iOS7' => '', + 'Hex' => '1F4F2' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿ“ง', 'iOS7' => '', 'Hex' => '1F4E7'), + array('iOS2' => '', 'iOS5' => '๐Ÿ“ฅ', 'iOS7' => '', 'Hex' => '1F4E5'), + array('iOS2' => '', 'iOS5' => '๐Ÿ“ค', 'iOS7' => '', 'Hex' => '1F4E4'), + array('iOS2' => '', 'iOS5' => 'โœ‰', 'iOS7' => 'โœ‰๏ธ', 'Hex' => '2709'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ“ฉ', + 'iOS7' => '', + 'Hex' => '1F4E9' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿ“จ', 'iOS7' => '', 'Hex' => '1F4E8'), + array('iOS2' => '', 'iOS5' => '๐Ÿ“ฏ', 'iOS7' => '', 'Hex' => '1F4EF'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ“ซ', + 'iOS7' => '', + 'Hex' => '1F4EB' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿ“ช', 'iOS7' => '', 'Hex' => '1F4EA'), + array('iOS2' => '', 'iOS5' => '๐Ÿ“ฌ', 'iOS7' => '', 'Hex' => '1F4EC'), + array('iOS2' => '', 'iOS5' => '๐Ÿ“ญ', 'iOS7' => '', 'Hex' => '1F4ED'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ“ฎ', + 'iOS7' => '', + 'Hex' => '1F4EE' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿ“ฆ', 'iOS7' => '', 'Hex' => '1F4E6'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ“', + 'iOS7' => '', + 'Hex' => '1F4DD' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿ“„', 'iOS7' => '', 'Hex' => '1F4C4'), + array('iOS2' => '', 'iOS5' => '๐Ÿ“ƒ', 'iOS7' => '', 'Hex' => '1F4C3'), + array('iOS2' => '', 'iOS5' => '๐Ÿ“‘', 'iOS7' => '', 'Hex' => '1F4D1'), + array('iOS2' => '', 'iOS5' => '๐Ÿ“Š', 'iOS7' => '', 'Hex' => '1F4CA'), + array('iOS2' => '', 'iOS5' => '๐Ÿ“ˆ', 'iOS7' => '', 'Hex' => '1F4C8'), + array('iOS2' => '', 'iOS5' => '๐Ÿ“‰', 'iOS7' => '', 'Hex' => '1F4C9'), + array('iOS2' => '', 'iOS5' => '๐Ÿ“œ', 'iOS7' => '', 'Hex' => '1F4DC'), + array('iOS2' => '', 'iOS5' => '๐Ÿ“‹', 'iOS7' => '', 'Hex' => '1F4CB'), + array('iOS2' => '', 'iOS5' => '๐Ÿ“…', 'iOS7' => '', 'Hex' => '1F4C5'), + array('iOS2' => '', 'iOS5' => '๐Ÿ“†', 'iOS7' => '', 'Hex' => '1F4C6'), + array('iOS2' => '', 'iOS5' => '๐Ÿ“‡', 'iOS7' => '', 'Hex' => '1F4C7'), + array('iOS2' => '', 'iOS5' => '๐Ÿ“', 'iOS7' => '', 'Hex' => '1F4C1'), + array('iOS2' => '', 'iOS5' => '๐Ÿ“‚', 'iOS7' => '', 'Hex' => '1F4C2'), + array( + 'iOS2' => '', + 'iOS5' => 'โœ‚', + 'iOS7' => 'โœ‚๏ธ', + 'Hex' => '2702' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿ“Œ', 'iOS7' => '', 'Hex' => '1F4CC'), + array('iOS2' => '', 'iOS5' => '๐Ÿ“Ž', 'iOS7' => '', 'Hex' => '1F4CE'), + array('iOS2' => '', 'iOS5' => 'โœ’', 'iOS7' => 'โœ’๏ธ', 'Hex' => '2712'), + array('iOS2' => '', 'iOS5' => 'โœ', 'iOS7' => 'โœ๏ธ', 'Hex' => '270F'), + array('iOS2' => '', 'iOS5' => '๐Ÿ“', 'iOS7' => '', 'Hex' => '1F4CF'), + array('iOS2' => '', 'iOS5' => '๐Ÿ“', 'iOS7' => '', 'Hex' => '1F4D0'), + array('iOS2' => '', 'iOS5' => '๐Ÿ“•', 'iOS7' => '', 'Hex' => '1F4D5'), + array('iOS2' => '', 'iOS5' => '๐Ÿ“—', 'iOS7' => '', 'Hex' => '1F4D7'), + array('iOS2' => '', 'iOS5' => '๐Ÿ“˜', 'iOS7' => '', 'Hex' => '1F4D8'), + array('iOS2' => '', 'iOS5' => '๐Ÿ“™', 'iOS7' => '', 'Hex' => '1F4D9'), + array('iOS2' => '', 'iOS5' => '๐Ÿ““', 'iOS7' => '', 'Hex' => '1F4D3'), + array('iOS2' => '', 'iOS5' => '๐Ÿ“”', 'iOS7' => '', 'Hex' => '1F4D4'), + array('iOS2' => '', 'iOS5' => '๐Ÿ“’', 'iOS7' => '', 'Hex' => '1F4D2'), + array('iOS2' => '', 'iOS5' => '๐Ÿ“š', 'iOS7' => '', 'Hex' => '1F4DA'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ“–', + 'iOS7' => '', + 'Hex' => '1F4D6' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿ”–', 'iOS7' => '', 'Hex' => '1F516'), + array('iOS2' => '', 'iOS5' => '๐Ÿ“›', 'iOS7' => '', 'Hex' => '1F4DB'), + array('iOS2' => '', 'iOS5' => '๐Ÿ”ฌ', 'iOS7' => '', 'Hex' => '1F52C'), + array('iOS2' => '', 'iOS5' => '๐Ÿ”ญ', 'iOS7' => '', 'Hex' => '1F52D'), + array('iOS2' => '', 'iOS5' => '๐Ÿ“ฐ', 'iOS7' => '', 'Hex' => '1F4F0'), + array( + 'iOS2' => '', + 'iOS5' => '๐ŸŽจ', + 'iOS7' => '', + 'Hex' => '1F3A8' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐ŸŽฌ', + 'iOS7' => '', + 'Hex' => '1F3AC' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐ŸŽค', + 'iOS7' => '', + 'Hex' => '1F3A4' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐ŸŽง', + 'iOS7' => '', + 'Hex' => '1F3A7' + ), + array('iOS2' => '', 'iOS5' => '๐ŸŽผ', 'iOS7' => '', 'Hex' => '1F3BC'), + array( + 'iOS2' => '', + 'iOS5' => '๐ŸŽต', + 'iOS7' => '', + 'Hex' => '1F3B5' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐ŸŽถ', + 'iOS7' => '', + 'Hex' => '1F3B6' + ), + array('iOS2' => '', 'iOS5' => '๐ŸŽน', 'iOS7' => '', 'Hex' => '1F3B9'), + array('iOS2' => '', 'iOS5' => '๐ŸŽป', 'iOS7' => '', 'Hex' => '1F3BB'), + array( + 'iOS2' => '', + 'iOS5' => '๐ŸŽบ', + 'iOS7' => '', + 'Hex' => '1F3BA' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐ŸŽท', + 'iOS7' => '', + 'Hex' => '1F3B7' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐ŸŽธ', + 'iOS7' => '', + 'Hex' => '1F3B8' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ‘พ', + 'iOS7' => '', + 'Hex' => '1F47E' + ), + array('iOS2' => '', 'iOS5' => '๐ŸŽฎ', 'iOS7' => '', 'Hex' => '1F3AE'), + array('iOS2' => '', 'iOS5' => '๐Ÿƒ', 'iOS7' => '', 'Hex' => '1F0CF'), + array('iOS2' => '', 'iOS5' => '๐ŸŽด', 'iOS7' => '', 'Hex' => '1F3B4'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ€„', + 'iOS7' => '๐Ÿ€„๏ธ', + 'Hex' => '1F004' + ), + array('iOS2' => '', 'iOS5' => '๐ŸŽฒ', 'iOS7' => '', 'Hex' => '1F3B2'), + array( + 'iOS2' => '', + 'iOS5' => '๐ŸŽฏ', + 'iOS7' => '', + 'Hex' => '1F3AF' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿˆ', + 'iOS7' => '', + 'Hex' => '1F3C8' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ€', + 'iOS7' => '', + 'Hex' => '1F3C0' + ), + array( + 'iOS2' => '', + 'iOS5' => 'โšฝ', + 'iOS7' => 'โšฝ๏ธ', + 'Hex' => '26BD' + ), + array( + 'iOS2' => '', + 'iOS5' => 'โšพ', + 'iOS7' => 'โšพ๏ธ', + 'Hex' => '26BE' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐ŸŽพ', + 'iOS7' => '', + 'Hex' => '1F3BE' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐ŸŽฑ', + 'iOS7' => '', + 'Hex' => '1F3B1' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿ‰', 'iOS7' => '', 'Hex' => '1F3C9'), + array('iOS2' => '', 'iOS5' => '๐ŸŽณ', 'iOS7' => '', 'Hex' => '1F3B3'), + array( + 'iOS2' => '', + 'iOS5' => 'โ›ณ', + 'iOS7' => 'โ›ณ๏ธ', + 'Hex' => '26F3' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿšต', 'iOS7' => '', 'Hex' => '1F6B5'), + array('iOS2' => '', 'iOS5' => '๐Ÿšด', 'iOS7' => '', 'Hex' => '1F6B4'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ', + 'iOS7' => '', + 'Hex' => '1F3C1' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿ‡', 'iOS7' => '', 'Hex' => '1F3C7'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ†', + 'iOS7' => '', + 'Hex' => '1F3C6' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐ŸŽฟ', + 'iOS7' => '', + 'Hex' => '1F3BF' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿ‚', 'iOS7' => '', 'Hex' => '1F3C2'), + array( + 'iOS2' => '', + 'iOS5' => '๐ŸŠ', + 'iOS7' => '', + 'Hex' => '1F3CA' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ„', + 'iOS7' => '', + 'Hex' => '1F3C4' + ), + array('iOS2' => '', 'iOS5' => '๐ŸŽฃ', 'iOS7' => '', 'Hex' => '1F3A3'), + array( + 'iOS2' => '', + 'iOS5' => 'โ˜•', + 'iOS7' => 'โ˜•๏ธ', + 'Hex' => '2615' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿต', + 'iOS7' => '', + 'Hex' => '1F375' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿถ', + 'iOS7' => '', + 'Hex' => '1F376' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿผ', 'iOS7' => '', 'Hex' => '1F37C'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿบ', + 'iOS7' => '', + 'Hex' => '1F37A' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿป', + 'iOS7' => '', + 'Hex' => '1F37B' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿธ', + 'iOS7' => '', + 'Hex' => '1F378' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿน', 'iOS7' => '', 'Hex' => '1F379'), + array('iOS2' => '', 'iOS5' => '๐Ÿท', 'iOS7' => '', 'Hex' => '1F377'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿด', + 'iOS7' => '', + 'Hex' => '1F374' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿ•', 'iOS7' => '', 'Hex' => '1F355'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ”', + 'iOS7' => '', + 'Hex' => '1F354' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐ŸŸ', + 'iOS7' => '', + 'Hex' => '1F35F' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿ—', 'iOS7' => '', 'Hex' => '1F357'), + array('iOS2' => '', 'iOS5' => '๐Ÿ–', 'iOS7' => '', 'Hex' => '1F356'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ', + 'iOS7' => '', + 'Hex' => '1F35D' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ›', + 'iOS7' => '', + 'Hex' => '1F35B' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿค', 'iOS7' => '', 'Hex' => '1F364'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿฑ', + 'iOS7' => '', + 'Hex' => '1F371' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿฃ', + 'iOS7' => '', + 'Hex' => '1F363' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿฅ', 'iOS7' => '', 'Hex' => '1F365'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ™', + 'iOS7' => '', + 'Hex' => '1F359' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ˜', + 'iOS7' => '', + 'Hex' => '1F358' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿš', + 'iOS7' => '', + 'Hex' => '1F35A' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿœ', + 'iOS7' => '', + 'Hex' => '1F35C' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿฒ', + 'iOS7' => '', + 'Hex' => '1F372' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿข', + 'iOS7' => '', + 'Hex' => '1F362' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿก', + 'iOS7' => '', + 'Hex' => '1F361' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿณ', + 'iOS7' => '', + 'Hex' => '1F373' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿž', + 'iOS7' => '', + 'Hex' => '1F35E' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿฉ', 'iOS7' => '', 'Hex' => '1F369'), + array('iOS2' => '', 'iOS5' => '๐Ÿฎ', 'iOS7' => '', 'Hex' => '1F36E'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿฆ', + 'iOS7' => '', + 'Hex' => '1F366' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿจ', 'iOS7' => '', 'Hex' => '1F368'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿง', + 'iOS7' => '', + 'Hex' => '1F367' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐ŸŽ‚', + 'iOS7' => '', + 'Hex' => '1F382' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿฐ', + 'iOS7' => '', + 'Hex' => '1F370' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿช', 'iOS7' => '', 'Hex' => '1F36A'), + array('iOS2' => '', 'iOS5' => '๐Ÿซ', 'iOS7' => '', 'Hex' => '1F36B'), + array('iOS2' => '', 'iOS5' => '๐Ÿฌ', 'iOS7' => '', 'Hex' => '1F36C'), + array('iOS2' => '', 'iOS5' => '๐Ÿญ', 'iOS7' => '', 'Hex' => '1F36D'), + array('iOS2' => '', 'iOS5' => '๐Ÿฏ', 'iOS7' => '', 'Hex' => '1F36F'), + array( + 'iOS2' => '', + 'iOS5' => '๐ŸŽ', + 'iOS7' => '', + 'Hex' => '1F34E' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿ', 'iOS7' => '', 'Hex' => '1F34F'), + array( + 'iOS2' => '', + 'iOS5' => '๐ŸŠ', + 'iOS7' => '', + 'Hex' => '1F34A' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿ‹', 'iOS7' => '', 'Hex' => '1F34B'), + array('iOS2' => '', 'iOS5' => '๐Ÿ’', 'iOS7' => '', 'Hex' => '1F352'), + array('iOS2' => '', 'iOS5' => '๐Ÿ‡', 'iOS7' => '', 'Hex' => '1F347'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ‰', + 'iOS7' => '', + 'Hex' => '1F349' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ“', + 'iOS7' => '', + 'Hex' => '1F353' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿ‘', 'iOS7' => '', 'Hex' => '1F351'), + array('iOS2' => '', 'iOS5' => '๐Ÿˆ', 'iOS7' => '', 'Hex' => '1F348'), + array('iOS2' => '', 'iOS5' => '๐ŸŒ', 'iOS7' => '', 'Hex' => '1F34C'), + array('iOS2' => '', 'iOS5' => '๐Ÿ', 'iOS7' => '', 'Hex' => '1F350'), + array('iOS2' => '', 'iOS5' => '๐Ÿ', 'iOS7' => '', 'Hex' => '1F34D'), + array('iOS2' => '', 'iOS5' => '๐Ÿ ', 'iOS7' => '', 'Hex' => '1F360'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ†', + 'iOS7' => '', + 'Hex' => '1F346' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ…', + 'iOS7' => '', + 'Hex' => '1F345' + ), + array('iOS2' => '', 'iOS5' => '๐ŸŒฝ', 'iOS7' => '', 'Hex' => '1F33D'), + array( + 'iOS2' => '', + 'iOS5' => '1โƒฃ', + 'iOS7' => '', + 'Hex' => '0031_20E3' + ), + array( + 'iOS2' => '', + 'iOS5' => '2โƒฃ', + 'iOS7' => '', + 'Hex' => '0032_20E3' + ), + array( + 'iOS2' => '', + 'iOS5' => '3โƒฃ', + 'iOS7' => '', + 'Heex' => '0034_20E3' + ), + array( + 'iOS2' => '', + 'iOS5' => '2โƒฃ', + 'iOS7' => '', + 'Hex' => '0032_20E3' + ), + array( + 'iOS2' => '', + 'iOS5' => '0โƒฃ', + 'iOS7' => '', + 'Hex' => '0030_20E3' + ), + array( + 'iOS2' => '', + 'iOS5' => '5โƒฃ', + 'iOS7' => '', + 'Hex' => '0035_20E3' + ), + array( + 'iOS2' => '', + 'iOS5' => '6โƒฃ', + 'iOS7' => '', + 'Hex' => '0036_20E3' + ), + array( + 'iOS2' => '', + 'iOS5' => '7โƒฃ', + 'iOS7' => '', + 'Hex' => '0037_20E3' + ), + array( + 'iOS2' => '', + 'iOS5' => '8โƒฃ', + 'iOS7' => '', + 'Hex' => '0038_20E3' + ), + array( + 'iOS2' => '', + 'iOS5' => '9โƒฃ', + 'iOS7' => '', + 'Hex' => '0039_20E3' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿ”Ÿ', 'iOS7' => '', 'Hex' => '1F51F'), + array('iOS2' => '', 'iOS5' => '๐Ÿ”ข', 'iOS7' => '', 'Hex' => '1F522'), + array( + 'iOS2' => '', + 'iOS5' => '#โƒฃ', + 'iOS7' => '', + 'Hex' => '0023_20E3' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿ”ฃ', 'iOS7' => '', 'Hex' => '1F523'), + array( + 'iOS2' => '', + 'iOS5' => 'โฌ†', + 'iOS7' => 'โฌ†๏ธ', + 'Hex' => '2B06' + ), + array( + 'iOS2' => '', + 'iOS5' => 'โฌ‡', + 'iOS7' => 'โฌ‡๏ธ', + 'Hex' => '2B07' + ), + array( + 'iOS2' => '', + 'iOS5' => 'โฌ…', + 'iOS7' => 'โฌ…๏ธ', + 'Hex' => '2B05' + ), + array( + 'iOS2' => '', + 'iOS5' => 'โžก', + 'iOS7' => 'โžก๏ธ', + 'Hex' => '27A1' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿ” ', 'iOS7' => '', 'Hex' => '1F520'), + array('iOS2' => '', 'iOS5' => '๐Ÿ”ก', 'iOS7' => '', 'Hex' => '1F521'), + array('iOS2' => '', 'iOS5' => '๐Ÿ”ค', 'iOS7' => '', 'Hex' => '1F524'), + array( + 'iOS2' => '', + 'iOS5' => 'โ†—', + 'iOS7' => 'โ†—๏ธ', + 'Hex' => '2197' + ), + array( + 'iOS2' => '', + 'iOS5' => 'โ†–', + 'iOS7' => 'โ†–๏ธ', + 'Hex' => '2196' + ), + array( + 'iOS2' => '', + 'iOS5' => 'โ†˜', + 'iOS7' => 'โ†˜๏ธ', + 'Hex' => '2198' + ), + array( + 'iOS2' => '', + 'iOS5' => 'โ†™', + 'iOS7' => 'โ†™๏ธ', + 'Hex' => '2199' + ), + array('iOS2' => '', 'iOS5' => 'โ†”', 'iOS7' => 'โ†”๏ธ', 'Hex' => '2194'), + array('iOS2' => '', 'iOS5' => 'โ†•', 'iOS7' => 'โ†•๏ธ', 'Hex' => '2195'), + array('iOS2' => '', 'iOS5' => '๐Ÿ”„', 'iOS7' => '', 'Hex' => '1F504'), + array( + 'iOS2' => '', + 'iOS5' => 'โ—€', + 'iOS7' => 'โ—€๏ธ', + 'Hex' => '25C0' + ), + array( + 'iOS2' => '', + 'iOS5' => 'โ–ถ', + 'iOS7' => 'โ–ถ๏ธ', + 'Hex' => '25B6' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿ”ผ', 'iOS7' => '', 'Hex' => '1F53C'), + array('iOS2' => '', 'iOS5' => '๐Ÿ”ฝ', 'iOS7' => '', 'Hex' => '1F53D'), + array('iOS2' => '', 'iOS5' => 'โ†ฉ', 'iOS7' => 'โ†ฉ๏ธ', 'Hex' => '21A9'), + array('iOS2' => '', 'iOS5' => 'โ†ช', 'iOS7' => 'โ†ช๏ธ', 'Hex' => '21AA'), + array('iOS2' => '', 'iOS5' => 'โ„น', 'iOS7' => 'โ„น๏ธ', 'Hex' => '2139'), + array('iOS2' => '', 'iOS5' => 'โช', 'iOS7' => '', 'Hex' => '23EA'), + array('iOS2' => '', 'iOS5' => 'โฉ', 'iOS7' => '', 'Hex' => '23E9'), + array('iOS2' => '', 'iOS5' => 'โซ', 'iOS7' => '', 'Hex' => '23EB'), + array('iOS2' => '', 'iOS5' => 'โฌ', 'iOS7' => '', 'Hex' => '23EC'), + array('iOS2' => '', 'iOS5' => 'โคต', 'iOS7' => 'โคต๏ธ', 'Hex' => '2935'), + array('iOS2' => '', 'iOS5' => 'โคด', 'iOS7' => 'โคด๏ธ', 'Hex' => '2934'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ†—', + 'iOS7' => '', + 'Hex' => '1F197' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿ”€', 'iOS7' => '', 'Hex' => '1F500'), + array('iOS2' => '', 'iOS5' => '๐Ÿ”', 'iOS7' => '', 'Hex' => '1F501'), + array('iOS2' => '', 'iOS5' => '๐Ÿ”‚', 'iOS7' => '', 'Hex' => '1F502'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ†•', + 'iOS7' => '', + 'Hex' => '1F195' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ†™', + 'iOS7' => '', + 'Hex' => '1F199' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ†’', + 'iOS7' => '', + 'Hex' => '1F192' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿ†“', 'iOS7' => '', 'Hex' => '1F193'), + array('iOS2' => '', 'iOS5' => '๐Ÿ†–', 'iOS7' => '', 'Hex' => '1F196'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ“ถ', + 'iOS7' => '', + 'Hex' => '1F4F6' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐ŸŽฆ', + 'iOS7' => '', + 'Hex' => '1F3A6' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿˆ', + 'iOS7' => '', + 'Hex' => '1F201' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿˆฏ', + 'iOS7' => '๐Ÿˆฏ๏ธ', + 'Hex' => '1F22F' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿˆณ', + 'iOS7' => '', + 'Hex' => '1F233' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿˆต', + 'iOS7' => '', + 'Hex' => '1F235' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿˆด', 'iOS7' => '', 'Hex' => '1F234'), + array('iOS2' => '', 'iOS5' => '๐Ÿˆฒ', 'iOS7' => '', 'Hex' => '1F232'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ‰', + 'iOS7' => '', + 'Hex' => '1F250' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿˆน', + 'iOS7' => '', + 'Hex' => '1F239' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿˆบ', + 'iOS7' => '', + 'Hex' => '1F23A' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿˆถ', + 'iOS7' => '', + 'Hex' => '1F236' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿˆš', + 'iOS7' => '๐Ÿˆš๏ธ', + 'Hex' => '1F21A' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿšป', + 'iOS7' => '', + 'Hex' => '1F6BB' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿšน', + 'iOS7' => '', + 'Hex' => '1F6B9' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿšบ', + 'iOS7' => '', + 'Hex' => '1F6BA' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿšผ', + 'iOS7' => '', + 'Hex' => '1F6BC' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿšพ', + 'iOS7' => '', + 'Hex' => '1F6BE' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿšฐ', 'iOS7' => '', 'Hex' => '1F6B0'), + array('iOS2' => '', 'iOS5' => '๐Ÿšฎ', 'iOS7' => '', 'Hex' => '1F6AE'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ…ฟ', + 'iOS7' => '๐Ÿ…ฟ๏ธ', + 'Hex' => '1F17F' + ), + array( + 'iOS2' => '', + 'iOS5' => 'โ™ฟ', + 'iOS7' => 'โ™ฟ๏ธ', + 'Hex' => '267F' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿšญ', + 'iOS7' => '', + 'Hex' => '1F6AD' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿˆท', + 'iOS7' => '', + 'Hex' => '1F237' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿˆธ', + 'iOS7' => '', + 'Hex' => '1F238' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿˆ‚', + 'iOS7' => '', + 'Hex' => '1F202' + ), + array('iOS2' => '', 'iOS5' => 'โ“‚', 'iOS7' => 'โ“‚๏ธ', 'Hex' => '24C2'), + array('iOS2' => '', 'iOS5' => '๐Ÿ›‚', 'iOS7' => '', 'Hex' => '1F6C2'), + array('iOS2' => '', 'iOS5' => '๐Ÿ›„', 'iOS7' => '', 'Hex' => '1F6C4'), + array('iOS2' => '', 'iOS5' => '๐Ÿ›…', 'iOS7' => '', 'Hex' => '1F6C5'), + array('iOS2' => '', 'iOS5' => '๐Ÿ›ƒ', 'iOS7' => '', 'Hex' => '1F6C3'), + array('iOS2' => '', 'iOS5' => '๐Ÿ‰‘', 'iOS7' => '', 'Hex' => '1F251'), + array( + 'iOS2' => '', + 'iOS5' => 'ใŠ™', + 'iOS7' => 'ใŠ™๏ธ', + 'Hex' => '3299' + ), + array( + 'iOS2' => '', + 'iOS5' => 'ใŠ—', + 'iOS7' => 'ใŠ—๏ธ', + 'Hex' => '3297' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿ†‘', 'iOS7' => '', 'Hex' => '1F191'), + array('iOS2' => '', 'iOS5' => '๐Ÿ†˜', 'iOS7' => '', 'Hex' => '1F198'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ†”', + 'iOS7' => '', + 'Hex' => '1F194' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿšซ', 'iOS7' => '', 'Hex' => '1F6AB'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ”ž', + 'iOS7' => '', + 'Hex' => '1F51E' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿ“ต', 'iOS7' => '', 'Hex' => '1F4F5'), + array('iOS2' => '', 'iOS5' => '๐Ÿšฏ', 'iOS7' => '', 'Hex' => '1F6AF'), + array('iOS2' => '', 'iOS5' => '๐Ÿšฑ', 'iOS7' => '', 'Hex' => '1F6B1'), + array('iOS2' => '', 'iOS5' => '๐Ÿšณ', 'iOS7' => '', 'Hex' => '1F6B3'), + array('iOS2' => '', 'iOS5' => '๐Ÿšท', 'iOS7' => '', 'Hex' => '1F6B7'), + array('iOS2' => '', 'iOS5' => '๐Ÿšธ', 'iOS7' => '', 'Hex' => '1F6B8'), + array('iOS2' => '', 'iOS5' => 'โ›”', 'iOS7' => 'โ›”๏ธ', 'Hex' => '26D4'), + array( + 'iOS2' => '', + 'iOS5' => 'โœณ', + 'iOS7' => 'โœณ๏ธ', + 'Hex' => '2733' + ), + array('iOS2' => '', 'iOS5' => 'โ‡', 'iOS7' => 'โ‡๏ธ', 'Hex' => '2747'), + array('iOS2' => '', 'iOS5' => 'โŽ', 'iOS7' => '', 'Hex' => '274E'), + array('iOS2' => '', 'iOS5' => 'โœ…', 'iOS7' => '', 'Hex' => '2705'), + array( + 'iOS2' => '', + 'iOS5' => 'โœด', + 'iOS7' => 'โœด๏ธ', + 'Hex' => '2734' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ’Ÿ', + 'iOS7' => '', + 'Hex' => '1F49F' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ†š', + 'iOS7' => '', + 'Hex' => '1F19A' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ“ณ', + 'iOS7' => '', + 'Hex' => '1F4F3' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ“ด', + 'iOS7' => '', + 'Hex' => '1F4F4' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ…ฐ', + 'iOS7' => '', + 'Hex' => '1F170' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ…ฑ', + 'iOS7' => '', + 'Hex' => '1F171' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ†Ž', + 'iOS7' => '', + 'Hex' => '1F18E' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ…พ', + 'iOS7' => '', + 'Hex' => '1F17E' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿ’ ', 'iOS7' => '', 'Hex' => '1F4A0'), + array('iOS2' => '', 'iOS5' => 'โžฟ', 'iOS7' => '', 'Hex' => '27BF'), + array('iOS2' => '', 'iOS5' => 'โ™ป', 'iOS7' => 'โ™ป๏ธ', 'Hex' => '267B'), + array( + 'iOS2' => '', + 'iOS5' => 'โ™ˆ', + 'iOS7' => 'โ™ˆ๏ธ', + 'Hex' => '2648' + ), + array( + 'iOS2' => '', + 'iOS5' => 'โ™‰', + 'iOS7' => 'โ™‰๏ธ', + 'Hex' => '2649' + ), + array( + 'iOS2' => '', + 'iOS5' => 'โ™Š', + 'iOS7' => 'โ™Š๏ธ', + 'Hex' => '264A' + ), + array( + 'iOS2' => '', + 'iOS5' => 'โ™‹', + 'iOS7' => 'โ™‹๏ธ', + 'Hex' => '264B' + ), + array( + 'iOS2' => '', + 'iOS5' => 'โ™Œ', + 'iOS7' => 'โ™Œ๏ธ', + 'Hex' => '264C' + ), + array( + 'iOS2' => '', + 'iOS5' => 'โ™', + 'iOS7' => 'โ™๏ธ', + 'Hex' => '264D' + ), + array( + 'iOS2' => '', + 'iOS5' => 'โ™Ž', + 'iOS7' => 'โ™Ž๏ธ', + 'Hex' => '264E' + ), + array( + 'iOS2' => '', + 'iOS5' => 'โ™', + 'iOS7' => 'โ™๏ธ', + 'Hex' => '264F' + ), + array( + 'iOS2' => '', + 'iOS5' => 'โ™', + 'iOS7' => 'โ™๏ธ', + 'Hex' => '2650' + ), + array( + 'iOS2' => '', + 'iOS5' => 'โ™‘', + 'iOS7' => 'โ™‘๏ธ', + 'Hex' => '2651' + ), + array( + 'iOS2' => '', + 'iOS5' => 'โ™’', + 'iOS7' => 'โ™’๏ธ', + 'Hex' => '2652' + ), + array( + 'iOS2' => '', + 'iOS5' => 'โ™“', + 'iOS7' => 'โ™“๏ธ', + 'Hex' => '2653' + ), + array('iOS2' => '', 'iOS5' => 'โ›Ž', 'iOS7' => '', 'Hex' => '26CE'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ”ฏ', + 'iOS7' => '', + 'Hex' => '1F52F' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿง', + 'iOS7' => '', + 'Hex' => '1F3E7' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ’น', + 'iOS7' => '', + 'Hex' => '1F4B9' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿ’ฒ', 'iOS7' => '', 'Hex' => '1F4B2'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ’ฑ', + 'iOS7' => '', + 'Hex' => '1F4B1' + ), + array('iOS2' => 'ยฉ', 'iOS5' => 'ยฉ', 'iOS7' => '', 'Hex' => '00A9'), + array('iOS2' => 'ยฎ', 'iOS5' => 'ยฎ', 'iOS7' => '', 'Hex' => '00AE'), + array('iOS2' => 'โ„ข', 'iOS5' => 'โ„ข', 'iOS7' => '', 'Hex' => '2122'), + array( + 'iOS2' => '', + 'iOS5' => 'ใ€ฝ', + 'iOS7' => 'ใ€ฝ๏ธ', + 'Hex' => '303D' + ), + array('iOS2' => '', 'iOS5' => 'ใ€ฐ', 'iOS7' => '', 'Hex' => '3030'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ”', + 'iOS7' => '', + 'Hex' => '1F51D' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿ”š', 'iOS7' => '', 'Hex' => '1F51A'), + array('iOS2' => '', 'iOS5' => '๐Ÿ”™', 'iOS7' => '', 'Hex' => '1F519'), + array('iOS2' => '', 'iOS5' => '๐Ÿ”›', 'iOS7' => '', 'Hex' => '1F51B'), + array('iOS2' => '', 'iOS5' => '๐Ÿ”œ', 'iOS7' => '', 'Hex' => '1F51C'), + array('iOS2' => '', 'iOS5' => 'โŒ', 'iOS7' => '', 'Hex' => '274C'), + array( + 'iOS2' => '', + 'iOS5' => 'โญ•', + 'iOS7' => 'โญ•๏ธ', + 'Hex' => '2B55' + ), + array('iOS2' => '', 'iOS5' => 'โ—', 'iOS7' => 'โ—๏ธ', 'Hex' => '2757'), + array('iOS2' => '', 'iOS5' => 'โ“', 'iOS7' => '', 'Hex' => '2753'), + array('iOS2' => '', 'iOS5' => 'โ•', 'iOS7' => '', 'Hex' => '2755'), + array('iOS2' => '', 'iOS5' => 'โ”', 'iOS7' => '', 'Hex' => '2754'), + array('iOS2' => '', 'iOS5' => '๐Ÿ”ƒ', 'iOS7' => '', 'Hex' => '1F503'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ•›', + 'iOS7' => '', + 'Hex' => '1F55B' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿ•ง', 'iOS7' => '', 'Hex' => '1F567'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ•', + 'iOS7' => '', + 'Hex' => '1F550' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿ•œ', 'iOS7' => '', 'Hex' => '1F55C'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ•‘', + 'iOS7' => '', + 'Hex' => '1F551' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿ•', 'iOS7' => '', 'Hex' => '1F55D'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ•’', + 'iOS7' => '', + 'Hex' => '1F552' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿ•ž', 'iOS7' => '', 'Hex' => '1F55E'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ•“', + 'iOS7' => '', + 'Hex' => '1F553' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿ•Ÿ', 'iOS7' => '', 'Hex' => '1F55F'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ•”', + 'iOS7' => '', + 'Hex' => '1F554' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿ• ', 'iOS7' => '', 'Hex' => '1F560'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ••', + 'iOS7' => '', + 'Hex' => '1F555' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ•–', + 'iOS7' => '', + 'Hex' => '1F556' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ•—', + 'iOS7' => '', + 'Hex' => '1F557' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ•˜', + 'iOS7' => '', + 'Hex' => '1F558' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ•™', + 'iOS7' => '', + 'Hex' => '1F559' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ•š', + 'iOS7' => '', + 'Hex' => '1F55A' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿ•ก', 'iOS7' => '', 'Hex' => '1F561'), + array('iOS2' => '', 'iOS5' => '๐Ÿ•ข', 'iOS7' => '', 'Hex' => '1F562'), + array('iOS2' => '', 'iOS5' => '๐Ÿ•ฃ', 'iOS7' => '', 'Hex' => '1F563'), + array('iOS2' => '', 'iOS5' => '๐Ÿ•ค', 'iOS7' => '', 'Hex' => '1F564'), + array('iOS2' => '', 'iOS5' => '๐Ÿ•ฅ', 'iOS7' => '', 'Hex' => '1F565'), + array('iOS2' => '', 'iOS5' => '๐Ÿ•ฆ', 'iOS7' => '', 'Hex' => '1F566'), + array('iOS2' => '', 'iOS5' => 'โœ–', 'iOS7' => 'โœ–๏ธ', 'Hex' => '2716'), + array('iOS2' => '', 'iOS5' => 'โž•', 'iOS7' => '', 'Hex' => '2795'), + array('iOS2' => '', 'iOS5' => 'โž–', 'iOS7' => '', 'Hex' => '2796'), + array('iOS2' => '', 'iOS5' => 'โž—', 'iOS7' => '', 'Hex' => '2797'), + array( + 'iOS2' => '', + 'iOS5' => 'โ™ ', + 'iOS7' => 'โ™ ๏ธ', + 'Hex' => '2660' + ), + array( + 'iOS2' => '', + 'iOS5' => 'โ™ฅ', + 'iOS7' => 'โ™ฅ๏ธ', + 'Hex' => '2665' + ), + array( + 'iOS2' => '', + 'iOS5' => 'โ™ฃ', + 'iOS7' => 'โ™ฃ๏ธ', + 'Hex' => '2663' + ), + array( + 'iOS2' => '', + 'iOS5' => 'โ™ฆ', + 'iOS7' => 'โ™ฆ๏ธ', + 'Hex' => '2666' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿ’ฎ', 'iOS7' => '', 'Hex' => '1F4AE'), + array('iOS2' => '', 'iOS5' => '๐Ÿ’ฏ', 'iOS7' => '', 'Hex' => '1F4AF'), + array('iOS2' => '', 'iOS5' => 'โœ”', 'iOS7' => 'โœ”๏ธ', 'Hex' => '2714'), + array('iOS2' => '', 'iOS5' => 'โ˜‘', 'iOS7' => 'โ˜‘๏ธ', 'Hex' => '2611'), + array('iOS2' => '', 'iOS5' => '๐Ÿ”˜', 'iOS7' => '', 'Hex' => '1F518'), + array('iOS2' => '', 'iOS5' => '๐Ÿ”—', 'iOS7' => '', 'Hex' => '1F517'), + array('iOS2' => '', 'iOS5' => 'โžฐ', 'iOS7' => '', 'Hex' => '27B0'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ”ฑ', + 'iOS7' => '', + 'Hex' => '1F531' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ”ฒ', + 'iOS7' => '', + 'Hex' => '1F532' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ”ณ', + 'iOS7' => '', + 'Hex' => '1F533' + ), + array('iOS2' => '', 'iOS5' => 'โ—ผ', 'iOS7' => 'โ—ผ๏ธ', 'Hex' => '25FC'), + array('iOS2' => '', 'iOS5' => 'โ—ป', 'iOS7' => 'โ—ป๏ธ', 'Hex' => '25FB'), + array('iOS2' => '', 'iOS5' => 'โ—พ', 'iOS7' => 'โ—พ๏ธ', 'Hex' => '25FE'), + array('iOS2' => '', 'iOS5' => 'โ—ฝ', 'iOS7' => 'โ—ฝ๏ธ', 'Hex' => '25FD'), + array('iOS2' => '', 'iOS5' => 'โ–ช', 'iOS7' => 'โ–ช๏ธ', 'Hex' => '25AA'), + array('iOS2' => '', 'iOS5' => 'โ–ซ', 'iOS7' => 'โ–ซ๏ธ', 'Hex' => '25AB'), + array('iOS2' => '', 'iOS5' => '๐Ÿ”บ', 'iOS7' => '', 'Hex' => '1F53A'), + array('iOS2' => '', 'iOS5' => 'โฌœ', 'iOS7' => 'โฌœ๏ธ', 'Hex' => '2B1C'), + array('iOS2' => '', 'iOS5' => 'โฌ›', 'iOS7' => 'โฌ›๏ธ', 'Hex' => '2B1B'), + array('iOS2' => '', 'iOS5' => 'โšซ', 'iOS7' => 'โšซ๏ธ', 'Hex' => '26AB'), + array('iOS2' => '', 'iOS5' => 'โšช', 'iOS7' => 'โšช๏ธ', 'Hex' => '26AA'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ”ด', + 'iOS7' => '', + 'Hex' => '1F534' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿ”ต', 'iOS7' => '', 'Hex' => '1F535'), + array('iOS2' => '', 'iOS5' => '๐Ÿ”ป', 'iOS7' => '', 'Hex' => '1F53B'), + array('iOS2' => '', 'iOS5' => '๐Ÿ”ถ', 'iOS7' => '', 'Hex' => '1F536'), + array('iOS2' => '', 'iOS5' => '๐Ÿ”ท', 'iOS7' => '', 'Hex' => '1F537'), + array('iOS2' => '', 'iOS5' => '๐Ÿ”ธ', 'iOS7' => '', 'Hex' => '1F538'), + array('iOS2' => '', 'iOS5' => '๐Ÿ”น', 'iOS7' => '', 'Hex' => '1F539'), + array('iOS2' => '', 'iOS5' => 'โ‰', 'iOS7' => 'โ‰๏ธ', 'Hex' => '2049'), + array('iOS2' => '', 'iOS5' => 'โ€ผ', 'iOS7' => 'โ€ผ๏ธ', 'Hex' => '203C') + ); + } } diff --git a/src/mediauploader.php b/src/mediauploader.php index 36b20ab7..b798cc9a 100755 --- a/src/mediauploader.php +++ b/src/mediauploader.php @@ -5,6 +5,7 @@ */ class WhatsMediaUploader { + protected static function sendData($host, $POST, $HEAD, $filepath, $mediafile, $TAIL) { $sock = fsockopen("ssl://" . $host, 443); @@ -13,9 +14,9 @@ protected static function sendData($host, $POST, $HEAD, $filepath, $mediafile, $ fwrite($sock, $HEAD); //write file data - $buf = 1024; + $buf = 1024; $totalread = 0; - $fp = fopen($filepath, "r"); + $fp = fopen($filepath, "r"); while ($totalread < $mediafile['filesize']) { $buff = fread($fp, $buf); fwrite($sock, $buff, $buf); @@ -37,7 +38,7 @@ protected static function sendData($host, $POST, $HEAD, $filepath, $mediafile, $ list($header, $body) = preg_split("/\R\R/", $data, 2); $json = json_decode($body); - if (!is_null($json)) { + if ( ! is_null($json)) { return $json; } return false; @@ -46,9 +47,9 @@ protected static function sendData($host, $POST, $HEAD, $filepath, $mediafile, $ public static function pushFile($uploadResponseNode, $messageContainer, $mediafile, $selfJID) { //get vars - $url = $uploadResponseNode->getChild("media")->getAttribute("url"); + $url = $uploadResponseNode->getChild("media")->getAttribute("url"); $filepath = $messageContainer["filePath"]; - $to = $messageContainer["to"]; + $to = $messageContainer["to"]; return self::getPostString($filepath, $url, $mediafile, $to, $selfJID); } @@ -57,11 +58,11 @@ protected static function getPostString($filepath, $url, $mediafile, $to, $from) $host = parse_url($url, PHP_URL_HOST); //filename to md5 digest - $cryptoname = md5($filepath) . "." . $mediafile['fileextension']; - $boundary = "zzXXzzYYzzXXzzQQ"; + $cryptoname = md5($filepath) . "." . $mediafile['fileextension']; + $boundary = "zzXXzzYYzzXXzzQQ"; $contentlength = 0; - if(is_array($to)) { + if (is_array($to)) { $to = implode(',', $to); } @@ -90,6 +91,4 @@ protected static function getPostString($filepath, $url, $mediafile, $to, $from) return self::sendData($host, $POST, $hBAOS, $filepath, $mediafile, $fBAOS); } -} - -?> +} \ No newline at end of file diff --git a/src/protocol.class.php b/src/protocol.class.php index 72688dbf..1118c8a4 100755 --- a/src/protocol.class.php +++ b/src/protocol.class.php @@ -4,6 +4,7 @@ class IncompleteMessageException extends CustomException { + private $input; public function __construct($message = null, $code = 0) @@ -25,6 +26,7 @@ public function getInput() class ProtocolNode { + private $tag; private $attributeHash; private $children; @@ -37,15 +39,11 @@ class ProtocolNode */ private static function isCli() { - if(self::$cli === null) - { + if (self::$cli === null) { //initial setter - if(php_sapi_name() == "cli") - { + if (php_sapi_name() == "cli") { self::$cli = true; - } - else - { + } else { self::$cli = false; } } @@ -86,15 +84,15 @@ public function getChildren() public function __construct($tag, $attributeHash, $children, $data) { - $this->tag = $tag; + $this->tag = $tag; $this->attributeHash = $attributeHash; - $this->children = $children; - $this->data = $data; + $this->children = $children; + $this->data = $data; } /** * @param string $indent - * @param bool $isChild + * @param bool $isChild * @return string */ public function nodeString($indent = "", $isChild = false) @@ -103,11 +101,10 @@ public function nodeString($indent = "", $isChild = false) $lt = "<"; $gt = ">"; $nl = "\n"; - if(!self::isCli()) - { - $lt = "<"; - $gt = ">"; - $nl = "
"; + if ( ! self::isCli()) { + $lt = "<"; + $gt = ">"; + $nl = "
"; $indent = str_replace(" ", " ", $indent); } @@ -136,13 +133,11 @@ public function nodeString($indent = "", $isChild = false) $ret .= implode($nl, $foo); $ret .= $nl . $indent; } - $ret .= $lt . "/" . $this->tag . $gt; + $ret .= $lt . "/" . $this->tag . $gt; - if(!$isChild) - { + if ( ! $isChild) { $ret .= $nl; - if(!self::isCli()) - { + if ( ! self::isCli()) { $ret .= $nl; } } @@ -182,14 +177,10 @@ public function getChild($tag) { $ret = null; if ($this->children) { - if(is_int($tag)) - { - if(isset($this->children[$tag])) - { + if (is_int($tag)) { + if (isset($this->children[$tag])) { return $this->children[$tag]; - } - else - { + } else { return null; } } @@ -222,17 +213,17 @@ public function hasChild($tag) public function refreshTimes($offset = 0) { if (isset($this->attributeHash['id'])) { - $id = $this->attributeHash['id']; - $parts = explode('-', $id); - $parts[0] = time() + $offset; + $id = $this->attributeHash['id']; + $parts = explode('-', $id); + $parts[0] = time() + $offset; $this->attributeHash['id'] = implode('-', $parts); } if (isset($this->attributeHash['t'])) { $this->attributeHash['t'] = time(); } } - - + + /** * Print human readable ProtocolNode object * @@ -247,13 +238,14 @@ public function __toString() 'data' => $this->data ); - return print_r( $readableNode, true ); + return print_r($readableNode, true); } } class BinTreeNodeReader { + private $input; /** @var $key KeyStream */ private $key; @@ -273,7 +265,7 @@ public function nextTree($input = null) if ($input != null) { $this->input = $input; } - $firstByte = $this->peekInt8(); + $firstByte = $this->peekInt8(); $stanzaFlag = ($firstByte & 0xF0) >> 4; $stanzaSize = $this->peekInt16(1) | (($firstByte & 0x0F) << 16); if ($stanzaSize > strlen($this->input)) { @@ -282,7 +274,7 @@ public function nextTree($input = null) $this->readInt24(); if ($stanzaFlag & 8) { if (isset($this->key)) { - $realSize = $stanzaSize - 4; + $realSize = $stanzaSize - 4; $this->input = $this->key->DecodeMessage($this->input, $realSize, 0, $realSize);// . $remainingData; } else { throw new Exception("Encountered encrypted message, missing key"); @@ -297,15 +289,13 @@ public function nextTree($input = null) protected function getToken($token) { - $ret = ""; + $ret = ""; $subdict = false; TokenMap::GetToken($token, $subdict, $ret); - if(!$ret) - { + if ( ! $ret) { $token = $this->readInt8(); TokenMap::GetToken($token, $subdict, $ret); - if(!$ret) - { + if ( ! $ret) { throw new Exception("BinTreeNodeReader->getToken: Invalid token $token"); } } @@ -324,12 +314,12 @@ protected function readString($token) $ret = ""; } elseif ($token == 0xfc) { $size = $this->readInt8(); - $ret = $this->fillArray($size); + $ret = $this->fillArray($size); } elseif ($token == 0xfd) { $size = $this->readInt24(); - $ret = $this->fillArray($size); + $ret = $this->fillArray($size); } elseif ($token == 0xfa) { - $user = $this->readString($this->readInt8()); + $user = $this->readString($this->readInt8()); $server = $this->readString($this->readInt8()); if ((strlen($user) > 0) && (strlen($server) > 0)) { $ret = $user . "@" . $server; @@ -343,11 +333,11 @@ protected function readString($token) protected function readAttributes($size) { - $attributes = array(); + $attributes = array(); $attribCount = ($size - 2 + $size % 2) / 2; for ($i = 0; $i < $attribCount; $i++) { - $key = $this->readString($this->readInt8()); - $value = $this->readString($this->readInt8()); + $key = $this->readString($this->readInt8()); + $value = $this->readString($this->readInt8()); $attributes[$key] = $value; } @@ -357,7 +347,7 @@ protected function readAttributes($size) protected function nextTreeInternal() { $token = $this->readInt8(); - $size = $this->readListSize($token); + $size = $this->readListSize($token); $token = $this->readInt8(); if ($token == 1) { $attributes = $this->readAttributes($size); @@ -366,7 +356,7 @@ protected function nextTreeInternal() } elseif ($token == 2) { return null; } - $tag = $this->readString($token); + $tag = $this->readString($token); $attributes = $this->readAttributes($size); if (($size % 2) == 1) { return new ProtocolNode($tag, $attributes, null, ""); @@ -387,7 +377,7 @@ protected function isListTag($token) protected function readList($token) { $size = $this->readListSize($token); - $ret = array(); + $ret = array(); for ($i = 0; $i < $size; $i++) { array_push($ret, $this->nextTreeInternal()); } @@ -457,7 +447,7 @@ protected function peekInt8($offset = 0) $ret = 0; if (strlen($this->input) >= (1 + $offset)) { $sbstr = substr($this->input, $offset, 1); - $ret = ord($sbstr); + $ret = ord($sbstr); } return $ret; @@ -477,7 +467,7 @@ protected function fillArray($len) { $ret = ""; if (strlen($this->input) >= $len) { - $ret = substr($this->input, 0, $len); + $ret = substr($this->input, 0, $len); $this->input = substr($this->input, $len); } @@ -488,6 +478,7 @@ protected function fillArray($len) class BinTreeNodeWriter { + private $output; /** @var $key KeyStream */ private $key; @@ -505,11 +496,11 @@ public function setKey($key) public function StartStream($domain, $resource) { $attributes = array(); - $header = "WA"; + $header = "WA"; $header .= $this->writeInt8(1); $header .= $this->writeInt8(4); - $attributes["to"] = $domain; + $attributes["to"] = $domain; $attributes["resource"] = $resource; $this->writeListStart(count($attributes) * 2 + 1); @@ -577,18 +568,17 @@ protected function flushBuffer($encrypt = true) { $size = strlen($this->output); $data = $this->output; - if($this->key != null && $encrypt) - { + if ($this->key != null && $encrypt) { $bsize = $this->getInt24($size); //encrypt - $data = $this->key->EncodeMessage($data, $size, 0, $size); - $len = strlen($data); + $data = $this->key->EncodeMessage($data, $size, 0, $size); + $len = strlen($data); $bsize[0] = chr((8 << 4) | (($len & 16711680) >> 16)); $bsize[1] = chr(($len & 65280) >> 8); $bsize[2] = chr($len & 255); - $size = $this->parseInt24($bsize); + $size = $this->parseInt24($bsize); } - $ret = $this->writeInt24($size) . $data; + $ret = $this->writeInt24($size) . $data; $this->output = ''; return $ret; } @@ -661,12 +651,10 @@ protected function writeBytes($bytes) protected function writeString($tag) { - $intVal = -1; + $intVal = -1; $subdict = false; - if(TokenMap::TryGetToken($tag, $subdict, $intVal)) - { - if($subdict) - { + if (TokenMap::TryGetToken($tag, $subdict, $intVal)) { + if ($subdict) { $this->writeToken(236); } $this->writeToken($intVal); @@ -675,7 +663,7 @@ protected function writeString($tag) $index = strpos($tag, '@'); if ($index) { $server = substr($tag, $index + 1); - $user = substr($tag, 0, $index); + $user = substr($tag, 0, $index); $this->writeJid($user, $server); } else { $this->writeBytes($tag); @@ -702,5 +690,4 @@ protected function writeListStart($len) $this->output .= "\xf9" . $this->writeInt16($len); } } - } diff --git a/src/rc4.php b/src/rc4.php index c882e21e..164d6c9a 100755 --- a/src/rc4.php +++ b/src/rc4.php @@ -2,6 +2,7 @@ class rc4 { + private $s; private $i; private $j; @@ -27,7 +28,7 @@ public function cipher($data, $offset, $length) $this->i = ($this->i + 1) & 0xff; $this->j = ($this->j + $this->s[$this->i]) & 0xff; $this->swap($this->i, $this->j); - $d = ord($data{$offset}); + $d = ord($data{$offset}); $out[$offset] = chr($d ^ $this->s[($this->s[$this->i] + $this->s[$this->j]) & 0xff]); $offset++; } @@ -37,7 +38,7 @@ public function cipher($data, $offset, $length) protected function swap($i, $j) { - $c = $this->s[$i]; + $c = $this->s[$i]; $this->s[$i] = $this->s[$j]; $this->s[$j] = $c; } diff --git a/src/token.php b/src/token.php index 40c9a991..a9bc259c 100755 --- a/src/token.php +++ b/src/token.php @@ -1,21 +1,22 @@ = 236 && $token < (236 + count(self::$secondaryStrings))) - { + if ( ! $subdict && $token >= 236 && $token < (236 + count(self::$secondaryStrings))) { $subdict = true; } $tokenMap = array(); - if($subdict) - { + if ($subdict) { $tokenMap = self::$secondaryStrings; - } - else - { + } else { $tokenMap = self::$primaryStrings; } - if($token < 0 || $token > count($tokenMap)) - { + if ($token < 0 || $token > count($tokenMap)) { return;//fail } $string = $tokenMap[$token]; - if(!$string) - { + if ( ! $string) { throw new Exception("Invalid token/length in GetToken"); } } diff --git a/src/vCard.php b/src/vCard.php index 81c70976..3969c8e6 100755 --- a/src/vCard.php +++ b/src/vCard.php @@ -6,6 +6,7 @@ */ class vCard { + // An array of this vcard's contact data. protected $data; // Filename for download file naming. @@ -23,44 +24,44 @@ class vCard public function __construct() { $this->data = array( - 'display_name' => null, - 'first_name' => null, - 'last_name' => null, - 'additional_name' => null, - 'name_prefix' => null, - 'name_suffix' => null, - 'nickname' => null, - 'title' => null, - 'role' => null, - 'department' => null, - 'company' => null, - 'work_po_box' => null, + 'display_name' => null, + 'first_name' => null, + 'last_name' => null, + 'additional_name' => null, + 'name_prefix' => null, + 'name_suffix' => null, + 'nickname' => null, + 'title' => null, + 'role' => null, + 'department' => null, + 'company' => null, + 'work_po_box' => null, 'work_extended_address' => null, - 'work_address' => null, - 'work_city' => null, - 'work_state' => null, - 'work_postal_code' => null, - 'work_country' => null, - 'home_po_box' => null, + 'work_address' => null, + 'work_city' => null, + 'work_state' => null, + 'work_postal_code' => null, + 'work_country' => null, + 'home_po_box' => null, 'home_extended_address' => null, - 'home_address' => null, - 'home_city' => null, - 'home_state' => null, - 'home_postal_code' => null, - 'home_country' => null, - 'office_tel' => null, - 'home_tel' => null, - 'cell_tel' => null, - 'fax_tel' => null, - 'pager_tel' => null, - 'email1' => null, - 'email2' => null, - 'url' => null, - 'photo' => null, - 'birthday' => null, - 'timezone' => null, - 'sort_string' => null, - 'note' => null, + 'home_address' => null, + 'home_city' => null, + 'home_state' => null, + 'home_postal_code' => null, + 'home_country' => null, + 'office_tel' => null, + 'home_tel' => null, + 'cell_tel' => null, + 'fax_tel' => null, + 'pager_tel' => null, + 'email1' => null, + 'email2' => null, + 'url' => null, + 'photo' => null, + 'birthday' => null, + 'timezone' => null, + 'sort_string' => null, + 'note' => null, ); return true; @@ -71,7 +72,7 @@ public function __construct() * * @param string $key * Name of the property. - * @param mixed $value + * @param mixed $value * Value to set. * * @return vCard @@ -99,22 +100,22 @@ public function set($key, $value) */ function build() { - if (!$this->class) { + if ( ! $this->class) { $this->class = 'PUBLIC'; } - if (!$this->data['display_name']) { + if ( ! $this->data['display_name']) { $this->data['display_name'] = $this->data['first_name'] . ' ' . $this->data['last_name']; } - if (!$this->data['sort_string']) { + if ( ! $this->data['sort_string']) { $this->data['sort_string'] = $this->data['last_name']; } - if (!$this->data['sort_string']) { + if ( ! $this->data['sort_string']) { $this->data['sort_string'] = $this->data['company']; } - if (!$this->data['timezone']) { + if ( ! $this->data['timezone']) { $this->data['timezone'] = date("O"); } - if (!$this->revisionDate) { + if ( ! $this->revisionDate) { $this->revisionDate = date('Y-m-d H:i:s'); } @@ -125,11 +126,11 @@ function build() $this->card .= "REV:" . $this->revisionDate . "\r\n"; $this->card .= "FN:" . $this->data['display_name'] . "\r\n"; $this->card .= "N:" - . $this->data['last_name'] . ";" - . $this->data['first_name'] . ";" - . $this->data['additional_name'] . ";" - . $this->data['name_prefix'] . ";" - . $this->data['name_suffix'] . "\r\n"; + . $this->data['last_name'] . ";" + . $this->data['first_name'] . ";" + . $this->data['additional_name'] . ";" + . $this->data['name_prefix'] . ";" + . $this->data['name_suffix'] . "\r\n"; if ($this->data['nickname']) { $this->card .= "NICKNAME:" . $this->data['nickname'] . "\r\n"; } @@ -146,24 +147,24 @@ function build() if ($this->data['work_po_box'] || $this->data['work_extended_address'] || $this->data['work_address'] || $this->data['work_city'] || $this->data['work_state'] || $this->data['work_postal_code'] || $this->data['work_country']) { $this->card .= "ADR;type=WORK:" - . $this->data['work_po_box'] . ";" - . $this->data['work_extended_address'] . ";" - . $this->data['work_address'] . ";" - . $this->data['work_city'] . ";" - . $this->data['work_state'] . ";" - . $this->data['work_postal_code'] . ";" - . $this->data['work_country'] . "\r\n"; + . $this->data['work_po_box'] . ";" + . $this->data['work_extended_address'] . ";" + . $this->data['work_address'] . ";" + . $this->data['work_city'] . ";" + . $this->data['work_state'] . ";" + . $this->data['work_postal_code'] . ";" + . $this->data['work_country'] . "\r\n"; } if ($this->data['home_po_box'] || $this->data['home_extended_address'] || $this->data['home_address'] || $this->data['home_city'] || $this->data['home_state'] || $this->data['home_postal_code'] || $this->data['home_country']) { $this->card .= "ADR;type=HOME:" - . $this->data['home_po_box'] . ";" - . $this->data['home_extended_address'] . ";" - . $this->data['home_address'] . ";" - . $this->data['home_city'] . ";" - . $this->data['home_state'] . ";" - . $this->data['home_postal_code'] . ";" - . $this->data['home_country'] . "\r\n"; + . $this->data['home_po_box'] . ";" + . $this->data['home_extended_address'] . ";" + . $this->data['home_address'] . ";" + . $this->data['home_city'] . ";" + . $this->data['home_state'] . ";" + . $this->data['home_postal_code'] . ";" + . $this->data['home_country'] . "\r\n"; } if ($this->data['email1']) { $this->card .= "EMAIL;type=INTERNET,pref:" . $this->data['email1'] . "\r\n"; @@ -198,8 +199,7 @@ function build() if ($this->data['note']) { $this->card .= "NOTE:" . $this->data['note'] . "\r\n"; } - if($this->data['photo']) - { + if ($this->data['photo']) { $this->card .= $this->generatePhotoData(); } $this->card .= "TZ:" . $this->data['timezone'] . "\r\n"; @@ -209,16 +209,13 @@ function build() protected function generatePhotoData() { $photo = $this->data['photo']; - $data = "PHOTO;"; + $data = "PHOTO;"; //detect type - if(substr($photo, 0, 4) == 'http') - { + if (substr($photo, 0, 4) == 'http') { //url $data .= 'URL:' . $photo; - } - else - { + } else { //path $bindata = file_get_contents($photo); $bindata = base64_encode($bindata); @@ -233,11 +230,11 @@ protected function generatePhotoData() */ function download() { - if (!$this->card) { + if ( ! $this->card) { $this->build(); } - if (!$this->filename) { + if ( ! $this->filename) { $this->filename = $this->data['display_name']; } @@ -256,7 +253,7 @@ function download() */ function show() { - if (!$this->card) { + if ( ! $this->card) { $this->build(); } From f7300752fda39a153e401dc3f12960855c1206ce Mon Sep 17 00:00:00 2001 From: Amirjan Date: Fri, 31 Oct 2014 03:34:46 +0330 Subject: [PATCH 086/436] Update whatsprot.class.php Correction of retrieve participant's jid --- src/whatsprot.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index b557d6a6..7306ae97 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -2795,13 +2795,13 @@ protected function processInboundDataNode(ProtocolNode $node, $autoReceipt = tru $this->eventManager()->fireGroupsParticipantsRemove( $this->phoneNumber, $node->getAttribute('from'), - $node->getChild(0)->getAttribute('jid') + $node->getChild(0)->getChild(0)->getAttribute('jid') ); } else if ($node->hasChild('add')) { $this->eventManager()->fireGroupsParticipantsAdd( $this->phoneNumber, $node->getAttribute('from'), - $node->getChild(0)->getAttribute('jid') + $node->getChild(0)->getChild(0)->getAttribute('jid') ); } else if ($node->hasChild('create')) { From af70c0c1f0c797f1579f566e319b5a7de744202b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ferm=C3=ADn=20Olaiz?= Date: Fri, 31 Oct 2014 11:59:35 -0300 Subject: [PATCH 087/436] Fire onDisconnect instead 'Socket closed' Exception --- src/whatsprot.class.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index 7306ae97..5353512b 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -3133,7 +3133,10 @@ public function readStanza() } else { - throw new Exception("Socket closed"); + $this->eventManager()->fireDisconnect( + $this->phoneNumber, + $this->socket + ); } return $buff; From bc75b119a8dcd6fdd1533bc4525ee64b2a31aace Mon Sep 17 00:00:00 2001 From: Jonathan Williamson Date: Sat, 1 Nov 2014 00:32:41 +0000 Subject: [PATCH 088/436] New simplified events system. ALL events in WhatsProt now updated. --- src/events/AllEvents.php | 230 ++++ src/events/MyEvents.php | 100 ++ src/events/WhatsApiEventsManager.php | 21 + src/events/WhatsAppEventListener.php | 486 -------- src/events/WhatsAppEventListenerBase.php | 563 --------- .../WhatsAppEventListenerLegacyAdapter.php | 42 - src/events/WhatsAppEventListenerProxy.php | 626 ---------- src/whatsprot.class.php | 1025 +++++++++-------- 8 files changed, 902 insertions(+), 2191 deletions(-) create mode 100644 src/events/AllEvents.php create mode 100644 src/events/MyEvents.php create mode 100644 src/events/WhatsApiEventsManager.php delete mode 100755 src/events/WhatsAppEventListener.php delete mode 100755 src/events/WhatsAppEventListenerBase.php delete mode 100755 src/events/WhatsAppEventListenerLegacyAdapter.php delete mode 100755 src/events/WhatsAppEventListenerProxy.php diff --git a/src/events/AllEvents.php b/src/events/AllEvents.php new file mode 100644 index 00000000..d9692045 --- /dev/null +++ b/src/events/AllEvents.php @@ -0,0 +1,230 @@ +whatsProt = $whatsProt; + return $this; + } + + public function setEventsToListenFor(array $eventList) + { + $this->eventsToListenFor = $eventList; + return $this->startListening(); + } + + protected function startListening() + { + foreach ($this->eventsToListenFor as $event) { + if (is_callable(array($this, $event))) { + $this->whatsProt->eventManager()->bind($event, array($this, $event)); + } + } + return $this; + } + + public function onSendMessage($mynumber, $target, $messageId, $innerNode) + { + } + + public function onSendMessageReceived($mynumber, $time, $from) + { + } + + public function onUserComposing($mynumber, $from, $type, $time) + { + } + + public function onUserPaused($mynumber, $from, $type, $time) + { + } + + public function onGetMessage($mynumber, $from, $id, $type, $time, $name, $body) + { + } + + public function onGroupsChatisCreated($phone, $creator, $gId, $subject) + { + } + + public function onGetGroupMessage($mynumber, $from_group_jid, $from_user_jid, $id, $type, $time, $name, $body) + { + } + + public function onGetImage( + $mynumber, $from, $id, $type, $time, $name, $size, $url, $file, $mimetype, $filehash, $width, $height, $preview, + $caption + ) { + } + + public function onGetVideo( + $mynumber, $from, $id, $type, $time, $name, $url, $file, $size, $mimetype, $filehash, $duration, $vcodec, + $acodec, $data, $caption + ) { + } + + public function onGetAudio( + $mynumber, $from, $id, $type, $time, $name, $size, $url, $file, $mimetype, $filehash, $duration, $acodec + ) { + } + + public function onGetVcard($mynumber, $from, $id, $type, $time, $name, $vCardName, $vCard) + { + } + + public function onGetLocation($mynumber, $from, $id, $type, $time, $name, $longtitude, $latitude, $data) + { + } + + public function onGetPlace($mynumber, $from, $id, $type, $time, $name, $placeName, $longtitude, $latitude, $url) + { + } + + public function onMessageReceivedServer($mynumber, $from, $id, $type) + { + } + + public function onMessageReceivedClient($mynumber, $from, $id, $type, $time) + { + } + + public function onGetGroupSubject($mynumber, $gjid, $time, $author, $name, $data) + { + } + + public function onGetPresence($mynumber, $from, $type) + { + } + + public function onAddParticipantGroup($mynumber, $gjid, $participant) + { + } + + public function onRemoveParticipantGroup($mynumber, $gjid, $participant, $author) + { + } + + public function onPing($mynumber, $id) + { + } + + public function onProfilePicture($from, $type, $data) + { + } + + public function onGetGroupList($mynumber, $groupList) + { + } + + public function onGetGroupParticipants($mynumber, $groupId, $participants) + { + } + + public function onGetServicePricing($mynumber, $price, $cost, $currency, $expiration) + { + } + + public function onCreateGroupChat($mynumber, $id) + { + } + + public function onConnect($mynumber, $socket) + { + echo $mynumber . count($socket); + } + + public function onDisconnect($mynumber, $socket) + { + } + + public function onClose($mynumber, $error) + { + } + + public function onLogin($mynumber) + { + } + + public function onLoginFailed($mynumber, $reason) + { + } + + public function onSendPresence($mynumber, $type, $name) + { + } + + public function onSendStatusUpdate($mynumber, $status) + { + } + + public function onUploadFile($mynumber, $filename, $url) + { + } + + public function onFailedUploadFile($mynumber, $filename) + { + } + + public function onMediaUploadFailed($mynumber, $id, $responseNode, $messageNode, $description) + { + } + + public function onMediaMessageSent($mynumber, $to, $id, $filetype, $url, $filename, $filesize, $caption, $icon) + { + } + + public function onRequestLastSeen($mynumber, $from, $id, $to) + { + } + + public function onPaidAccount($phone, $author, $kind, $status, $creation, $expiration) + { + } + + public function onPong($mynumber, $id) + { + } + + public function onFailedRequestCodeTooRecent($mynumber, $method, $reason, $retry_after) + { + } + + public function onFailedRequestCode($mynumber, $method, $reason, $param) + { + } + + public function onRequestCode($mynumber, $method, $length) + { + } + + public function onFailedRegisterCode($mynumber, $status, $reason, $retry_after) + { + } + + public function onRegisterCode( + $mynumber, $login, $pw, $type, $expiration, $kind, $price, $cost, $currency, $price_expiration + ) { + } + + public function onBadCredentials($mynumber, $status, $reason) + { + } + + public function onGoodCredentials( + $mynumber, $login, $pw, $type, $expiration, $kind, $price, $cost, $currency, $price_expiration + ) { + } + + public function onDissectPhone($mynumber, $phone) + { + } + + public function onFailedDissectPhone($mynumber) + { + } +} \ No newline at end of file diff --git a/src/events/MyEvents.php b/src/events/MyEvents.php new file mode 100644 index 00000000..0adbb856 --- /dev/null +++ b/src/events/MyEvents.php @@ -0,0 +1,100 @@ +WooHoo!, Phone number $mynumber connected successfully!

"; + } + + public function onDisconnect($mynumber, $socket) + { + echo "

Booo!, Phone number $mynumber is disconnected!

"; + } + + public function onGetMessage($mynumber, $from, $id, $type, $time, $name, $body) + { + echo "

We got this message from $name ($from):

$body

"; + } + + public function onLogin($mynumber) + { + echo "

We have logged in successfully for $mynumber

"; + } + + +} \ No newline at end of file diff --git a/src/events/WhatsApiEventsManager.php b/src/events/WhatsApiEventsManager.php new file mode 100644 index 00000000..e9d72d63 --- /dev/null +++ b/src/events/WhatsApiEventsManager.php @@ -0,0 +1,21 @@ +listeners[$event][] = $callback; + } + + public function fire($event, array $parameters) + { + if ( ! empty($this->listeners[$event])) { + foreach ($this->listeners[$event] as $listener) { + call_user_func_array($listener, $parameters); + } + } + } +} \ No newline at end of file diff --git a/src/events/WhatsAppEventListener.php b/src/events/WhatsAppEventListener.php deleted file mode 100755 index 43a63e3e..00000000 --- a/src/events/WhatsAppEventListener.php +++ /dev/null @@ -1,486 +0,0 @@ -eventName = $eventName; - $this->callback = $callback; - } - - protected function handleEvent($eventName, array $arguments) - { - if ($this->eventName === $eventName) { - call_user_func_array($this->callback, $arguments); - } - } - -} - diff --git a/src/events/WhatsAppEventListenerProxy.php b/src/events/WhatsAppEventListenerProxy.php deleted file mode 100755 index 17ca1ba5..00000000 --- a/src/events/WhatsAppEventListenerProxy.php +++ /dev/null @@ -1,626 +0,0 @@ -handleEvent(__FUNCTION__, func_get_args()); - } - - function onCodeRegister( - $phone, - $login, - $pw, - $type, - $expiration, - $kind, - $price, - $cost, - $currency, - $price_expiration - ) { - $this->handleEvent(__FUNCTION__, func_get_args()); - } - - function onCodeRegisterFailed( - $phone, - $status, - $reason, - $retry_after - ) { - $this->handleEvent(__FUNCTION__, func_get_args()); - } - - function onCodeRequest( - $phone, - $method, - $length - ) { - $this->handleEvent(__FUNCTION__, func_get_args()); - } - - function onCodeRequestFailed( - $phone, - $method, - $reason, - $value - ) { - $this->handleEvent(__FUNCTION__, func_get_args()); - } - - function onCodeRequestFailedTooRecent( - $phone, - $method, - $reason, - $retry_after - ) { - $this->handleEvent(__FUNCTION__, func_get_args()); - } - - function onConnect( - $phone, - $socket - ) { - $this->handleEvent(__FUNCTION__, func_get_args()); - } - - function onCredentialsBad( - $phone, - $status, - $reason - ) { - $this->handleEvent(__FUNCTION__, func_get_args()); - } - - function onCredentialsGood( - $phone, - $login, - $pw, - $type, - $expiration, - $kind, - $price, - $cost, - $currency, - $price_expiration - ) { - $this->handleEvent(__FUNCTION__, func_get_args()); - } - - function onDisconnect( - $phone, - $socket - ) { - $this->handleEvent(__FUNCTION__, func_get_args()); - } - - function onDissectPhone( - $phone, - $country, - $cc, - $mcc, - $lc, - $lg, - $mnc - ) { - $this->handleEvent(__FUNCTION__, func_get_args()); - } - - function onDissectPhoneFailed( - $phone - ) { - $this->handleEvent(__FUNCTION__, func_get_args()); - } - - function onGetAudio( - $phone, - $from, - $msgid, - $type, - $time, - $name, - $size, - $url, - $file, - $mimetype, - $filehash, - $duration, - $acodec - ) { - $this->handleEvent(__FUNCTION__, func_get_args()); - } - - function onGetError( - $phone, - $id, - $error - ) { - $this->handleEvent(__FUNCTION__, func_get_args()); - } - - function onGetGroups( - $phone, - $groupList - ) { - $this->handleEvent(__FUNCTION__, func_get_args()); - } - - function onGetGroupsInfo( - $phone, - $groupList - ) { - $this->handleEvent(__FUNCTION__, func_get_args()); - } - - function onGetGroupsSubject( - $phone, - $gId, - $time, - $author, - $participant, - $name, - $subject - ) { - $this->handleEvent(__FUNCTION__, func_get_args()); - } - - function onGetImage( - $phone, - $from, - $msgid, - $type, - $time, - $name, - $size, - $url, - $file, - $mimetype, - $filehash, - $width, - $height, - $thumbnail, - $caption - ) { - $this->handleEvent(__FUNCTION__, func_get_args()); - } - - function onGetLocation( - $phone, - $from, - $msgid, - $type, - $time, - $name, - $place_name, - $longitude, - $latitude, - $url, - $thumbnail - ) { - $this->handleEvent(__FUNCTION__, func_get_args()); - } - - function onGetMessage( - $phone, - $from, - $msgid, - $type, - $time, - $name, - $message - ) { - $func = __FUNCTION__; - $args = func_get_args(); - $this->handleEvent($func, $args); - } - - function onGetGroupMessage( - $phone, - $from, - $author, - $msgid, - $type, - $time, - $name, - $message - ) { - $this->handleEvent(__FUNCTION__, func_get_args()); - } - - function onGetPrivacyBlockedList( - $phone, - $children - /* - $data, - $onGetProfilePicture, - $phone, - $from, - $type, - $thumbnail - */ - ) - { - $this->handleEvent(__FUNCTION__, func_get_args()); - } - - function onGetProfilePicture( - $phone, - $from, - $type, - $thumbnail - ) { - $this->handleEvent(__FUNCTION__, func_get_args()); - } - - function onGetRequestLastSeen( - $phone, - $from, - $msgid, - $sec - ) { - $this->handleEvent(__FUNCTION__, func_get_args()); - } - - function onGetServerProperties( - $phone, - $version, - $properties - ) { - $this->handleEvent(__FUNCTION__, func_get_args()); - } - - function onGetvCard( - $phone, - $from, - $msgid, - $type, - $time, - $name, - $contact, - $vcard - ) { - $this->handleEvent(__FUNCTION__, func_get_args()); - } - - function onGetVideo( - $phone, - $from, - $msgid, - $type, - $time, - $name, - $url, - $file, - $size, - $mimetype, - $filehash, - $duration, - $vcodec, - $acodec, - $thumbnail, - $caption - ) { - $this->handleEvent(__FUNCTION__, func_get_args()); - } - - function onGroupsChatCreate( - $phone, - $gId - ) { - $this->handleEvent(__FUNCTION__, func_get_args()); - } - - function onGroupsChatisCreated( - $phone, - $creator, - $gId, - $subject - ) { - $this->handleEvent(__FUNCTION__, func_get_args()); - } - - function onGroupsChatEnd( - $phone, - $gId - ) { - $this->handleEvent(__FUNCTION__, func_get_args()); - } - - function onGroupsParticipantsAdd( - $phone, - $groupId, - $participant - ) { - $this->handleEvent(__FUNCTION__, func_get_args()); - } - - function onGroupsParticipantsRemove( - $phone, - $groupId, - $participant - ) { - $this->handleEvent(__FUNCTION__, func_get_args()); - } - - function onLogin( - $phone - ) { - $this->handleEvent(__FUNCTION__, func_get_args()); - } - - function onMessageComposing( - $phone, - $from, - $msgid, - $type, - $time - ) { - $this->handleEvent(__FUNCTION__, func_get_args()); - } - - function onMessagePaused( - $phone, - $from, - $msgid, - $type, - $time - ) { - $this->handleEvent(__FUNCTION__, func_get_args()); - } - - function onMessageReceivedClient( - $phone, - $from, - $msgid, - $type, - $time - ) { - $this->handleEvent(__FUNCTION__, func_get_args()); - } - - function onMessageReceivedServer( - $phone, - $from, - $msgid, - $type, - $time - ) { - $this->handleEvent(__FUNCTION__, func_get_args()); - } - - function onPaidAccount( - $phone, - $author, - $kind, - $status, - $creation, - $expiration - ) { - $this->handleEvent(__FUNCTION__, func_get_args()); - } - - function onGetServicePricing( - $phone, - $price, - $cost, - $currency, - $expiration - ) { - $this->handleEvent(__FUNCTION__, func_get_args()); - } - - function onGetExtendAccount( - $phone, - $kind, - $status, - $creation, - $expiration - ) { - $this->handleEvent(__FUNCTION__, func_get_args()); - } - - function onGetNormalizedJid( - $phone, - $result - ) { - $this->handleEvent(__FUNCTION__, func_get_args()); - } - - function onGetBroadcastLists( - $phone, - $broadcastLists - ) { - $this->handleEvent(__FUNCTION__, func_get_args()); - } - - function onPing( - $phone, - $msgid - ) { - $this->handleEvent(__FUNCTION__, func_get_args()); - } - - function onPresence( - $phone, - $from, - $type - ) { - $this->handleEvent(__FUNCTION__, func_get_args()); - } - - function onSendMessageReceived( - $phone, - $id, - $from, - $type - ) { - $this->handleEvent(__FUNCTION__, func_get_args()); - } - - function onSendPong( - $phone, - $msgid - ) { - $this->handleEvent(__FUNCTION__, func_get_args()); - } - - function onSendPresence( - $phone, - $type, - $name - ) { - $this->handleEvent(__FUNCTION__, func_get_args()); - } - - function onSendStatusUpdate( - $phone, - $msg - ) { - $this->handleEvent(__FUNCTION__, func_get_args()); - } - - function onUploadFile( - $phone, - $name, - $url - ) { - $this->handleEvent(__FUNCTION__, func_get_args()); - } - - function onUploadFileFailed( - $phone, - $name - ) { - $this->handleEvent(__FUNCTION__, func_get_args()); - } - - public function onConnectError( - $phone, - $socket - ) { - $this->handleEvent(__FUNCTION__, func_get_args()); - } - - public function onGetGroupParticipants( - $phone, - $groupId, - $groupList - ) { - $this->handleEvent(__FUNCTION__, func_get_args()); - } - - public function onGetStatus( - $phone, - $from, - $type, - $id, - $t, - $status - ) { - $this->handleEvent(__FUNCTION__, func_get_args()); - } - - public function onLoginFailed( - $phone, - $tag - ) { - $this->handleEvent(__FUNCTION__, func_get_args()); - } - - public function onMediaMessageSent( - $phone, - $to, - $id, - $filetype, - $url, - $filename, - $filesize, - $filehash, - $caption, - $icon - ) { - $this->handleEvent(__FUNCTION__, func_get_args()); - } - - public function onMediaUploadFailed( - $phone, - $id, - $node, - $messageNode, - $reason - ) { - $this->handleEvent(__FUNCTION__, func_get_args()); - } - - public function onProfilePictureChanged( - $phone, - $from, - $id, - $t - ) { - $this->handleEvent(__FUNCTION__, func_get_args()); - } - - public function onProfilePictureDeleted( - $phone, - $from, - $id, - $t - ) { - $this->handleEvent(__FUNCTION__, func_get_args()); - } - - public function onSendMessage( - $phone, - $targets, - $id, - $node - ) { - $this->handleEvent(__FUNCTION__, func_get_args()); - } - - /** - * @param SyncResult $result - * @return mixed|void - */ - public function onGetSyncResult( - $result - ) { - $this->handleEvent(__FUNCTION__, func_get_args()); - } - - public function onStreamError( - $tag - ) { - $this->handleEvent(__FUNCTION__, func_get_args()); - } - - public function onGetReceipt( - $from, - $id, - $offline, - $retry - ) { - $this->handleEvent(__FUNCTION__, func_get_args()); - } - -} diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index 5353512b..ad65605f 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -1,12 +1,12 @@ name = $nickname; $this->loginStatus = static::DISCONNECTED_STATUS; + $this->eventManager = new WhatsApiEventsManager(); } /** @@ -184,25 +185,31 @@ public function checkCredentials() $response = $this->getResponse($host, $query); if ($response->status != 'ok') { - $this->eventManager()->fireCredentialsBad($this->phoneNumber, $response->status, $response->reason); + $this->eventManager()->fire("onCredentialsBad", + array( + $this->phoneNumber, + $response->status, + $response->reason + )); if ($this->debug) { print_r($query); print_r($response); } throw new Exception('There was a problem trying to request the code.'); } else { - $this->eventManager()->fireCredentialsGood( - $this->phoneNumber, - $response->login, - $response->pw, - $response->type, - $response->expiration, - $response->kind, - $response->price, - $response->cost, - $response->currency, - $response->price_expiration - ); + $this->eventManager()->fire("onCredentialsGood", + array( + $this->phoneNumber, + $response->login, + $response->pw, + $response->type, + $response->expiration, + $response->kind, + $response->price, + $response->cost, + $response->currency, + $response->price_expiration + )); } return $response; @@ -266,30 +273,32 @@ public function codeRegister($code) if ($response->status != 'ok') { - $this->eventManager()->fireCodeRegisterFailed( - $this->phoneNumber, - $response->status, - $response->reason, - $response->retry_after - ); + $this->eventManager()->fire("onCodeRegisterFailed", + array( + $this->phoneNumber, + $response->status, + $response->reason, + $response->retry_after + )); if ($this->debug) { print_r($query); print_r($response); } throw new Exception('An error occurred registering the registration code from WhatsApp.'); } else { - $this->eventManager()->fireCodeRegister( - $this->phoneNumber, - $response->login, - $response->pw, - $response->type, - $response->expiration, - $response->kind, - $response->price, - $response->cost, - $response->currency, - $response->price_expiration - ); + $this->eventManager()->fire("onCodeRegister", + array( + $this->phoneNumber, + $response->login, + $response->pw, + $response->type, + $response->expiration, + $response->kind, + $response->price, + $response->cost, + $response->currency, + $response->price_expiration + )); } return $response; @@ -333,6 +342,7 @@ public function codeRequest($method = 'sms', $countryCode = null, $langCode = nu } if ($langCode == null) { $langCode = 'en'; + $langCode = 'en'; } // Build the token. @@ -364,43 +374,47 @@ public function codeRequest($method = 'sms', $countryCode = null, $langCode = nu } if ($response->status == 'ok') { - $this->eventManager()->fireCodeRegister( - $this->phoneNumber, - $response->login, - $response->pw, - $response->type, - $response->expiration, - $response->kind, - $response->price, - $response->cost, - $response->currency, - $response->price_expiration - ); + $this->eventManager()->fire("onCodeRegister", + array( + $this->phoneNumber, + $response->login, + $response->pw, + $response->type, + $response->expiration, + $response->kind, + $response->price, + $response->cost, + $response->currency, + $response->price_expiration + )); } else if ($response->status != 'sent') { if (isset($response->reason) && $response->reason == "too_recent") { - $this->eventManager()->fireCodeRequestFailedTooRecent( - $this->phoneNumber, - $method, - $response->reason, - $response->retry_after - ); + $this->eventManager()->fire("onCodeRequestFailedTooRecent", + array( + $this->phoneNumber, + $method, + $response->reason, + $response->retry_after + )); $minutes = round($response->retry_after / 60); throw new Exception("Code already sent. Retry after $minutes minutes."); } else { - $this->eventManager()->fireCodeRequestFailed( - $this->phoneNumber, - $method, - $response->reason, - $response->param - ); + $this->eventManager()->fire("onCodeRequestFailed", + array( + $this->phoneNumber, + $method, + $response->reason, + $response->param + )); throw new Exception('There was a problem trying to request the code.'); } } else { - $this->eventManager()->fireCodeRequest( - $this->phoneNumber, - $method, - $response->length - ); + $this->eventManager()->fire("onCodeRequest", + array( + $this->phoneNumber, + $method, + $response->length + )); } return $response; @@ -429,18 +443,21 @@ public function connect() if ($Socket !== false) { stream_set_timeout($Socket, static::TIMEOUT_SEC, static::TIMEOUT_USEC); $this->socket = $Socket; - $this->eventManager()->fireConnect( - $this->phoneNumber, - $this->socket + $this->eventManager()->fire('onConnect', + array( + $this->phoneNumber, + $this->socket + ) ); } else { if ($this->debug) { print_r("Firing onConnectError\n"); } - $this->eventManager()->fireConnectError( - $this->phoneNumber, - $this->socket - ); + $this->eventManager()->fire("onConnectError", + array( + $this->phoneNumber, + $this->socket + )); } } @@ -451,25 +468,21 @@ public function disconnect() { if (is_resource($this->socket)) { fclose($this->socket); - $this->eventManager()->fireDisconnect( - $this->phoneNumber, - $this->socket + $this->eventManager()->fire('onDisconnect', + array( + $this->phoneNumber, + $this->socket + ) ); } } /** - * Gets a new micro event dispatcher. - * - * @return WhatsAppEvent The event manager. + * @return WhatsApiEventsManager */ public function eventManager() { - if (!is_object($this->event)) { - $this->event = new WhatsAppEvent(); - } - - return $this->event; + return $this->eventManager; } /** @@ -1138,10 +1151,11 @@ public function sendGroupsChatCreate($subject, $participants = array()) $this->sendGroupsParticipantsAdd($groupId, $participants); } - $this->eventManager()->fireGroupCreate( - $this->phoneNumber, - $groupId - ); + $this->eventManager()->fire("onGroupCreate", + array( + $this->phoneNumber, + $groupId + )); return $groupId; } @@ -1517,10 +1531,11 @@ public function sendPong($msgid) $messageNode = new ProtocolNode("iq", $messageHash, null, ""); $this->sendNode($messageNode); - $this->eventManager()->fireSendPong( - $this->phoneNumber, - $msgid - ); + $this->eventManager()->fire("onSendPong", + array( + $this->phoneNumber, + $msgid + )); } public function sendAvailableForChat($nickname = null) @@ -1548,11 +1563,12 @@ public function sendPresence($type = "active") $presence['type'] = $type; $node = new ProtocolNode("presence", $presence, null, ""); $this->sendNode($node); - $this->eventManager()->fireSendPresence( - $this->phoneNumber, - $presence['type'], - $this->name - ); + $this->eventManager()->fire("onSendPresence", + array( + $this->phoneNumber, + $presence['type'], + $this->name + )); } /** @@ -1669,10 +1685,11 @@ public function sendStatusUpdate($txt) ), array($child), null); $this->sendNode($node); - $this->eventManager()->fireSendStatusUpdate( - $this->phoneNumber, - $txt - ); + $this->eventManager()->fire("onSendStatusUpdate", + array( + $this->phoneNumber, + $txt + )); } /** @@ -1756,17 +1773,19 @@ public function uploadFile($file) $url = strip_tags($xml->dict->string[3]->asXML()); if (!empty($url)) { - $this->eventManager()->fireUploadFile( - $this->phoneNumber, - basename($file), - $url - ); + $this->eventManager()->fire("onUploadFile", + array( + $this->phoneNumber, + basename($file), + $url + )); return $url; } else { - $this->eventManager()->fireUploadFileFailed( - $this->phoneNumber, - basename($file) - ); + $this->eventManager()->fire("onUploadFileFailed", + array( + $this->phoneNumber, + basename($file) + )); return false; } } @@ -1958,15 +1977,16 @@ protected function dissectPhone() 'mnc' => $data[5] ); - $this->eventManager()->fireDissectPhone( - $this->phoneNumber, - $phone['country'], - $phone['cc'], - $phone['phone'], - $phone['mcc'], - $phone['ISO3166'], - $phone['ISO639'], - $phone['mnc'] + $this->eventManager()->fire('onDissectPhone', array( + $this->phoneNumber, + $phone['country'], + $phone['cc'], + $phone['phone'], + $phone['mcc'], + $phone['ISO3166'], + $phone['ISO639'], + $phone['mnc'] + ) ); return $phone; @@ -1975,9 +1995,10 @@ protected function dissectPhone() fclose($handle); } - $this->eventManager()->fireDissectPhoneFailed( - $this->phoneNumber - ); + $this->eventManager()->fire("onDissectPhoneFailed", + array( + $this->phoneNumber + )); return false; } @@ -2017,9 +2038,10 @@ protected function doLogin() } else { - $this->eventManager()->fireLogin( - $this->phoneNumber - ); + $this->eventManager()->fire("onLogin", + array( + $this->phoneNumber + )); $this->sendAvailableForChat(); } } @@ -2282,30 +2304,33 @@ protected function processInboundDataNode(ProtocolNode $node, $autoReceipt = tru $this->writer->setKey($this->outputKey); } elseif($node->getTag() == "failure") { - $this->eventManager()->fireLoginFailed( - $this->phoneNumber, - $node->getChild(0)->getTag() - ); + $this->eventManager()->fire("onLoginFailed", + array( + $this->phoneNumber, + $node->getChild(0)->getTag() + )); } elseif($node->getTag() == 'ack' && $node->getAttribute("class") == "message") { - $this->eventManager()->fireMessageReceivedServer( - $this->phoneNumber, - $node->getAttribute('from'), - $node->getAttribute('id'), - $node->getAttribute('class'), - $node->getAttribute('t') - ); + $this->eventManager()->fire("onMessageReceivedServer", + array( + $this->phoneNumber, + $node->getAttribute('from'), + $node->getAttribute('id'), + $node->getAttribute('class'), + $node->getAttribute('t') + )); } elseif($node->getTag() == 'receipt') { - $this->eventManager()->fireMessageReceivedClient( - $this->phoneNumber, - $node->getAttribute('from'), - $node->getAttribute('id'), - $node->getAttribute('class'), - $node->getAttribute('t') - ); + $this->eventManager()->fire("onMessageReceivedClient", + array( + $this->phoneNumber, + $node->getAttribute('from'), + $node->getAttribute('id'), + $node->getAttribute('class'), + $node->getAttribute('t') + )); } if ($node->getTag() == "message") { array_push($this->messageQueue, $node); @@ -2321,29 +2346,31 @@ protected function processInboundDataNode(ProtocolNode $node, $autoReceipt = tru if($author == "") { //private chat message - $this->eventManager()->fireGetMessage( - $this->phoneNumber, - $node->getAttribute('from'), - $node->getAttribute('id'), - $node->getAttribute('type'), - $node->getAttribute('t'), - $node->getAttribute("notify"), - $node->getChild("body")->getData() - ); + $this->eventManager()->fire("onGetMessage", + array( + $this->phoneNumber, + $node->getAttribute('from'), + $node->getAttribute('id'), + $node->getAttribute('type'), + $node->getAttribute('t'), + $node->getAttribute("notify"), + $node->getChild("body")->getData() + )); } else { //group chat message - $this->eventManager()->fireGetGroupMessage( - $this->phoneNumber, - $node->getAttribute('from'), - $author, - $node->getAttribute('id'), - $node->getAttribute('type'), - $node->getAttribute('t'), - $node->getAttribute("notify"), - $node->getChild("body")->getData() - ); + $this->eventManager()->fire("onGetGroupMessage", + array( + $this->phoneNumber, + $node->getAttribute('from'), + $author, + $node->getAttribute('id'), + $node->getAttribute('type'), + $node->getAttribute('t'), + $node->getAttribute("notify"), + $node->getChild("body")->getData() + )); } if($autoReceipt) @@ -2353,86 +2380,91 @@ protected function processInboundDataNode(ProtocolNode $node, $autoReceipt = tru } if ($node->getAttribute("type") == "media" && $node->getChild('media') != null) { if ($node->getChild("media")->getAttribute('type') == 'image') { - $this->eventManager()->fireGetImage( - $this->phoneNumber, - $node->getAttribute('from'), - $node->getAttribute('id'), - $node->getAttribute('type'), - $node->getAttribute('t'), - $node->getAttribute('notify'), - $node->getChild("media")->getAttribute('size'), - $node->getChild("media")->getAttribute('url'), - $node->getChild("media")->getAttribute('file'), - $node->getChild("media")->getAttribute('mimetype'), - $node->getChild("media")->getAttribute('filehash'), - $node->getChild("media")->getAttribute('width'), - $node->getChild("media")->getAttribute('height'), - $node->getChild("media")->getData(), - $node->getChild("media")->getAttribute('caption') - ); + $this->eventManager()->fire("onGetImage", + array( + $this->phoneNumber, + $node->getAttribute('from'), + $node->getAttribute('id'), + $node->getAttribute('type'), + $node->getAttribute('t'), + $node->getAttribute('notify'), + $node->getChild("media")->getAttribute('size'), + $node->getChild("media")->getAttribute('url'), + $node->getChild("media")->getAttribute('file'), + $node->getChild("media")->getAttribute('mimetype'), + $node->getChild("media")->getAttribute('filehash'), + $node->getChild("media")->getAttribute('width'), + $node->getChild("media")->getAttribute('height'), + $node->getChild("media")->getData(), + $node->getChild("media")->getAttribute('caption') + )); } elseif ($node->getChild("media")->getAttribute('type') == 'video') { - $this->eventManager()->fireGetVideo( - $this->phoneNumber, - $node->getAttribute('from'), - $node->getAttribute('id'), - $node->getAttribute('type'), - $node->getAttribute('t'), - $node->getAttribute('notify'), - $node->getChild("media")->getAttribute('url'), - $node->getChild("media")->getAttribute('file'), - $node->getChild("media")->getAttribute('size'), - $node->getChild("media")->getAttribute('mimetype'), - $node->getChild("media")->getAttribute('filehash'), - $node->getChild("media")->getAttribute('duration'), - $node->getChild("media")->getAttribute('vcodec'), - $node->getChild("media")->getAttribute('acodec'), - $node->getChild("media")->getData(), - $node->getChild("media")->getAttribute('caption') - ); + $this->eventManager()->fire("onGetVideo", + array( + $this->phoneNumber, + $node->getAttribute('from'), + $node->getAttribute('id'), + $node->getAttribute('type'), + $node->getAttribute('t'), + $node->getAttribute('notify'), + $node->getChild("media")->getAttribute('url'), + $node->getChild("media")->getAttribute('file'), + $node->getChild("media")->getAttribute('size'), + $node->getChild("media")->getAttribute('mimetype'), + $node->getChild("media")->getAttribute('filehash'), + $node->getChild("media")->getAttribute('duration'), + $node->getChild("media")->getAttribute('vcodec'), + $node->getChild("media")->getAttribute('acodec'), + $node->getChild("media")->getData(), + $node->getChild("media")->getAttribute('caption') + )); } elseif ($node->getChild("media")->getAttribute('type') == 'audio') { - $this->eventManager()->fireGetAudio( - $this->phoneNumber, - $node->getAttribute('from'), - $node->getAttribute('id'), - $node->getAttribute('type'), - $node->getAttribute('t'), - $node->getAttribute('notify'), - $node->getChild("media")->getAttribute('size'), - $node->getChild("media")->getAttribute('url'), - $node->getChild("media")->getAttribute('file'), - $node->getChild("media")->getAttribute('mimetype'), - $node->getChild("media")->getAttribute('filehash'), - $node->getChild("media")->getAttribute('duration'), - $node->getChild("media")->getAttribute('acodec') - ); + $this->eventManager()->fire("onGetAudio", + array( + $this->phoneNumber, + $node->getAttribute('from'), + $node->getAttribute('id'), + $node->getAttribute('type'), + $node->getAttribute('t'), + $node->getAttribute('notify'), + $node->getChild("media")->getAttribute('size'), + $node->getChild("media")->getAttribute('url'), + $node->getChild("media")->getAttribute('file'), + $node->getChild("media")->getAttribute('mimetype'), + $node->getChild("media")->getAttribute('filehash'), + $node->getChild("media")->getAttribute('duration'), + $node->getChild("media")->getAttribute('acodec') + )); } elseif ($node->getChild("media")->getAttribute('type') == 'vcard') { - $this->eventManager()->fireGetvCard( - $this->phoneNumber, - $node->getAttribute('from'), - $node->getAttribute('id'), - $node->getAttribute('type'), - $node->getAttribute('t'), - $node->getAttribute('notify'), - $node->getChild("media")->getChild("vcard")->getAttribute('name'), - $node->getChild("media")->getChild("vcard")->getData() - ); + $this->eventManager()->fire("onGetvCard", + array( + $this->phoneNumber, + $node->getAttribute('from'), + $node->getAttribute('id'), + $node->getAttribute('type'), + $node->getAttribute('t'), + $node->getAttribute('notify'), + $node->getChild("media")->getChild("vcard")->getAttribute('name'), + $node->getChild("media")->getChild("vcard")->getData() + )); } elseif ($node->getChild("media")->getAttribute('type') == 'location') { $url = $node->getChild("media")->getAttribute('url'); $name = $node->getChild("media")->getAttribute('name'); - $this->eventManager()->fireGetLocation( - $this->phoneNumber, - $node->getAttribute('from'), - $node->getAttribute('id'), - $node->getAttribute('type'), - $node->getAttribute('t'), - $node->getAttribute('notify'), - $name, - $node->getChild("media")->getAttribute('longitude'), - $node->getChild("media")->getAttribute('latitude'), - $url, - $node->getChild("media")->getData() - ); + $this->eventManager()->fire("onGetLocation", + array( + $this->phoneNumber, + $node->getAttribute('from'), + $node->getAttribute('id'), + $node->getAttribute('type'), + $node->getAttribute('t'), + $node->getAttribute('notify'), + $name, + $node->getChild("media")->getAttribute('longitude'), + $node->getChild("media")->getAttribute('latitude'), + $url, + $node->getChild("media")->getData() + )); } if($autoReceipt) @@ -2441,13 +2473,14 @@ protected function processInboundDataNode(ProtocolNode $node, $autoReceipt = tru } } if ($node->getChild('received') != null) { - $this->eventManager()->fireMessageReceivedClient( - $this->phoneNumber, - $node->getAttribute('from'), - $node->getAttribute('id'), - $node->getAttribute('type'), - $node->getAttribute('t') - ); + $this->eventManager()->fire("onMessageReceivedClient", + array( + $this->phoneNumber, + $node->getAttribute('from'), + $node->getAttribute('id'), + $node->getAttribute('type'), + $node->getAttribute('t') + )); } } if ($node->getTag() == "presence" && $node->getAttribute("status") == "dirty") { @@ -2466,18 +2499,20 @@ protected function processInboundDataNode(ProtocolNode $node, $autoReceipt = tru && strpos($node->getAttribute('from'), "-") == false) { $presence = array(); if($node->getAttribute('type') == null){ - $this->eventManager()->firePresence( - $this->phoneNumber, - $node->getAttribute('from'), - $presence['type'] = "available" - ); + $this->eventManager()->fire("onPresence", + array( + $this->phoneNumber, + $node->getAttribute('from'), + $presence['type'] = "available" + )); } else{ - $this->eventManager()->firePresence( - $this->phoneNumber, - $node->getAttribute('from'), - $presence['type'] = "unavailable" - ); + $this->eventManager()->fire("onPresence", + array( + $this->phoneNumber, + $node->getAttribute('from'), + $presence['type'] = "unavailable" + )); } } if ($node->getTag() == "presence" @@ -2486,49 +2521,54 @@ protected function processInboundDataNode(ProtocolNode $node, $autoReceipt = tru && $node->getAttribute('type') != null) { $groupId = self::parseJID($node->getAttribute('from')); if ($node->getAttribute('add') != null) { - $this->eventManager()->fireGroupsParticipantsAdd( - $this->phoneNumber, - $groupId, - self::parseJID($node->getAttribute('add')) - ); + $this->eventManager()->fire("onGroupsParticipantsAdd", + array( + $this->phoneNumber, + $groupId, + self::parseJID($node->getAttribute('add')) + )); } elseif ($node->getAttribute('remove') != null) { - $this->eventManager()->fireGroupsParticipantsRemove( - $this->phoneNumber, - $groupId, - self::parseJID($node->getAttribute('remove')), - self::parseJID($node->getAttribute('author')) - ); + $this->eventManager()->fire("onGroupsParticipantsRemove", + array( + $this->phoneNumber, + $groupId, + self::parseJID($node->getAttribute('remove')), + self::parseJID($node->getAttribute('author')) + )); } } if (strcmp($node->getTag(), "chatstate") == 0 && strncmp($node->getAttribute('from'), $this->phoneNumber, strlen($this->phoneNumber)) != 0 && strpos($node->getAttribute('from'), "-") == false) { if($node->getChild(0)->getTag() == "composing"){ - $this->eventManager()->fireMessageComposing( - $this->phoneNumber, - $node->getAttribute('from'), - $node->getAttribute('id'), - "composing", - $node->getAttribute('t') - ); + $this->eventManager()->fire("onMessageComposing", + array( + $this->phoneNumber, + $node->getAttribute('from'), + $node->getAttribute('id'), + "composing", + $node->getAttribute('t') + )); } else{ - $this->eventManager()->fireMessagePaused( - $this->phoneNumber, - $node->getAttribute('from'), - $node->getAttribute('id'), - "paused", - $node->getAttribute('t') - ); + $this->eventManager()->fire("onMessagePaused", + array( + $this->phoneNumber, + $node->getAttribute('from'), + $node->getAttribute('id'), + "paused", + $node->getAttribute('t') + )); } } if ($node->getTag() == "iq" && $node->getAttribute('type') == "get" && $node->getAttribute('xmlns') == "urn:xmpp:ping") { - $this->eventManager()->firePing( - $this->phoneNumber, - $node->getAttribute('id') - ); + $this->eventManager()->fire("onPing", + array( + $this->phoneNumber, + $node->getAttribute('id') + )); $this->sendPong($node->getAttribute('id')); } if ($node->getTag() == "iq" @@ -2559,15 +2599,19 @@ protected function processInboundDataNode(ProtocolNode $node, $autoReceipt = tru $result = new SyncResult($index, $sync->getAttribute("sync"), $existingUsers, $failedNumbers); - $this->eventManager()->fireGetSyncResult($result); + $this->eventManager()->fire("onGetSyncResult", + array( + $result + )); } if ($node->getTag() == "receipt") { - $this->eventManager()->fireGetReceipt( - $node->getAttribute('from'), - $node->getAttribute('id'), - $node->getAttribute('offline'), - $node->getAttribute('retry') - ); + $this->eventManager()->fire("onGetReceipt", + array( + $node->getAttribute('from'), + $node->getAttribute('id'), + $node->getAttribute('offline'), + $node->getAttribute('retry') + )); } if ($node->getTag() == "iq" && $node->getAttribute('type') == "result") { @@ -2575,17 +2619,19 @@ protected function processInboundDataNode(ProtocolNode $node, $autoReceipt = tru if ($node->getChild(0)->getAttribute('xmlns') == 'jabber:iq:privacy') { // ToDo: We need to get explicitly list out the children as arguments // here. - $this->eventManager()->fireGetPrivacyBlockedList( - $this->phoneNumber, - $node->getChild(0)->getChild(0)->getChildren() - ); + $this->eventManager()->fire("onGetPrivacyBlockedList", + array( + $this->phoneNumber, + $node->getChild(0)->getChild(0)->getChildren() + )); } - $this->eventManager()->fireGetRequestLastSeen( - $this->phoneNumber, - $node->getAttribute('from'), - $node->getAttribute('id'), - $node->getChild(0)->getAttribute('seconds') - ); + $this->eventManager()->fire("onGetRequestLastSeen", + array( + $this->phoneNumber, + $node->getAttribute('from'), + $node->getAttribute('id'), + $node->getChild(0)->getAttribute('seconds') + )); array_push($this->messageQueue, $node); } if ($node->getChild("props") != null) { @@ -2594,19 +2640,21 @@ protected function processInboundDataNode(ProtocolNode $node, $autoReceipt = tru foreach($node->getChild(0)->getChildren() as $child) { $props[$child->getAttribute("name")] = $child->getAttribute("value"); } - $this->eventManager()->fireGetServerProperties( - $this->phoneNumber, - $node->getChild(0)->getAttribute("version"), - $props - ); + $this->eventManager()->fire("onGetServerProperties", + array( + $this->phoneNumber, + $node->getChild(0)->getAttribute("version"), + $props + )); } if ($node->getChild("picture") != null) { - $this->eventManager()->fireGetProfilePicture( - $this->phoneNumber, - $node->getAttribute("from"), - $node->getChild("picture")->getAttribute("type"), - $node->getChild("picture")->getData() - ); + $this->eventManager()->fire("onGetProfilePicture", + array( + $this->phoneNumber, + $node->getAttribute("from"), + $node->getChild("picture")->getAttribute("type"), + $node->getChild("picture")->getData() + )); } if ($node->getChild("media") != null || $node->getChild("duplicate") != null) { $this->processUploadResponse($node); @@ -2622,37 +2670,42 @@ protected function processInboundDataNode(ProtocolNode $node, $autoReceipt = tru } if($node->nodeIdContains('creategroup')){ $this->groupId = $node->getChild(0)->getAttribute('id'); - $this->eventManager()->fireGroupsChatCreate( - $this->phoneNumber, - $this->groupId - ); + $this->eventManager()->fire("onGroupsChatCreate", + array( + $this->phoneNumber, + $this->groupId + )); } if($node->nodeIdContains('endgroup')){ $this->groupId = $node->getChild(0)->getChild(0)->getAttribute('id'); - $this->eventManager()->fireGroupsChatEnd( - $this->phoneNumber, - $this->groupId - ); + $this->eventManager()->fire("onGroupsChatEnd", + array( + $this->phoneNumber, + $this->groupId + )); } if($node->nodeIdContains('getgroups')){ - $this->eventManager()->fireGetGroups( - $this->phoneNumber, - $groupList - ); + $this->eventManager()->fire("onGetGroups", + array( + $this->phoneNumber, + $groupList + )); } if($node->nodeIdContains('getgroupinfo')){ - $this->eventManager()->fireGetGroupsInfo( - $this->phoneNumber, - $groupList - ); + $this->eventManager()->fire("onGetGroupsInfo", + array( + $this->phoneNumber, + $groupList + )); } if($node->nodeIdContains('getgroupparticipants')){ $groupId = self::parseJID($node->getAttribute('from')); - $this->eventManager()->fireGetGroupParticipants( - $this->phoneNumber, - $groupId, - $groupList - ); + $this->eventManager()->fire("onGetGroupParticipants", + array( + $this->phoneNumber, + $groupId, + $groupList + )); } } if ($node->nodeIdContains("get_lists")) { @@ -2672,77 +2725,84 @@ protected function processInboundDataNode(ProtocolNode $node, $autoReceipt = tru } } } - $this->eventManager()->fireGetBroadcastLists( - $this->phoneNumber, - $broadcastLists - ); + $this->eventManager()->fire("onGetBroadcastLists", + array( + $this->phoneNumber, + $broadcastLists + )); } if($node->getChild("pricing") != null) { - $this->eventManager()->fireGetServicePricing( - $this->phoneNumber, - $node->getChild(0)->getAttribute("price"), - $node->getChild(0)->getAttribute("cost"), - $node->getChild(0)->getAttribute("currency"), - $node->getChild(0)->getAttribute("expiration") - ); + $this->eventManager()->fire("onGetServicePricing", + array( + $this->phoneNumber, + $node->getChild(0)->getAttribute("price"), + $node->getChild(0)->getAttribute("cost"), + $node->getChild(0)->getAttribute("currency"), + $node->getChild(0)->getAttribute("expiration") + )); } if($node->getChild("extend") != null) { - $this->eventManager()->fireGetExtendAccount( - $this->phoneNumber, - $node->getChild("account")->getAttribute("kind"), - $node->getChild("account")->getAttribute("status"), - $node->getChild("account")->getAttribute("creation"), - $node->getChild("account")->getAttribute("expiration") - ); + $this->eventManager()->fire("onGetExtendAccount", + array( + $this->phoneNumber, + $node->getChild("account")->getAttribute("kind"), + $node->getChild("account")->getAttribute("status"), + $node->getChild("account")->getAttribute("creation"), + $node->getChild("account")->getAttribute("expiration") + )); } if($node->getChild("normalize") != null) { - $this->eventManager()->fireGetNormalizedJid( - $this->phoneNumber, - $node->getChild(0)->getAttribute("result") - ); + $this->eventManager()->fire("onGetNormalizedJid", + array( + $this->phoneNumber, + $node->getChild(0)->getAttribute("result") + )); } if($node->getChild("status") != null) { $child = $node->getChild("status"); foreach($child->getChildren() as $status) { - $this->eventManager()->fireGetStatus( - $this->phoneNumber, - $status->getAttribute("jid"), - "requested", - $node->getAttribute("id"), - $status->getAttribute("t"), - $status->getData() - ); + $this->eventManager()->fire("onGetStatus", + array( + $this->phoneNumber, + $status->getAttribute("jid"), + "requested", + $node->getAttribute("id"), + $status->getAttribute("t"), + $status->getData() + )); } } } if ($node->getTag() == "iq" && $node->getAttribute('type') == "error") { - $this->eventManager()->fireGetError( - $this->phoneNumber, - $node->getAttribute( 'id' ), - $node->getChild(0) - ); + $this->eventManager()->fire("onGetError", + array( + $this->phoneNumber, + $node->getAttribute('id'), + $node->getChild(0) + )); } $children = $node->getChild(0); if ($node->getTag() == "stream:error" && empty($children) == false && $node->getChild(0)->getTag() == "system-shutdown") { - $this->eventManager()->fireStreamError( - $node->getChild(0)->getTag() - ); - + $this->eventManager()->fire("onStreamError", + array( + $node->getChild(0)->getTag() + )); } if ($node->getTag() == "stream:error") { - $this->eventManager()->fireStreamError( - $node->getChild(0)->getTag() - ); + $this->eventManager()->fire("onStreamError", + array( + $node->getChild(0)->getTag() + )); } if($node->getTag() == "notification") @@ -2752,29 +2812,33 @@ protected function processInboundDataNode(ProtocolNode $node, $autoReceipt = tru switch($type) { case "status": - $this->eventManager()->fireGetStatus( - $this->phoneNumber, //my number - $node->getAttribute("from"), //sender - $node->getChild(0)->getTag(), //type (set/remove) - $node->getAttribute("id"), //message id - $node->getAttribute("t"), //time - $node->getChild(0)->getData()); //status message + $this->eventManager()->fire("onGetStatus", + array( + $this->phoneNumber, //my number + $node->getAttribute("from"), + $node->getChild(0)->getTag(), + $node->getAttribute("id"), + $node->getAttribute("t"), + $node->getChild(0)->getData() + )); break; case "picture": if ($node->hasChild('set')) { - $this->eventManager()->fireProfilePictureChanged( - $this->phoneNumber, - $node->getAttribute('from'), - $node->getAttribute('id'), - $node->getAttribute('t') - ); + $this->eventManager()->fire("onProfilePictureChanged", + array( + $this->phoneNumber, + $node->getAttribute('from'), + $node->getAttribute('id'), + $node->getAttribute('t') + )); } else if ($node->hasChild('delete')) { - $this->eventManager()->fireProfilePictureDeleted( - $this->phoneNumber, - $node->getAttribute('from'), - $node->getAttribute('id'), - $node->getAttribute('t') - ); + $this->eventManager()->fire("onProfilePictureDeleted", + array( + $this->phoneNumber, + $node->getAttribute('from'), + $node->getAttribute('id'), + $node->getAttribute('t') + )); } //TODO break; @@ -2792,36 +2856,40 @@ protected function processInboundDataNode(ProtocolNode $node, $autoReceipt = tru break; case "w:gp2": if ($node->hasChild('remove')) { - $this->eventManager()->fireGroupsParticipantsRemove( - $this->phoneNumber, - $node->getAttribute('from'), - $node->getChild(0)->getChild(0)->getAttribute('jid') - ); + $this->eventManager()->fire("onGroupsParticipantsRemove", + array( + $this->phoneNumber, + $node->getAttribute('from'), + $node->getChild(0)->getChild(0)->getAttribute('jid') + )); } else if ($node->hasChild('add')) { - $this->eventManager()->fireGroupsParticipantsAdd( - $this->phoneNumber, - $node->getAttribute('from'), - $node->getChild(0)->getChild(0)->getAttribute('jid') - ); + $this->eventManager()->fire("onGroupsParticipantsAdd", + array( + $this->phoneNumber, + $node->getAttribute('from'), + $node->getChild(0)->getChild(0)->getAttribute('jid') + )); } else if ($node->hasChild('create')) { - $this->eventManager()->fireGroupisCreated( - $this->phoneNumber, - $node->getChild(0)->getChild(0)->getAttribute('creator'), - $node->getChild(0)->getChild(0)->getAttribute('id'), - $node->getChild(0)->getChild(0)->getAttribute('subject') - ); + $this->eventManager()->fire("onGroupisCreated", + array( + $this->phoneNumber, + $node->getChild(0)->getChild(0)->getAttribute('creator'), + $node->getChild(0)->getChild(0)->getAttribute('id'), + $node->getChild(0)->getChild(0)->getAttribute('subject') + )); } else if ($node->hasChild('subject')) { - $this->eventManager()->fireGetGroupsSubject( - $this->phoneNumber, - $node->getAttribute('from'), - $node->getAttribute('t'), - $node->getAttribute('participant'), - $node->getAttribute('participant'), - $node->getAttribute('notify'), - $node->getChild(0)->getAttribute('subject') - ); + $this->eventManager()->fire("onGetGroupsSubject", + array( + $this->phoneNumber, + $node->getAttribute('from'), + $node->getAttribute('t'), + $node->getAttribute('participant'), + $node->getAttribute('participant'), + $node->getAttribute('notify'), + $node->getChild(0)->getAttribute('subject') + )); } break; case "account": @@ -2829,14 +2897,15 @@ protected function processInboundDataNode(ProtocolNode $node, $autoReceipt = tru $author = "Paypal"; else $author = $node->getChild(0)->getAttribute('author'); - $this->eventManager()->firePaidAccount( - $this->phoneNumber, - $author, - $node->getChild(0)->getChild(0)->getAttribute('kind'), - $node->getChild(0)->getChild(0)->getAttribute('status'), - $node->getChild(0)->getChild(0)->getAttribute('creation'), - $node->getChild(0)->getChild(0)->getAttribute('expiration') - ); + $this->eventManager()->fire("onPaidAccount", + array( + $this->phoneNumber, + $author, + $node->getChild(0)->getChild(0)->getAttribute('kind'), + $node->getChild(0)->getChild(0)->getAttribute('status'), + $node->getChild(0)->getChild(0)->getAttribute('creation'), + $node->getChild(0)->getChild(0)->getAttribute('expiration') + )); break; default: throw new Exception("Method $type not implemented"); @@ -2982,13 +3051,14 @@ protected function processUploadResponse($node) $messageNode = @$this->mediaQueue[$id]; if ($messageNode == null) { //message not found, can't send! - $this->eventManager()->fireMediaUploadFailed( - $this->phoneNumber, - $id, - $node, - $messageNode, - "Message node not found in queue" - ); + $this->eventManager()->fire("onMediaUploadFailed", + array( + $this->phoneNumber, + $id, + $node, + $messageNode, + "Message node not found in queue" + )); return false; } @@ -3010,13 +3080,14 @@ protected function processUploadResponse($node) if (!$json) { //failed upload - $this->eventManager()->fireMediaUploadFailed( - $this->phoneNumber, - $id, - $node, - $messageNode, - "Failed to push file to server" - ); + $this->eventManager()->fire("onMediaUploadFailed", + array( + $this->phoneNumber, + $id, + $node, + $messageNode, + "Failed to push file to server" + )); return false; } @@ -3037,7 +3108,7 @@ protected function processUploadResponse($node) $mediaAttribs["file"] = $filename; $mediaAttribs["size"] = $filesize; $mediaAttribs["hash"] = $filehash; - $mediaAttribs["caption"] = $this->mediaQueue[$id]['caption']; + $mediaAttribs["caption"] = $this->mediaQueue[$id]['caption']; $filepath = $this->mediaQueue[$id]['filePath']; $to = $this->mediaQueue[$id]['to']; @@ -3063,18 +3134,19 @@ protected function processUploadResponse($node) } else { $this->sendMessageNode($to, $mediaNode); } - $this->eventManager()->fireMediaMessageSent( - $this->phoneNumber, - $to, - $id, - $filetype, - $url, - $filename, - $filesize, - $filehash, - $caption, - $icon - ); + $this->eventManager()->fire("onMediaMessageSent", + array( + $this->phoneNumber, + $to, + $id, + $filetype, + $url, + $filename, + $filesize, + $filehash, + $caption, + $icon + )); return true; } @@ -3124,19 +3196,21 @@ public function readStanza() $error = "socket EOF, closing socket..."; fclose($this->socket); $this->socket = null; - $this->eventManager()->fireClose( - $this->phoneNumber, - $error - ); + $this->eventManager()->fire("onClose", + array( + $this->phoneNumber, + $error + )); } $buff = $header . $buff; } else { - $this->eventManager()->fireDisconnect( - $this->phoneNumber, - $this->socket - ); + $this->eventManager()->fire("onDisconnect", + array( + $this->phoneNumber, + $this->socket + )); } return $buff; @@ -3212,12 +3286,13 @@ protected function sendBroadcast($targets, $node, $type) $messageNode = new ProtocolNode("message", $messageHash, array($broadcastNode, $xNode, $node), null); $this->sendNode($messageNode); //listen for response - $this->eventManager()->fireSendMessage( - $this->phoneNumber, - $targets, - $messageHash["id"], - $node - ); + $this->eventManager()->fire("onSendMessage", + array( + $this->phoneNumber, + $targets, + $messageHash["id"], + $node + )); return $id; } @@ -3320,12 +3395,13 @@ protected function sendMessageNode($to, $node, $id = null) $messageNode = new ProtocolNode("message", $messageHash, array($xNode, $notnode, $reqnode, $node), ""); $this->sendNode($messageNode); - $this->eventManager()->fireSendMessage( - $this->phoneNumber, - $this->getJID($to), - $messageHash["id"], - $node - ); + $this->eventManager()->fire("onSendMessage", + array( + $this->phoneNumber, + $this->getJID($to), + $messageHash["id"], + $node + )); return $messageHash["id"]; } @@ -3346,12 +3422,13 @@ protected function sendMessageReceived($msg, $type = null) $messageHash["id"] = $msg->getAttribute("id"); $messageNode = new ProtocolNode("receipt", $messageHash, null, null); $this->sendNode($messageNode); - $this->eventManager()->fireSendMessageReceived( - $this->phoneNumber, - $msg->getAttribute("id"), - $msg->getAttribute("from"), - $type - ); + $this->eventManager()->fire("onSendMessageReceived", + array( + $this->phoneNumber, + $msg->getAttribute("id"), + $msg->getAttribute("from"), + $type + )); } /** From 5aaed0235c36f61b0dc8b1946786984808a7e08e Mon Sep 17 00:00:00 2001 From: Jonathan Williamson Date: Sat, 1 Nov 2014 20:38:31 +0000 Subject: [PATCH 089/436] Proper list of all currently used events in whatspi. This list is DEFINITIVE. --- src/events/AllEvents.php | 271 +++++++++++---------------------------- 1 file changed, 74 insertions(+), 197 deletions(-) diff --git a/src/events/AllEvents.php b/src/events/AllEvents.php index d9692045..f07725a7 100644 --- a/src/events/AllEvents.php +++ b/src/events/AllEvents.php @@ -12,12 +12,22 @@ public function __construct(WhatsProt $whatsProt) return $this; } + /** + * Register the events you want to listen for. + * + * @param array $eventList + * @return AllEvents + */ public function setEventsToListenFor(array $eventList) { $this->eventsToListenFor = $eventList; return $this->startListening(); } + /** + * Binds the requested events to the event manager. + * @return $this + */ protected function startListening() { foreach ($this->eventsToListenFor as $event) { @@ -28,203 +38,70 @@ protected function startListening() return $this; } - public function onSendMessage($mynumber, $target, $messageId, $innerNode) - { - } - - public function onSendMessageReceived($mynumber, $time, $from) - { - } - - public function onUserComposing($mynumber, $from, $type, $time) - { - } - - public function onUserPaused($mynumber, $from, $type, $time) - { - } - - public function onGetMessage($mynumber, $from, $id, $type, $time, $name, $body) - { - } - - public function onGroupsChatisCreated($phone, $creator, $gId, $subject) - { - } - - public function onGetGroupMessage($mynumber, $from_group_jid, $from_user_jid, $id, $type, $time, $name, $body) - { - } - - public function onGetImage( - $mynumber, $from, $id, $type, $time, $name, $size, $url, $file, $mimetype, $filehash, $width, $height, $preview, - $caption - ) { - } - - public function onGetVideo( - $mynumber, $from, $id, $type, $time, $name, $url, $file, $size, $mimetype, $filehash, $duration, $vcodec, - $acodec, $data, $caption - ) { - } - - public function onGetAudio( - $mynumber, $from, $id, $type, $time, $name, $size, $url, $file, $mimetype, $filehash, $duration, $acodec - ) { - } - - public function onGetVcard($mynumber, $from, $id, $type, $time, $name, $vCardName, $vCard) - { - } - - public function onGetLocation($mynumber, $from, $id, $type, $time, $name, $longtitude, $latitude, $data) - { - } - - public function onGetPlace($mynumber, $from, $id, $type, $time, $name, $placeName, $longtitude, $latitude, $url) - { - } - - public function onMessageReceivedServer($mynumber, $from, $id, $type) - { - } - - public function onMessageReceivedClient($mynumber, $from, $id, $type, $time) - { - } - - public function onGetGroupSubject($mynumber, $gjid, $time, $author, $name, $data) - { - } - - public function onGetPresence($mynumber, $from, $type) - { - } - - public function onAddParticipantGroup($mynumber, $gjid, $participant) - { - } - - public function onRemoveParticipantGroup($mynumber, $gjid, $participant, $author) - { - } - - public function onPing($mynumber, $id) - { - } - - public function onProfilePicture($from, $type, $data) - { - } - - public function onGetGroupList($mynumber, $groupList) - { - } - - public function onGetGroupParticipants($mynumber, $groupId, $participants) - { - } - - public function onGetServicePricing($mynumber, $price, $cost, $currency, $expiration) - { - } - public function onCreateGroupChat($mynumber, $id) - { - } - - public function onConnect($mynumber, $socket) - { - echo $mynumber . count($socket); - } - - public function onDisconnect($mynumber, $socket) - { - } - - public function onClose($mynumber, $error) - { - } - - public function onLogin($mynumber) - { - } - - public function onLoginFailed($mynumber, $reason) - { - } - - public function onSendPresence($mynumber, $type, $name) - { - } - - public function onSendStatusUpdate($mynumber, $status) - { - } - - public function onUploadFile($mynumber, $filename, $url) - { - } - - public function onFailedUploadFile($mynumber, $filename) - { - } - - public function onMediaUploadFailed($mynumber, $id, $responseNode, $messageNode, $description) - { - } - - public function onMediaMessageSent($mynumber, $to, $id, $filetype, $url, $filename, $filesize, $caption, $icon) - { - } - - public function onRequestLastSeen($mynumber, $from, $id, $to) - { - } - - public function onPaidAccount($phone, $author, $kind, $status, $creation, $expiration) - { - } - - public function onPong($mynumber, $id) - { - } - - public function onFailedRequestCodeTooRecent($mynumber, $method, $reason, $retry_after) - { - } - - public function onFailedRequestCode($mynumber, $method, $reason, $param) - { - } - - public function onRequestCode($mynumber, $method, $length) - { - } - - public function onFailedRegisterCode($mynumber, $status, $reason, $retry_after) - { - } + //Adding to this list? Please put them in alphabetical order! + public function onClose($mynumber, $error){} + public function onCodeRegister( $mynumber, $login, $password, $type, $expiration, $kind, $price, $cost, $currency, $price_expiration ){} + public function onCodeRegisterFailed( $mynumber, $status, $reason, $retry_after ){} + public function onCodeRequest( $mynumber, $method, $length ){} + public function onCodeRequestFailed( $mynumber, $method, $reason, $param ){} + public function onCodeRequestFailedTooRecent( $mynumber, $method, $reason, $retry_after ){} + public function onConnect( $mynumber, $socket ) {} + public function onConnectError( $mynumber, $socket ){} + public function onCredentialsBad( $mynumber, $status, $reason ){} + public function onCredentialsGood( $mynumber, $login, $password, $type, $expiration, $kind, $price, $cost, $currency, $price_expiration ){} + public function onDisconnect( $mynumber, $socket ) {} + public function onDissectPhone( $mynumber, $phonecountry, $phonecc, $phone, $phonemcc, $phoneISO3166, $phoneISO639, $phonemnc ) {} + public function onDissectPhoneFailed( $mynumber ){} + public function onGetAudio( $mynumber, $from, $id, $type, $time, $name, $size, $url, $file, $mimeType, $fileHash, $duration, $acodec ){} + public function onGetBroadcastLists( $mynumber, $broadcastLists ){} + public function onGetError( $mynumber, $id, $data ){} + public function onGetExtendAccount( $mynumber, $kind, $status, $creation, $expiration ){} + public function onGetGroupMessage( $mynumber, $from_group_jid, $from_user_jid, $id, $type, $time, $name, $body ){} + public function onGetGroupParticipants( $mynumber, $groupId, $groupList ){} + public function onGetGroups( $mynumber, $groupList ){} + public function onGetGroupsInfo( $mynumber, $groupList ){} + public function onGetGroupsSubject( $mynumber, $group_jid, $time, $author, $name, $subject ){} + public function onGetImage( $mynumber, $from, $id, $type, $time, $name, $size, $url, $file, $mimeType, $fileHash, $width, $height, $preview, $caption ){} + public function onGetLocation( $mynumber, $from, $id, $type, $time, $name, $name, $longitude, $latitude, $url, $preview ){} + public function onGetMessage( $mynumber, $from, $id, $type, $time, $name, $body ){} + public function onGetNormalizedJid( $mynumber, $data ){} + public function onGetPrivacyBlockedList( $mynumber, $data ){} + public function onGetProfilePicture( $mynumber, $from, $type, $data ){} + public function onGetReceipt( $from, $id, $offline, $retry ){} + public function onGetRequestLastSeen( $mynumber, $from, $id, $seconds ){} + public function onGetServerProperties( $mynumber, $version, $props ){} + public function onGetServicePricing( $mynumber, $price, $cost, $currency, $expiration ){} + public function onGetStatus( $mynumber, $from, $requested, $id, $time, $data ){} + public function onGetSyncResult( $result ){} + public function onGetVideo( $mynumber, $from, $id, $type, $time, $name, $url, $file, $size, $mimeType, $fileHash, $duration, $vcodec, $acodec, $preview, $caption ){} + public function onGetvCard( $mynumber, $from, $id, $type, $time, $name, $vcardname, $vcard ){} + public function onGroupCreate( $mynumber, $groupId ){} + public function onGroupisCreated( $mynumber, $creator, $gid, $subject ){} + public function onGroupsChatCreate( $mynumber, $gid ){} + public function onGroupsChatEnd( $mynumber, $gid ){} + public function onGroupsParticipantsAdd( $mynumber, $groupId, $jid ){} + public function onGroupsParticipantsRemove( $mynumber, $groupId, $jid){} + public function onLogin( $mynumber ){} + public function onLoginFailed( $mynumber, $data ){} + public function onMediaMessageSent( $mynumber, $to, $id, $filetype, $url, $filename, $filesize, $filehash, $caption, $icon ){} + public function onMediaUploadFailed( $mynumber, $id, $node, $messageNode, $statusMessage ){} + public function onMessageComposing( $mynumber, $from, $id, $type, $time ){} + public function onMessagePaused( $mynumber, $from, $id, $type, $time ){} + public function onMessageReceivedClient( $mynumber, $from, $id, $type, $time ){} + public function onMessageReceivedServer( $mynumber, $from, $id, $type, $time ){} + public function onPaidAccount( $mynumber, $author, $kind, $status, $creation, $expiration ){} + public function onPing( $mynumber, $id ){} + public function onPresence( $mynumber, $from, $status ){} + public function onProfilePictureChanged( $mynumber, $from, $id, $time ){} + public function onProfilePictureDeleted( $mynumber, $from, $id, $time ){} + public function onSendMessage( $mynumber, $target, $messageId, $node ){} + public function onSendMessageReceived( $mynumber, $id, $from, $type ){} + public function onSendPong( $mynumber, $msgid ){} + public function onSendPresence( $mynumber, $type, $name ){} + public function onSendStatusUpdate( $mynumber, $txt ){} + public function onStreamError( $data ){} + public function onUploadFile( $mynumber, $filename, $url ){} + public function onUploadFileFailed( $mynumber, $filename ){} - public function onRegisterCode( - $mynumber, $login, $pw, $type, $expiration, $kind, $price, $cost, $currency, $price_expiration - ) { - } - - public function onBadCredentials($mynumber, $status, $reason) - { - } - - public function onGoodCredentials( - $mynumber, $login, $pw, $type, $expiration, $kind, $price, $cost, $currency, $price_expiration - ) { - } - - public function onDissectPhone($mynumber, $phone) - { - } - - public function onFailedDissectPhone($mynumber) - { - } } \ No newline at end of file From ab1b5d34236a105910e17d460475757099a31939 Mon Sep 17 00:00:00 2001 From: Jonathan Williamson Date: Sat, 1 Nov 2014 20:40:00 +0000 Subject: [PATCH 090/436] An example class of how a user should setup their events. This class can be used itself OR be used as an example on how to extend AllEvents class. --- src/events/MyEvents.php | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/src/events/MyEvents.php b/src/events/MyEvents.php index 0adbb856..19ad494f 100644 --- a/src/events/MyEvents.php +++ b/src/events/MyEvents.php @@ -34,7 +34,7 @@ class MyEvents extends AllEvents // 'onGetGroupsSubject', // 'onGetImage', // 'onGetLocation', - 'onGetMessage', +// 'onGetMessage', // 'onGetNormalizedJid', // 'onGetPrivacyBlockedList', // 'onGetProfilePicture', @@ -52,7 +52,7 @@ class MyEvents extends AllEvents // 'onGroupsChatEnd', // 'onGroupsParticipantsAdd', // 'onGroupsParticipantsRemove', - 'onLogin', +// 'onLogin', // 'onLoginFailed', // 'onMediaMessageSent', // 'onMediaUploadFailed', @@ -75,7 +75,6 @@ class MyEvents extends AllEvents // 'onUploadFileFailed', ); - public function onConnect($mynumber, $socket) { echo "

WooHoo!, Phone number $mynumber connected successfully!

"; @@ -86,15 +85,4 @@ public function onDisconnect($mynumber, $socket) echo "

Booo!, Phone number $mynumber is disconnected!

"; } - public function onGetMessage($mynumber, $from, $id, $type, $time, $name, $body) - { - echo "

We got this message from $name ($from):

$body

"; - } - - public function onLogin($mynumber) - { - echo "

We have logged in successfully for $mynumber

"; - } - - } \ No newline at end of file From 7a22a60e5dc95bb7e5a6f7bb57d13d64b91897cd Mon Sep 17 00:00:00 2001 From: Jonathan Williamson Date: Sat, 1 Nov 2014 20:41:05 +0000 Subject: [PATCH 091/436] Some fixes required to match event parameters with what is being sent. --- src/whatsprot.class.php | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index ad65605f..c7ba255c 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -443,7 +443,7 @@ public function connect() if ($Socket !== false) { stream_set_timeout($Socket, static::TIMEOUT_SEC, static::TIMEOUT_USEC); $this->socket = $Socket; - $this->eventManager()->fire('onConnect', + $this->eventManager()->fire("onConnect", array( $this->phoneNumber, $this->socket @@ -468,7 +468,7 @@ public function disconnect() { if (is_resource($this->socket)) { fclose($this->socket); - $this->eventManager()->fire('onDisconnect', + $this->eventManager()->fire("onDisconnect", array( $this->phoneNumber, $this->socket @@ -1977,7 +1977,7 @@ protected function dissectPhone() 'mnc' => $data[5] ); - $this->eventManager()->fire('onDissectPhone', array( + $this->eventManager()->fire("onDissectPhone", array( $this->phoneNumber, $phone['country'], $phone['cc'], @@ -2532,8 +2532,7 @@ protected function processInboundDataNode(ProtocolNode $node, $autoReceipt = tru array( $this->phoneNumber, $groupId, - self::parseJID($node->getAttribute('remove')), - self::parseJID($node->getAttribute('author')) + self::parseJID($node->getAttribute('remove')) )); } } @@ -2886,7 +2885,6 @@ protected function processInboundDataNode(ProtocolNode $node, $autoReceipt = tru $node->getAttribute('from'), $node->getAttribute('t'), $node->getAttribute('participant'), - $node->getAttribute('participant'), $node->getAttribute('notify'), $node->getChild(0)->getAttribute('subject') )); From 9a4168a082d967dc9cbcc142976d83bcf81b0d5d Mon Sep 17 00:00:00 2001 From: Amirjan Date: Sun, 2 Nov 2014 02:34:07 +0330 Subject: [PATCH 092/436] Update whatsprot.class.php Correction PHP Fatal error: Call to a member function getAttribute() on a non-object --- src/whatsprot.class.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index c7ba255c..1808281b 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -2855,6 +2855,7 @@ protected function processInboundDataNode(ProtocolNode $node, $autoReceipt = tru break; case "w:gp2": if ($node->hasChild('remove')) { + if ($node->getChild(0)->hasChild('participant')) $this->eventManager()->fire("onGroupsParticipantsRemove", array( $this->phoneNumber, From c683a03598b94edb78f73505bb600dfe201203c2 Mon Sep 17 00:00:00 2001 From: SikiFn Date: Sun, 2 Nov 2014 02:10:38 +0200 Subject: [PATCH 093/436] Detect Connection Abort or Disconnect In PHP's fsockopen there is no direct way to detect the cause of disconnection. The problem is that the script will keep up and running EVEN IF YOU UNPLUGGED YOUR NETWORK! This condition will check if there is still connectivity to the server before attempting to read any data. --- src/whatsprot.class.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index 1808281b..109de929 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -546,6 +546,11 @@ public function loginWithPassword($password) */ public function pollMessage($autoReceipt = true) { + + if(feof($this->socket)) { + throw new Exception('Connection Closed!'); + } + $stanza = $this->readStanza(); if($stanza) { From bb2afa284ea0ca0c1f39e99873f00e84858defe4 Mon Sep 17 00:00:00 2001 From: Amirjan Date: Sun, 2 Nov 2014 10:56:08 +0330 Subject: [PATCH 094/436] Update AllEvents.php Add new useful params to onGroupisCreated --- src/events/AllEvents.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/events/AllEvents.php b/src/events/AllEvents.php index f07725a7..f3bec385 100644 --- a/src/events/AllEvents.php +++ b/src/events/AllEvents.php @@ -77,7 +77,7 @@ public function onGetSyncResult( $result ){} public function onGetVideo( $mynumber, $from, $id, $type, $time, $name, $url, $file, $size, $mimeType, $fileHash, $duration, $vcodec, $acodec, $preview, $caption ){} public function onGetvCard( $mynumber, $from, $id, $type, $time, $name, $vcardname, $vcard ){} public function onGroupCreate( $mynumber, $groupId ){} - public function onGroupisCreated( $mynumber, $creator, $gid, $subject ){} + public function onGroupisCreated( $mynumber, $creator, $gid, $subject, $admin, $creation ){} public function onGroupsChatCreate( $mynumber, $gid ){} public function onGroupsChatEnd( $mynumber, $gid ){} public function onGroupsParticipantsAdd( $mynumber, $groupId, $jid ){} @@ -104,4 +104,4 @@ public function onStreamError( $data ){} public function onUploadFile( $mynumber, $filename, $url ){} public function onUploadFileFailed( $mynumber, $filename ){} -} \ No newline at end of file +} From 4152d32b34f484092e8b13a7d49e7c51bb340e52 Mon Sep 17 00:00:00 2001 From: Amirjan Date: Sun, 2 Nov 2014 10:59:45 +0330 Subject: [PATCH 095/436] Update whatsprot.class.php Add new useful params to onGroupisCreated --- src/whatsprot.class.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index 109de929..2aed3359 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -2876,12 +2876,19 @@ protected function processInboundDataNode(ProtocolNode $node, $autoReceipt = tru )); } else if ($node->hasChild('create')) { + foreach ($node->getChild(0)->getChild(0)->getChildren() as $child) + if ($child->getAttribute('type')=='admin'){ + $Admin = $child->getAttribute('jid'); + break; + } $this->eventManager()->fire("onGroupisCreated", array( $this->phoneNumber, $node->getChild(0)->getChild(0)->getAttribute('creator'), $node->getChild(0)->getChild(0)->getAttribute('id'), - $node->getChild(0)->getChild(0)->getAttribute('subject') + $node->getChild(0)->getChild(0)->getAttribute('subject'), + $Admin, + $node->getChild(0)->getChild(0)->getAttribute('creation') )); } else if ($node->hasChild('subject')) { From 3ad9e0184cf86e11465977d7cbda0caef30861ae Mon Sep 17 00:00:00 2001 From: Amirjan Date: Sun, 2 Nov 2014 13:01:46 +0330 Subject: [PATCH 096/436] Update whatsprot.class.php --- src/whatsprot.class.php | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index 2aed3359..1d17373d 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -2876,18 +2876,13 @@ protected function processInboundDataNode(ProtocolNode $node, $autoReceipt = tru )); } else if ($node->hasChild('create')) { - foreach ($node->getChild(0)->getChild(0)->getChildren() as $child) - if ($child->getAttribute('type')=='admin'){ - $Admin = $child->getAttribute('jid'); - break; - } $this->eventManager()->fire("onGroupisCreated", array( $this->phoneNumber, $node->getChild(0)->getChild(0)->getAttribute('creator'), $node->getChild(0)->getChild(0)->getAttribute('id'), $node->getChild(0)->getChild(0)->getAttribute('subject'), - $Admin, + $node->getAttribute('participant'), $node->getChild(0)->getChild(0)->getAttribute('creation') )); } From 51a5f6e2e680b75fa81bc914d00d7111efe7dde5 Mon Sep 17 00:00:00 2001 From: Ardian Yuli Setyanto Date: Mon, 3 Nov 2014 13:57:07 +0700 Subject: [PATCH 097/436] More precise duration for audio More precise duration for audio is using 'seconds' rather than 'duration' for audio. But value for duration and seconds in video are same. rx rx rx --- src/whatsprot.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index 2aed3359..a9a44578 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -2437,7 +2437,7 @@ protected function processInboundDataNode(ProtocolNode $node, $autoReceipt = tru $node->getChild("media")->getAttribute('file'), $node->getChild("media")->getAttribute('mimetype'), $node->getChild("media")->getAttribute('filehash'), - $node->getChild("media")->getAttribute('duration'), + $node->getChild("media")->getAttribute('seconds'), $node->getChild("media")->getAttribute('acodec') )); } elseif ($node->getChild("media")->getAttribute('type') == 'vcard') { From 9e5537db194cf47d76321c931edb737a970bfc0f Mon Sep 17 00:00:00 2001 From: Jonathan Williamson Date: Wed, 5 Nov 2014 17:12:06 +0000 Subject: [PATCH 098/436] Detect if previously connected and the socket is still alive. --- src/whatsprot.class.php | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index aa8231d1..35ebfcc7 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -425,6 +425,17 @@ public function codeRequest($method = 'sms', $countryCode = null, $langCode = nu */ public function connect() { + //If we have already connected AND the socket has not be closed from the remote side - then + //no need to connect again. + //WARNING: Lots of bugs in PHP's detection of socket timeout/remote disconnect. Be careful changing this code. + //http://ie2.php.net/manual/en/function.socket-read.php#115903 + //https://bugs.php.net/bug.php?id=47918 + //http://stackoverflow.com/questions/20334366/php-fsockopen-how-to-know-if-connection-is-alive + if ( ! empty($this->socket) && feof($this->socket) === false) + { + //Already connected. + return true; + } $WAver = trim(file_get_contents(static::WHATSAPP_VER_CHECKER)); From d20cd56056208af0e0e7c757ad14913551b7a31f Mon Sep 17 00:00:00 2001 From: Jonathan Williamson Date: Wed, 5 Nov 2014 17:21:18 +0000 Subject: [PATCH 099/436] Fixed typo --- src/whatsprot.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index 35ebfcc7..b038f949 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -425,7 +425,7 @@ public function codeRequest($method = 'sms', $countryCode = null, $langCode = nu */ public function connect() { - //If we have already connected AND the socket has not be closed from the remote side - then + //If we have already connected AND the socket has not been closed from the remote side - then //no need to connect again. //WARNING: Lots of bugs in PHP's detection of socket timeout/remote disconnect. Be careful changing this code. //http://ie2.php.net/manual/en/function.socket-read.php#115903 From 0dc3bc12c41fd846b01bdfe733150eae3735134b Mon Sep 17 00:00:00 2001 From: Jonathan Williamson Date: Wed, 5 Nov 2014 17:49:56 +0000 Subject: [PATCH 100/436] Check if already logged in when called again during the same instance --- src/whatsprot.class.php | 48 +++++++++++++++++++++++++++++++++++++---- 1 file changed, 44 insertions(+), 4 deletions(-) diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index b038f949..5e235d3a 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -431,9 +431,8 @@ public function connect() //http://ie2.php.net/manual/en/function.socket-read.php#115903 //https://bugs.php.net/bug.php?id=47918 //http://stackoverflow.com/questions/20334366/php-fsockopen-how-to-know-if-connection-is-alive - if ( ! empty($this->socket) && feof($this->socket) === false) + if ($this->isConnected()) { - //Already connected. return true; } @@ -472,6 +471,22 @@ public function connect() } } + /** + * Do we have an active socket connection to whatsapp? + * @return bool + */ + protected function isConnected() + { + if ( ! empty($this->socket) && feof($this->socket) === false) + { + //Already connected. + return true; + } + + return false; + } + + /** * Disconnect from the WhatsApp network. */ @@ -557,11 +572,11 @@ public function loginWithPassword($password) */ public function pollMessage($autoReceipt = true) { - + if(feof($this->socket)) { throw new Exception('Connection Closed!'); } - + $stanza = $this->readStanza(); if($stanza) { @@ -2026,6 +2041,11 @@ protected function dissectPhone() */ protected function doLogin() { + if ($this->isLoggedIn()) + { + return true; + } + $this->writer->resetKey(); $this->reader->resetKey(); $resource = static::WHATSAPP_DEVICE . '-' . static::WHATSAPP_VER . '-' . static::PORT; @@ -2062,6 +2082,26 @@ protected function doLogin() } } + /** + * Have we an active connection with WhatsAPP AND a valid login already? + * @return bool + */ + protected function isLoggedIn(){ + //If you aren't connected you can't be logged in! + if ( ! $this->isConnected()) + { + return false; + } + + //We are connected - but are we logged in? + if ( ! empty ($this->loginStatus) && $this->loginStatus === static::CONNECTED_STATUS) + { + return true; + } + + return false; + } + /** * Create an identity string * From b302b2b8e10b290ae3de82e703d7a07fb59bf6a6 Mon Sep 17 00:00:00 2001 From: mgp25 Date: Thu, 6 Nov 2014 01:22:49 +0100 Subject: [PATCH 101/436] 2.11.431 added - New feature Feature: Blue Double Check. See wiki for more info. Minor fixes. --- classesMD5.txt | 3 +++ src/func.php | 2 +- src/token.php | 4 ++-- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/classesMD5.txt b/classesMD5.txt index cd0ecc9c..61b201f2 100644 --- a/classesMD5.txt +++ b/classesMD5.txt @@ -3,6 +3,9 @@ = B64 ENCODED = =============================== +WhatsApp/2.11.431 Android/4.3 Device/GalaxyS3 [Blue check feature enabled] +6AFrxlvRhUKoSxdMjnYATg== + WhatsApp/2.11.426 Android/4.3 Device/GalaxyS3 gGha73KQT1l3G8AMQGgKxg== diff --git a/src/func.php b/src/func.php index dfcf2364..1cab8e40 100755 --- a/src/func.php +++ b/src/func.php @@ -176,7 +176,7 @@ function updateData($nameFile, $WAver, $classesMD5 = "") $content = explode("\n", $content); if ($file == __DIR__ . '/token.php') { - $content[5] = ' $classesMd5 = ' . "\"" . trim($classesMD5) . "\"; // $WAver"; + $content[6] = ' $classesMd5 = ' . "\"" . trim($classesMD5) . "\"; // $WAver"; } else { if ($file == __DIR__ . '/whatsprot.class.php') { $content[48] = ' const WHATSAPP_VER = \'' . trim($WAver) . '\'; // The WhatsApp version.'; diff --git a/src/token.php b/src/token.php index a9bc259c..f3dff1ae 100755 --- a/src/token.php +++ b/src/token.php @@ -4,7 +4,7 @@ function generateRequestToken($country, $phone) { $signature = "MIIDMjCCAvCgAwIBAgIETCU2pDALBgcqhkjOOAQDBQAwfDELMAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFDASBgNVBAcTC1NhbnRhIENsYXJhMRYwFAYDVQQKEw1XaGF0c0FwcCBJbmMuMRQwEgYDVQQLEwtFbmdpbmVlcmluZzEUMBIGA1UEAxMLQnJpYW4gQWN0b24wHhcNMTAwNjI1MjMwNzE2WhcNNDQwMjE1MjMwNzE2WjB8MQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEUMBIGA1UEBxMLU2FudGEgQ2xhcmExFjAUBgNVBAoTDVdoYXRzQXBwIEluYy4xFDASBgNVBAsTC0VuZ2luZWVyaW5nMRQwEgYDVQQDEwtCcmlhbiBBY3RvbjCCAbgwggEsBgcqhkjOOAQBMIIBHwKBgQD9f1OBHXUSKVLfSpwu7OTn9hG3UjzvRADDHj+AtlEmaUVdQCJR+1k9jVj6v8X1ujD2y5tVbNeBO4AdNG/yZmC3a5lQpaSfn+gEexAiwk+7qdf+t8Yb+DtX58aophUPBPuD9tPFHsMCNVQTWhaRMvZ1864rYdcq7/IiAxmd0UgBxwIVAJdgUI8VIwvMspK5gqLrhAvwWBz1AoGBAPfhoIXWmz3ey7yrXDa4V7l5lK+7+jrqgvlXTAs9B4JnUVlXjrrUWU/mcQcQgYC0SRZxI+hMKBYTt88JMozIpuE8FnqLVHyNKOCjrh4rs6Z1kW6jfwv6ITVi8ftiegEkO8yk8b6oUZCJqIPf4VrlnwaSi2ZegHtVJWQBTDv+z0kqA4GFAAKBgQDRGYtLgWh7zyRtQainJfCpiaUbzjJuhMgo4fVWZIvXHaSHBU1t5w//S0lDK2hiqkj8KpMWGywVov9eZxZy37V26dEqr/c2m5qZ0E+ynSu7sqUD7kGx/zeIcGT0H+KAVgkGNQCo5Uc0koLRWYHNtYoIvt5R3X6YZylbPftF/8ayWTALBgcqhkjOOAQDBQADLwAwLAIUAKYCp0d6z4QQdyN74JDfQ2WCyi8CFDUM4CaNB+ceVXdKtOrNTQcc0e+t"; - $classesMd5 = "gGha73KQT1l3G8AMQGgKxg=="; // 2.11.426 + $classesMd5 = "6AFrxlvRhUKoSxdMjnYATg=="; // 2.11.431 $key2 = base64_decode("/UIGKU1FVQa+ATM2A0za7G2KI9S/CwPYjgAbc67v7ep42eO/WeTLx1lb1cHwxpsEgF4+PmYpLd2YpGUdX/A2JQitsHzDwgcdBpUf7psX1BU="); $data = base64_decode($signature) . base64_decode($classesMd5) . $phone; @@ -19,4 +19,4 @@ function generateRequestToken($country, $phone) $output = hash("sha1", $opad . hash("sha1", $ipad . $data, true), true); return base64_encode($output); -} \ No newline at end of file +} From 04d5d0562e0645d6f57858b177896bb0d564c566 Mon Sep 17 00:00:00 2001 From: mgp25 Date: Thu, 6 Nov 2014 01:23:20 +0100 Subject: [PATCH 102/436] Added new feature blue check, message read --- src/whatsprot.class.php | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index 5e235d3a..1b611bc7 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -46,8 +46,8 @@ class WhatsProt const WHATSAPP_SERVER = 's.whatsapp.net'; // The hostname used to login/send messages. const WHATSAPP_UPLOAD_HOST = 'https://mms.whatsapp.net/client/iphone/upload.php'; // The upload host. const WHATSAPP_DEVICE = 'Android'; // The device name. - const WHATSAPP_VER = '2.11.426'; // The WhatsApp version. - const WHATSAPP_USER_AGENT = 'WhatsApp/2.11.426 Android/4.3 Device/GalaxyS3'; // User agent used in request/registration code. + const WHATSAPP_VER = '2.11.431'; // The WhatsApp version. + const WHATSAPP_USER_AGENT = 'WhatsApp/2.11.431 Android/4.3 Device/GalaxyS3'; // User agent used in request/registration code. const WHATSAPP_VER_CHECKER = 'https://coderus.openrepos.net/whitesoft/whatsapp_version'; // Check WhatsApp version /** @@ -570,7 +570,7 @@ public function loginWithPassword($password) * @param bool $autoReceipt * @return bool */ - public function pollMessage($autoReceipt = true) + public function pollMessage($autoReceipt = true, $type = "read") { if(feof($this->socket)) { @@ -580,7 +580,7 @@ public function pollMessage($autoReceipt = true) $stanza = $this->readStanza(); if($stanza) { - $this->processInboundData($stanza, $autoReceipt); + $this->processInboundData($stanza, $autoReceipt, $type); return true; } return false; @@ -2324,11 +2324,11 @@ protected function processChallenge($node) * @param bool $autoReceipt * @throws Exception */ - protected function processInboundData($data, $autoReceipt = true) + protected function processInboundData($data, $autoReceipt = true, $type = "read") { $node = $this->reader->nextTree($data); if( $node != null ) { - $this->processInboundDataNode($node, $autoReceipt); + $this->processInboundDataNode($node, $autoReceipt, $type); } } @@ -2340,7 +2340,7 @@ protected function processInboundData($data, $autoReceipt = true) * @param bool $autoReceipt * @throws Exception */ - protected function processInboundDataNode(ProtocolNode $node, $autoReceipt = true) { + protected function processInboundDataNode(ProtocolNode $node, $autoReceipt = true, $type = "read") { $this->debugPrint($node->nodeString("rx ") . "\n"); $this->serverReceivedId = $node->getAttribute('id'); @@ -2431,7 +2431,7 @@ protected function processInboundDataNode(ProtocolNode $node, $autoReceipt = tru if($autoReceipt) { - $this->sendMessageReceived($node); + $this->sendMessageReceived($node, $type); } } if ($node->getAttribute("type") == "media" && $node->getChild('media') != null) { @@ -2525,7 +2525,7 @@ protected function processInboundDataNode(ProtocolNode $node, $autoReceipt = tru if($autoReceipt) { - $this->sendMessageReceived($node); + $this->sendMessageReceived($node, $type); } } if ($node->getChild('received') != null) { @@ -3468,15 +3468,17 @@ protected function sendMessageNode($to, $node, $id = null) * @param ProtocolNode $msg The ProtocolTreeNode that contains the message. * @param null $type */ - protected function sendMessageReceived($msg, $type = null) + protected function sendMessageReceived($msg, $type = "read") { - if($type) + + $messageHash = array(); + if($type == "read") { $messageHash["type"] = $type; } - $messageHash = array(); $messageHash["to"] = $msg->getAttribute("from"); $messageHash["id"] = $msg->getAttribute("id"); + $messageHash["t"] = time(); $messageNode = new ProtocolNode("receipt", $messageHash, null, null); $this->sendNode($messageNode); $this->eventManager()->fire("onSendMessageReceived", From c6a8c7749422b5c12b98abb41d521b43a75a2c10 Mon Sep 17 00:00:00 2001 From: mgp25 Date: Fri, 7 Nov 2014 01:19:42 +0100 Subject: [PATCH 103/436] Updated event to support read feature If type == read, the user has read your message --- src/whatsprot.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index 1b611bc7..4ff5ecc6 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -2384,7 +2384,7 @@ protected function processInboundDataNode(ProtocolNode $node, $autoReceipt = tru $this->phoneNumber, $node->getAttribute('from'), $node->getAttribute('id'), - $node->getAttribute('class'), + $node->getAttribute('type'), $node->getAttribute('t') )); } From 7a3f97c39cac1778fb2f59672ba2872046117644 Mon Sep 17 00:00:00 2001 From: mgp25 Date: Fri, 7 Nov 2014 13:18:10 +0100 Subject: [PATCH 104/436] Updating auth --- src/whatsprot.class.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index 4ff5ecc6..d416c659 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -1883,7 +1883,6 @@ protected function authenticate() protected function createAuthNode() { $authHash = array(); - $authHash["xmlns"] = "urn:ietf:params:xml:ns:xmpp-sasl"; $authHash["mechanism"] = "WAUTH-2"; $authHash["user"] = $this->phoneNumber; $data = $this->createAuthBlob(); @@ -1901,7 +1900,7 @@ protected function createAuthBlob() $this->reader->setKey($this->inputKey); //$this->writer->setKey($this->outputKey); $phone = $this->dissectPhone(); - $array = "\0\0\0\0" . $this->phoneNumber . $this->challengeData . time() . static::WHATSAPP_USER_AGENT . " MccMnc/" . str_pad($phone["mcc"], 3, "0", STR_PAD_LEFT) . "001"; + $array = "\0\0\0\0" . $this->phoneNumber . $this->challengeData . time() . static::WHATSAPP_USER_AGENT . " MccMnc/" . str_pad($phone["mcc"], 3, "0", STR_PAD_LEFT) . $phone["mnc"]; $this->challengeData = null; return $this->outputKey->EncodeMessage($array, 0, strlen($array), false); } From 2b38466fb334495f8a9ba9af3e78dcf2d8ed2c0e Mon Sep 17 00:00:00 2001 From: mgp25 Date: Fri, 7 Nov 2014 13:18:28 +0100 Subject: [PATCH 105/436] Added function to send read --- src/whatsprot.class.php | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index d416c659..618d609e 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -1386,6 +1386,24 @@ public function sendMessage($to, $txt, $id = null) return $id; } + /** + * Send a read receipt to a message + * + * @param $to + * The recipient. + * @param $id + */ + public function sendMessageRead($to, $id) + { + $messageHash = array(); + $messageHash["type"] = "read"; + $messageHash["to"] = $to; + $messageHash["id"] = $id; + $messageHash["t"] = time(); + $messageNode = new ProtocolNode("receipt", $messageHash, null, null); + $this->sendNode($messageNode); + } + /** * Send audio to the user/group. * From d91242a302d90d737baa01417d996ebce88e34cb Mon Sep 17 00:00:00 2001 From: mgp25 Date: Fri, 7 Nov 2014 20:25:49 +0100 Subject: [PATCH 106/436] Auth xmlns attrib no longer necessary --- src/whatsprot.class.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index 618d609e..191e2e18 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -1935,8 +1935,7 @@ protected function createAuthResponseNode() { $resp = $this->authenticate(); $respHash = array(); - $respHash["xmlns"] = "urn:ietf:params:xml:ns:xmpp-sasl"; - $node = new ProtocolNode("response", $respHash, null, $resp); + $node = new ProtocolNode("response", null, null, $resp); return $node; } From 1577a3b7c6a743b0d2b23a8446c49586703ac190 Mon Sep 17 00:00:00 2001 From: mgp25 Date: Sat, 8 Nov 2014 10:32:20 +0100 Subject: [PATCH 107/436] get voip info added. Still in beta No information about this yet --- src/whatsprot.class.php | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index 191e2e18..2ccdea3b 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -1122,6 +1122,27 @@ public function sendPing() $this->sendNode($node); } + /** + * Get voip info. of a number + * + * @param string $number + */ + public function sendGetHasVoipEnabled($number) + { + $msgId = $this->createMsgId("voip_"); + $userNode = new ProtocolNode("user", array( + "jid" => $number."@".static::WHATSAPP_SERVER + ), null, null); + $eligibleNode = new ProtocolNode("eligible", null, array($userNode), null); + $node = new ProtocolNode("iq", array( + "id" => $msgId, + "xmlns" => "voip", + "type" => "get", + "to" => static::WHATSAPP_SERVER + ), array($eligibleNode), null); + $this->sendNode($node); + } + /** * Get the current status message of a specific user. * @@ -1934,7 +1955,6 @@ protected function createAuthBlob() protected function createAuthResponseNode() { $resp = $this->authenticate(); - $respHash = array(); $node = new ProtocolNode("response", null, null, $resp); return $node; From 3d636dde8ee40136cad7f2db8545f421c86b0acc Mon Sep 17 00:00:00 2001 From: mgp25 Date: Mon, 10 Nov 2014 01:01:50 +0100 Subject: [PATCH 108/436] Update message node --- src/whatsprot.class.php | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index 2ccdea3b..a85d53ed 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -1924,6 +1924,7 @@ protected function createAuthNode() $authHash = array(); $authHash["mechanism"] = "WAUTH-2"; $authHash["user"] = $this->phoneNumber; + //$authHash["passive"] = "true"; $data = $this->createAuthBlob(); $node = new ProtocolNode("auth", $authHash, null, $data); @@ -3461,18 +3462,6 @@ protected function sendGroupsChangeParticipants($groupId, $participants, $tag, $ */ protected function sendMessageNode($to, $node, $id = null) { - $serverNode = new ProtocolNode("server", null, null, ""); - $xHash = array(); - $xHash["xmlns"] = "jabber:x:event"; - $xNode = new ProtocolNode("x", $xHash, array($serverNode), ""); - $notify = array(); - $notify['xmlns'] = 'urn:xmpp:whatsapp'; - $notify['name'] = $this->name; - $notnode = new ProtocolNode("notify", $notify, null, ""); - $request = array(); - $request['xmlns'] = "urn:xmpp:receipts"; - $reqnode = new ProtocolNode("request", $request, null, ""); - $messageHash = array(); $messageHash["to"] = $this->getJID($to); if($node->getTag() == "body") @@ -3486,7 +3475,7 @@ protected function sendMessageNode($to, $node, $id = null) $messageHash["id"] = ($id == null?$this->createMsgId("message"):$id); $messageHash["t"] = time(); - $messageNode = new ProtocolNode("message", $messageHash, array($xNode, $notnode, $reqnode, $node), ""); + $messageNode = new ProtocolNode("message", $messageHash, array($node), ""); $this->sendNode($messageNode); $this->eventManager()->fire("onSendMessage", array( From f960e657d6c2427f4a3fc09defec3ae9fa2e23fb Mon Sep 17 00:00:00 2001 From: mgp25 Date: Tue, 11 Nov 2014 00:07:49 +0100 Subject: [PATCH 109/436] Update README.md --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 16650283..a63acd52 100644 --- a/README.md +++ b/README.md @@ -20,6 +20,8 @@ And I also want to thank all the users that are collaborating with me and are ma - [SikiFn](https://github.com/SikiFn) - [Dennobaby](https://github.com/Dennobaby) +[![Gratipay](http://img.shields.io/badge/Donate-Gratipay-brightgreen.svg)](https://gratipay.com/mgp25/) [![Paypal](https://www.paypalobjects.com/es_XC/i/btn/btn_donate_SM.gif)](https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=me%40mgp25%2ecom&lc=US&item_name=WhatsAPI¤cy_code=USD&bn=PP%2dDonationsBF%3abtn_donate_SM%2egif%3aNonHosted) + ### Update October 7th, 2014 From d8334cb949785053b9c272d17434e38e7beee589 Mon Sep 17 00:00:00 2001 From: mgp25 Date: Tue, 11 Nov 2014 09:36:04 +0100 Subject: [PATCH 110/436] Added new notification related to encrypt --- src/WhatsAppEvent.php | 11 +++++++++++ src/events/AllEvents.php | 1 + src/whatsprot.class.php | 11 +++++++++++ 3 files changed, 23 insertions(+) diff --git a/src/WhatsAppEvent.php b/src/WhatsAppEvent.php index 1f49f86a..bdae68a9 100755 --- a/src/WhatsAppEvent.php +++ b/src/WhatsAppEvent.php @@ -289,6 +289,17 @@ function fireGetError( $this->fireCallback($callbackEvent); } + function fireGetFeature( + $phone, + $from, + $encrypt + ) { + $callbackEvent = function(WhatsAppEventListener $listener) use ($phone, $phone, $encrypt) { + $listener->onGetFeature($phone, $from, $encrypt); + }; + $this->fireCallback($callbackEvent); + } + function fireGetGroups( $phone, $groupList diff --git a/src/events/AllEvents.php b/src/events/AllEvents.php index f3bec385..6cc8fceb 100644 --- a/src/events/AllEvents.php +++ b/src/events/AllEvents.php @@ -57,6 +57,7 @@ public function onGetAudio( $mynumber, $from, $id, $type, $time, $name, $size, $ public function onGetBroadcastLists( $mynumber, $broadcastLists ){} public function onGetError( $mynumber, $id, $data ){} public function onGetExtendAccount( $mynumber, $kind, $status, $creation, $expiration ){} + public function onGetFeature( $mynumber, $from, $encrypt ){} public function onGetGroupMessage( $mynumber, $from_group_jid, $from_user_jid, $id, $type, $time, $name, $body ){} public function onGetGroupParticipants( $mynumber, $groupId, $groupList ){} public function onGetGroups( $mynumber, $groupList ){} diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index a85d53ed..d931e06d 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -3001,6 +3001,17 @@ protected function processInboundDataNode(ProtocolNode $node, $autoReceipt = tru $node->getChild(0)->getChild(0)->getAttribute('expiration') )); break; + case "features": + if($node->getChild(0)->getChild(0) == "encrypt") + { + $this->eventManager()->fire("onGetFeature", + array( + $this->phoneNumber, + $node->getAttribute('from'), + $node->getChild(0)->getChild(0)->getAttribute('value'), + )); + } + break; default: throw new Exception("Method $type not implemented"); } From 7298909da307184fc561503174d905e982d24e4d Mon Sep 17 00:00:00 2001 From: mgp25 Date: Wed, 12 Nov 2014 00:47:25 +0100 Subject: [PATCH 111/436] Fix typo Thanks @0xTryCatch for noticing this --- src/WhatsAppEvent.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/WhatsAppEvent.php b/src/WhatsAppEvent.php index bdae68a9..dab4ee63 100755 --- a/src/WhatsAppEvent.php +++ b/src/WhatsAppEvent.php @@ -294,7 +294,7 @@ function fireGetFeature( $from, $encrypt ) { - $callbackEvent = function(WhatsAppEventListener $listener) use ($phone, $phone, $encrypt) { + $callbackEvent = function(WhatsAppEventListener $listener) use ($phone, $from, $encrypt) { $listener->onGetFeature($phone, $from, $encrypt); }; $this->fireCallback($callbackEvent); From 4ee77edbb4f6baac87fd2995e1168c1f2502871c Mon Sep 17 00:00:00 2001 From: dennobaby Date: Wed, 12 Nov 2014 01:57:40 +0100 Subject: [PATCH 112/436] corrected curly brackets for ArrayEmojis and get_mime and corrected the idention --- src/func.php | 6253 +++++++++++++++++++++++++------------------------- 1 file changed, 3127 insertions(+), 3126 deletions(-) diff --git a/src/func.php b/src/func.php index 1cab8e40..b9086865 100755 --- a/src/func.php +++ b/src/func.php @@ -237,3132 +237,3133 @@ function get_mime($file) } } } +} //Generate Array of Emojis iOS2, iOS5 and iOS7 - function ArrayEmojis() - { - return array( - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ˜„', - 'iOS7' => '', - 'Hex' => '1F604' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ˜ƒ', - 'iOS7' => '', - 'Hex' => '1F603' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿ˜€', 'iOS7' => '', 'Hex' => '1F600'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ˜Š', - 'iOS7' => '', - 'Hex' => '1F60A' - ), - array( - 'iOS2' => '', - 'iOS5' => 'โ˜บ', - 'iOS7' => 'โ˜บ๏ธ', - 'Hex' => '263A' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ˜‰', - 'iOS7' => '', - 'Hex' => '1F609' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ˜', - 'iOS7' => '', - 'Hex' => '1F60D' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ˜˜', - 'iOS7' => '', - 'Hex' => '1F618' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ˜š', - 'iOS7' => '', - 'Hex' => '1F61A' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿ˜—', 'iOS7' => '', 'Hex' => '1F617'), - array('iOS2' => '', 'iOS5' => '๐Ÿ˜™', 'iOS7' => '', 'Hex' => '1F619'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ˜œ', - 'iOS7' => '', - 'Hex' => '1F61C' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ˜', - 'iOS7' => '', - 'Hex' => '1F61D' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿ˜›', 'iOS7' => '', 'Hex' => '1F61B'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ˜ณ', - 'iOS7' => '', - 'Hex' => '1F633' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ˜', - 'iOS7' => '', - 'Hex' => '1F601' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ˜”', - 'iOS7' => '', - 'Hex' => '1F614' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ˜Œ', - 'iOS7' => '', - 'Hex' => '1F60C' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ˜’', - 'iOS7' => '', - 'Hex' => '1F612' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ˜ž', - 'iOS7' => '', - 'Hex' => '1F61E' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ˜ฃ', - 'iOS7' => '', - 'Hex' => '1F623' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ˜ข', - 'iOS7' => '', - 'Hex' => '1F622' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ˜‚', - 'iOS7' => '', - 'Hex' => '1F602' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ˜ญ', - 'iOS7' => '', - 'Hex' => '1F62D' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ˜ช', - 'iOS7' => '', - 'Hex' => '1F62A' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ˜ฅ', - 'iOS7' => '', - 'Hex' => '1F625' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ˜ฐ', - 'iOS7' => '', - 'Hex' => '1F630' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿ˜…', 'iOS7' => '', 'Hex' => '1F605'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ˜“', - 'iOS7' => '', - 'Hex' => '1F613' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿ˜ฉ', 'iOS7' => '', 'Hex' => '1F629'), - array('iOS2' => '', 'iOS5' => '๐Ÿ˜ซ', 'iOS7' => '', 'Hex' => '1F62B'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ˜จ', - 'iOS7' => '', - 'Hex' => '1F628' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ˜ฑ', - 'iOS7' => '', - 'Hex' => '1F631' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ˜ ', - 'iOS7' => '', - 'Hex' => '1F620' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ˜ก', - 'iOS7' => '', - 'Hex' => '1F621' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿ˜ค', 'iOS7' => '', 'Hex' => '1F624'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ˜–', - 'iOS7' => '', - 'Hex' => '1F616' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿ˜†', 'iOS7' => '', 'Hex' => '1F606'), - array('iOS2' => '', 'iOS5' => '๐Ÿ˜‹', 'iOS7' => '', 'Hex' => '1F60B'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ˜ท', - 'iOS7' => '', - 'Hex' => '1F637' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿ˜Ž', 'iOS7' => '', 'Hex' => '1F60E'), - array('iOS2' => '', 'iOS5' => '๐Ÿ˜ด', 'iOS7' => '', 'Hex' => '1F634'), - array('iOS2' => '', 'iOS5' => '๐Ÿ˜ต', 'iOS7' => '', 'Hex' => '1F635'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ˜ฒ', - 'iOS7' => '', - 'Hex' => '1F632' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿ˜Ÿ', 'iOS7' => '', 'Hex' => '1F61F'), - array('iOS2' => '', 'iOS5' => '๐Ÿ˜ฆ', 'iOS7' => '', 'Hex' => '1F626'), - array('iOS2' => '', 'iOS5' => '๐Ÿ˜ง', 'iOS7' => '', 'Hex' => '1F627'), - array('iOS2' => '', 'iOS5' => '๐Ÿ˜ˆ', 'iOS7' => '', 'Hex' => '1F608'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ‘ฟ', - 'iOS7' => '', - 'Hex' => '1F47F' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿ˜ฎ', 'iOS7' => '', 'Hex' => '1F62E'), - array('iOS2' => '', 'iOS5' => '๐Ÿ˜ฌ', 'iOS7' => '', 'Hex' => '1F62C'), - array('iOS2' => '', 'iOS5' => '๐Ÿ˜', 'iOS7' => '', 'Hex' => '1F610'), - array('iOS2' => '', 'iOS5' => '๐Ÿ˜•', 'iOS7' => '', 'Hex' => '1F615'), - array('iOS2' => '', 'iOS5' => '๐Ÿ˜ฏ', 'iOS7' => '', 'Hex' => '1F62F'), - array('iOS2' => '', 'iOS5' => '๐Ÿ˜ถ', 'iOS7' => '', 'Hex' => '1F636'), - array('iOS2' => '', 'iOS5' => '๐Ÿ˜‡', 'iOS7' => '', 'Hex' => '1F607'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ˜', - 'iOS7' => '', - 'Hex' => '1F60F' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿ˜‘', 'iOS7' => '', 'Hex' => '1F611'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ‘ฒ', - 'iOS7' => '', - 'Hex' => '1F472' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ‘ณ', - 'iOS7' => '', - 'Hex' => '1F473' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ‘ฎ', - 'iOS7' => '', - 'Hex' => '1F46E' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ‘ท', - 'iOS7' => '', - 'Hex' => '1F477' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ’‚', - 'iOS7' => '', - 'Hex' => '1F482' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ‘ถ', - 'iOS7' => '', - 'Hex' => '1F476' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ‘ฆ', - 'iOS7' => '', - 'Hex' => '1F466' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ‘ง', - 'iOS7' => '', - 'Hex' => '1F467' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ‘จ', - 'iOS7' => '', - 'Hex' => '1F468' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ‘ฉ', - 'iOS7' => '', - 'Hex' => '1F469' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ‘ด', - 'iOS7' => '', - 'Hex' => '1F474' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ‘ต', - 'iOS7' => '', - 'Hex' => '1F475' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ‘ฑ', - 'iOS7' => '', - 'Hex' => '1F471' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ‘ผ', - 'iOS7' => '', - 'Hex' => '1F47C' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ‘ธ', - 'iOS7' => '', - 'Hex' => '1F478' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿ˜บ', 'iOS7' => '', 'Hex' => '1F63A'), - array('iOS2' => '', 'iOS5' => '๐Ÿ˜ธ', 'iOS7' => '', 'Hex' => '1F638'), - array('iOS2' => '', 'iOS5' => '๐Ÿ˜ป', 'iOS7' => '', 'Hex' => '1F63B'), - array('iOS2' => '', 'iOS5' => '๐Ÿ˜ฝ', 'iOS7' => '', 'Hex' => '1F63D'), - array('iOS2' => '', 'iOS5' => '๐Ÿ˜ผ', 'iOS7' => '', 'Hex' => '1F63C'), - array('iOS2' => '', 'iOS5' => '๐Ÿ™€', 'iOS7' => '', 'Hex' => '1F640'), - array('iOS2' => '', 'iOS5' => '๐Ÿ˜ฟ', 'iOS7' => '', 'Hex' => '1F63F'), - array('iOS2' => '', 'iOS5' => '๐Ÿ˜น', 'iOS7' => '', 'Hex' => '1F639'), - array('iOS2' => '', 'iOS5' => '๐Ÿ˜พ', 'iOS7' => '', 'Hex' => '1F63E'), - array('iOS2' => '', 'iOS5' => '๐Ÿ‘น', 'iOS7' => '', 'Hex' => '1F479'), - array('iOS2' => '', 'iOS5' => '๐Ÿ‘บ', 'iOS7' => '', 'Hex' => '1F47A'), - array('iOS2' => '', 'iOS5' => '๐Ÿ™ˆ', 'iOS7' => '', 'Hex' => '1F648'), - array('iOS2' => '', 'iOS5' => '๐Ÿ™‰', 'iOS7' => '', 'Hex' => '1F649'), - array('iOS2' => '', 'iOS5' => '๐Ÿ™Š', 'iOS7' => '', 'Hex' => '1F64A'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ’€', - 'iOS7' => '', - 'Hex' => '1F480' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ‘ฝ', - 'iOS7' => '', - 'Hex' => '1F47D' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ’ฉ', - 'iOS7' => '', - 'Hex' => '1F4A9' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ”ฅ', - 'iOS7' => '', - 'Hex' => '1F525' - ), - array('iOS2' => '', 'iOS5' => 'โœจ', 'iOS7' => '', 'Hex' => '2728'), - array( - 'iOS2' => '', - 'iOS5' => '๐ŸŒŸ', - 'iOS7' => '', - 'Hex' => '1F31F' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿ’ซ', 'iOS7' => '', 'Hex' => '1F4AB'), - array('iOS2' => '', 'iOS5' => '๐Ÿ’ฅ', 'iOS7' => '', 'Hex' => '1F4A5'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ’ข', - 'iOS7' => '', - 'Hex' => '1F4A2' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ’ฆ', - 'iOS7' => '', - 'Hex' => '1F4A6' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿ’ง', 'iOS7' => '', 'Hex' => '1F4A7'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ’ค', - 'iOS7' => '', - 'Hex' => '1F4A4' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ’จ', - 'iOS7' => '', - 'Hex' => '1F4A8' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ‘‚', - 'iOS7' => '', - 'Hex' => '1F442' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ‘€', - 'iOS7' => '', - 'Hex' => '1F440' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ‘ƒ', - 'iOS7' => '', - 'Hex' => '1F443' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿ‘…', 'iOS7' => '', 'Hex' => '1F445'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ‘„', - 'iOS7' => '', - 'Hex' => '1F444' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ‘', - 'iOS7' => '', - 'Hex' => '1F44D' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ‘Ž', - 'iOS7' => '', - 'Hex' => '1F44E' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ‘Œ', - 'iOS7' => '', - 'Hex' => '1F44C' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ‘Š', - 'iOS7' => '', - 'Hex' => '1F44A' - ), - array('iOS2' => '', 'iOS5' => 'โœŠ', 'iOS7' => '', 'Hex' => '270A'), - array( - 'iOS2' => '', - 'iOS5' => 'โœŒ', - 'iOS7' => 'โœŒ๏ธ', - 'Hex' => '270C' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ‘‹', - 'iOS7' => '', - 'Hex' => '1F44B' - ), - array('iOS2' => '', 'iOS5' => 'โœ‹', 'iOS7' => '', 'Hex' => '270B'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ‘', - 'iOS7' => '', - 'Hex' => '1F450' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ‘†', - 'iOS7' => '', - 'Hex' => '1F446' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ‘‡', - 'iOS7' => '', - 'Hex' => '1F447' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ‘‰', - 'iOS7' => '', - 'Hex' => '1F449' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ‘ˆ', - 'iOS7' => '', - 'Hex' => '1F448' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ™Œ', - 'iOS7' => '', - 'Hex' => '1F64C' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ™', - 'iOS7' => '', - 'Hex' => '1F64F' - ), - array( - 'iOS2' => '', - 'iOS5' => 'โ˜', - 'iOS7' => 'โ˜๏ธ', - 'Hex' => '261D' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ‘', - 'iOS7' => '', - 'Hex' => '1F44F' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ’ช', - 'iOS7' => '', - 'Hex' => '1F4AA' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿšถ', - 'iOS7' => '', - 'Hex' => '1F6B6' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿƒ', - 'iOS7' => '', - 'Hex' => '1F3C3' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ’ƒ', - 'iOS7' => '', - 'Hex' => '1F483' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ‘ซ', - 'iOS7' => '', - 'Hex' => '1F46B' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿ‘ช', 'iOS7' => '', 'Hex' => '1F46A'), - array('iOS2' => '', 'iOS5' => '๐Ÿ‘ฌ', 'iOS7' => '', 'Hex' => '1F46C'), - array('iOS2' => '', 'iOS5' => '๐Ÿ‘ญ', 'iOS7' => '', 'Hex' => '1F46D'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ’', - 'iOS7' => '', - 'Hex' => '1F48F' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ’‘', - 'iOS7' => '', - 'Hex' => '1F491' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ‘ฏ', - 'iOS7' => '', - 'Hex' => '1F46F' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ™†', - 'iOS7' => '', - 'Hex' => '1F646' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ™…', - 'iOS7' => '', - 'Hex' => '1F645' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ’', - 'iOS7' => '', - 'Hex' => '1F481' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿ™‹', 'iOS7' => '', 'Hex' => '1F64B'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ’†', - 'iOS7' => '', - 'Hex' => '1F486' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ’‡', - 'iOS7' => '', - 'Hex' => '1F487' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ’…', - 'iOS7' => '', - 'Hex' => '1F485' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿ‘ฐ', 'iOS7' => '', 'Hex' => '1F470'), - array('iOS2' => '', 'iOS5' => '๐Ÿ™Ž', 'iOS7' => '', 'Hex' => '1F64E'), - array('iOS2' => '', 'iOS5' => '๐Ÿ™', 'iOS7' => '', 'Hex' => '1F64D'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ™‡', - 'iOS7' => '', - 'Hex' => '1F647' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐ŸŽฉ', - 'iOS7' => '', - 'Hex' => '1F3A9' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ‘‘', - 'iOS7' => '', - 'Hex' => '1F451' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ‘’', - 'iOS7' => '', - 'Hex' => '1F452' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ‘Ÿ', - 'iOS7' => '', - 'Hex' => '1F45F' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿ‘ž', 'iOS7' => '', 'Hex' => '1F45E'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ‘ก', - 'iOS7' => '', - 'Hex' => '1F461' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ‘ ', - 'iOS7' => '', - 'Hex' => '1F460' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ‘ข', - 'iOS7' => '', - 'Hex' => '1F462' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ‘•', - 'iOS7' => '', - 'Hex' => '1F455' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ‘”', - 'iOS7' => '', - 'Hex' => '1F454' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿ‘š', 'iOS7' => '', 'Hex' => '1F45A'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ‘—', - 'iOS7' => '', - 'Hex' => '1F457' - ), - array('iOS2' => '', 'iOS5' => '๐ŸŽฝ', 'iOS7' => '', 'Hex' => '1F3BD'), - array('iOS2' => '', 'iOS5' => '๐Ÿ‘–', 'iOS7' => '', 'Hex' => '1F456'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ‘˜', - 'iOS7' => '', - 'Hex' => '1F458' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ‘™', - 'iOS7' => '', - 'Hex' => '1F459' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ’ผ', - 'iOS7' => '', - 'Hex' => '1F4BC' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ‘œ', - 'iOS7' => '', - 'Hex' => '1F45C' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿ‘', 'iOS7' => '', 'Hex' => '1F45D'), - array('iOS2' => '', 'iOS5' => '๐Ÿ‘›', 'iOS7' => '', 'Hex' => '1F45B'), - array('iOS2' => '', 'iOS5' => '๐Ÿ‘“', 'iOS7' => '', 'Hex' => '1F453'), - array( - 'iOS2' => '', - 'iOS5' => '๐ŸŽ€', - 'iOS7' => '', - 'Hex' => '1F380' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐ŸŒ‚', - 'iOS7' => '', - 'Hex' => '1F302' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ’„', - 'iOS7' => '', - 'Hex' => '1F484' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ’›', - 'iOS7' => '', - 'Hex' => '1F49B' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ’™', - 'iOS7' => '', - 'Hex' => '1F499' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ’œ', - 'iOS7' => '', - 'Hex' => '1F49C' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ’š', - 'iOS7' => '', - 'Hex' => '1F49A' - ), - array( - 'iOS2' => '', - 'iOS5' => 'โค', - 'iOS7' => 'โค๏ธ', - 'Hex' => '2764' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ’”', - 'iOS7' => '', - 'Hex' => '1F494' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ’—', - 'iOS7' => '', - 'Hex' => '1F497' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ’“', - 'iOS7' => '', - 'Hex' => '1F493' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿ’•', 'iOS7' => '', 'Hex' => '1F495'), - array('iOS2' => '', 'iOS5' => '๐Ÿ’–', 'iOS7' => '', 'Hex' => '1F496'), - array('iOS2' => '', 'iOS5' => '๐Ÿ’ž', 'iOS7' => '', 'Hex' => '1F49E'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ’˜', - 'iOS7' => '', - 'Hex' => '1F498' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿ’Œ', 'iOS7' => '', 'Hex' => '1F48C'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ’‹', - 'iOS7' => '', - 'Hex' => '1F48B' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ’', - 'iOS7' => '', - 'Hex' => '1F48D' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ’Ž', - 'iOS7' => '', - 'Hex' => '1F48E' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿ‘ค', 'iOS7' => '', 'Hex' => '1F464'), - array('iOS2' => '', 'iOS5' => '๐Ÿ‘ฅ', 'iOS7' => '', 'Hex' => '1F465'), - array('iOS2' => '', 'iOS5' => '๐Ÿ’ฌ', 'iOS7' => '', 'Hex' => '1F4AC'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ‘ฃ', - 'iOS7' => '', - 'Hex' => '1F463' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿ’ญ', 'iOS7' => '', 'Hex' => '1F4AD'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ ', - 'iOS7' => '', - 'Hex' => '1F3E0' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿก', 'iOS7' => '', 'Hex' => '1F3E1'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿซ', - 'iOS7' => '', - 'Hex' => '1F3EB' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿข', - 'iOS7' => '', - 'Hex' => '1F3E2' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿฃ', - 'iOS7' => '', - 'Hex' => '1F3E3' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿฅ', - 'iOS7' => '', - 'Hex' => '1F3E5' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿฆ', - 'iOS7' => '', - 'Hex' => '1F3E6' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿช', - 'iOS7' => '', - 'Hex' => '1F3EA' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿฉ', - 'iOS7' => '', - 'Hex' => '1F3E9' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿจ', - 'iOS7' => '', - 'Hex' => '1F3E8' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ’’', - 'iOS7' => '', - 'Hex' => '1F492' - ), - array( - 'iOS2' => '', - 'iOS5' => 'โ›ช', - 'iOS7' => 'โ›ช๏ธ', - 'Hex' => '26EA' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿฌ', - 'iOS7' => '', - 'Hex' => '1F3EC' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿค', 'iOS7' => '', 'Hex' => '1F3E4'), - array( - 'iOS2' => '', - 'iOS5' => '๐ŸŒ‡', - 'iOS7' => '', - 'Hex' => '1F307' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐ŸŒ†', - 'iOS7' => '', - 'Hex' => '1F306' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿฏ', - 'iOS7' => '', - 'Hex' => '1F3EF' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿฐ', - 'iOS7' => '', - 'Hex' => '1F3F0' - ), - array( - 'iOS2' => '', - 'iOS5' => 'โ›บ', - 'iOS7' => 'โ›บ๏ธ', - 'Hex' => '26FA' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿญ', - 'iOS7' => '', - 'Hex' => '1F3ED' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ—ผ', - 'iOS7' => '', - 'Hex' => '1F5FC' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿ—พ', 'iOS7' => '', 'Hex' => '1F5FE'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ—ป', - 'iOS7' => '', - 'Hex' => '1F5FB' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐ŸŒ„', - 'iOS7' => '', - 'Hex' => '1F304' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐ŸŒ…', - 'iOS7' => '', - 'Hex' => '1F305' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐ŸŒƒ', - 'iOS7' => '', - 'Hex' => '1F303' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ—ฝ', - 'iOS7' => '', - 'Hex' => '1F5FD' - ), - array('iOS2' => '', 'iOS5' => '๐ŸŒ‰', 'iOS7' => '', 'Hex' => '1F309'), - array('iOS2' => '', 'iOS5' => '๐ŸŽ ', 'iOS7' => '', 'Hex' => '1F3A0'), - array( - 'iOS2' => '', - 'iOS5' => '๐ŸŽก', - 'iOS7' => '', - 'Hex' => '1F3A1' - ), - array( - 'iOS2' => '', - 'iOS5' => 'โ›ฒ', - 'iOS7' => 'โ›ฒ๏ธ', - 'Hex' => '26F2' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐ŸŽข', - 'iOS7' => '', - 'Hex' => '1F3A2' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿšข', - 'iOS7' => '', - 'Hex' => '1F6A2' - ), - array( - 'iOS2' => '', - 'iOS5' => 'โ›ต', - 'iOS7' => 'โ›ต๏ธ', - 'Hex' => '26F5' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿšค', - 'iOS7' => '', - 'Hex' => '1F6A4' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿšฃ', 'iOS7' => '', 'Hex' => '1F6A3'), - array('iOS2' => '', 'iOS5' => 'โš“', 'iOS7' => 'โš“๏ธ', 'Hex' => '2693'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿš€', - 'iOS7' => '', - 'Hex' => '1F680' - ), - array( - 'iOS2' => '', - 'iOS5' => 'โœˆ', - 'iOS7' => 'โœˆ๏ธ', - 'Hex' => '2708' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ’บ', - 'iOS7' => '', - 'Hex' => '1F4BA' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿš', 'iOS7' => '', 'Hex' => '1F681'), - array('iOS2' => '', 'iOS5' => '๐Ÿš‚', 'iOS7' => '', 'Hex' => '1F682'), - array('iOS2' => '', 'iOS5' => '๐ŸšŠ', 'iOS7' => '', 'Hex' => '1F68A'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿš‰', - 'iOS7' => '', - 'Hex' => '1F689' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿšž', 'iOS7' => '', 'Hex' => '1F69E'), - array('iOS2' => '', 'iOS5' => '๐Ÿš†', 'iOS7' => '', 'Hex' => '1F686'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿš„', - 'iOS7' => '', - 'Hex' => '1F684' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿš…', - 'iOS7' => '', - 'Hex' => '1F685' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿšˆ', 'iOS7' => '', 'Hex' => '1F688'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿš‡', - 'iOS7' => '', - 'Hex' => '1F687' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿš', 'iOS7' => '', 'Hex' => '1F69D'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿš‹', - 'iOS7' => '', - 'Hex' => '1F68B' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿšƒ', 'iOS7' => '', 'Hex' => '1F683'), - array('iOS2' => '', 'iOS5' => '๐ŸšŽ', 'iOS7' => '', 'Hex' => '1F68E'), - array( - 'iOS2' => '', - 'iOS5' => '๐ŸšŒ', - 'iOS7' => '', - 'Hex' => '1F68C' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿš', 'iOS7' => '', 'Hex' => '1F68D'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿš™', - 'iOS7' => '', - 'Hex' => '1F699' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿš˜', 'iOS7' => '', 'Hex' => '1F698'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿš—', - 'iOS7' => '', - 'Hex' => '1F697' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿš•', - 'iOS7' => '', - 'Hex' => '1F695' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿš–', 'iOS7' => '', 'Hex' => '1F696'), - array('iOS2' => '', 'iOS5' => '๐Ÿš›', 'iOS7' => '', 'Hex' => '1F69B'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿšš', - 'iOS7' => '', - 'Hex' => '1F69A' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿšจ', 'iOS7' => '', 'Hex' => '1F6A8'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿš“', - 'iOS7' => '', - 'Hex' => '1F693' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿš”', 'iOS7' => '', 'Hex' => '1F694'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿš’', - 'iOS7' => '', - 'Hex' => '1F692' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿš‘', - 'iOS7' => '', - 'Hex' => '1F691' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿš', 'iOS7' => '', 'Hex' => '1F690'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿšฒ', - 'iOS7' => '', - 'Hex' => '1F6B2' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿšก', 'iOS7' => '', 'Hex' => '1F6A1'), - array('iOS2' => '', 'iOS5' => '๐ŸšŸ', 'iOS7' => '', 'Hex' => '1F69F'), - array('iOS2' => '', 'iOS5' => '๐Ÿš ', 'iOS7' => '', 'Hex' => '1F6A0'), - array('iOS2' => '', 'iOS5' => '๐Ÿšœ', 'iOS7' => '', 'Hex' => '1F69C'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ’ˆ', - 'iOS7' => '', - 'Hex' => '1F488' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿš', - 'iOS7' => '', - 'Hex' => '1F68F' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐ŸŽซ', - 'iOS7' => '', - 'Hex' => '1F3AB' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿšฆ', 'iOS7' => '', 'Hex' => '1F6A6'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿšฅ', - 'iOS7' => '', - 'Hex' => '1F6A5' - ), - array( - 'iOS2' => '', - 'iOS5' => 'โš ', - 'iOS7' => 'โš ๏ธ', - 'Hex' => '26A0' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿšง', - 'iOS7' => '', - 'Hex' => '1F6A7' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ”ฐ', - 'iOS7' => '', - 'Hex' => '1F530' - ), - array( - 'iOS2' => '', - 'iOS5' => 'โ›ฝ', - 'iOS7' => 'โ›ฝ๏ธ', - 'Hex' => '26FD' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿฎ', 'iOS7' => '', 'Hex' => '1F3EE'), - array( - 'iOS2' => '', - 'iOS5' => '๐ŸŽฐ', - 'iOS7' => '', - 'Hex' => '1F3B0' - ), - array( - 'iOS2' => '', - 'iOS5' => 'โ™จ', - 'iOS7' => 'โ™จ๏ธ', - 'Hex' => '2668' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿ—ฟ', 'iOS7' => '', 'Hex' => '1F5FF'), - array('iOS2' => '', 'iOS5' => '๐ŸŽช', 'iOS7' => '', 'Hex' => '1F3AA'), - array('iOS2' => '', 'iOS5' => '๐ŸŽญ', 'iOS7' => '', 'Hex' => '1F3AD'), - array('iOS2' => '', 'iOS5' => '๐Ÿ“', 'iOS7' => '', 'Hex' => '1F4CD'), - array('iOS2' => '', 'iOS5' => '๐Ÿšฉ', 'iOS7' => '', 'Hex' => '1F6A9'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ‡ฏ๐Ÿ‡ต', - 'iOS7' => '', - 'Hex' => '1F1EF_1F1F5' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ‡ฐ๐Ÿ‡ท', - 'iOS7' => '', - 'Hex' => '1F1F0_1F1F7' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ‡ฉ๐Ÿ‡ช', - 'iOS7' => '', - 'Hex' => '1F1E9_1F1EA' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ‡จ๐Ÿ‡ณ', - 'iOS7' => '', - 'Hex' => '1F1E8_1F1F3' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ‡บ๐Ÿ‡ธ', - 'iOS7' => '', - 'Hex' => '1F1FA_1F1F8' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ‡ซ๐Ÿ‡ท', - 'iOS7' => '', - 'Hex' => '1F1EB_1F1F7' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ‡ช๐Ÿ‡ธ', - 'iOS7' => '', - 'Hex' => '1F1EA_1F1F8' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ‡ฎ๐Ÿ‡น', - 'iOS7' => '', - 'Hex' => '1F1EE_1F1F9' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ‡ท๐Ÿ‡บ', - 'iOS7' => '', - 'Hex' => '1F1F7_1F1FA' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ‡ฌ๐Ÿ‡ง', - 'iOS7' => '', - 'Hex' => '1F1EC_1F1E7' - ), - array( - 'iOS2' => '', - 'iOS5' => '', - 'iOS7' => '', - 'Hex' => '' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿถ', - 'iOS7' => '', - 'Hex' => '1F436' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿบ', - 'iOS7' => '', - 'Hex' => '1F43A' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿฑ', - 'iOS7' => '', - 'Hex' => '1F431' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿญ', - 'iOS7' => '', - 'Hex' => '1F42D' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿน', - 'iOS7' => '', - 'Hex' => '1F439' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿฐ', - 'iOS7' => '', - 'Hex' => '1F430' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿธ', - 'iOS7' => '', - 'Hex' => '1F438' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿฏ', - 'iOS7' => '', - 'Hex' => '1F42F' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿจ', - 'iOS7' => '', - 'Hex' => '1F428' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿป', - 'iOS7' => '', - 'Hex' => '1F43B' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿท', - 'iOS7' => '', - 'Hex' => '1F437' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿฝ', 'iOS7' => '', 'Hex' => '1F43D'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿฎ', - 'iOS7' => '', - 'Hex' => '1F42E' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ—', - 'iOS7' => '', - 'Hex' => '1F417' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿต', - 'iOS7' => '', - 'Hex' => '1F435' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ’', - 'iOS7' => '', - 'Hex' => '1F412' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿด', - 'iOS7' => '', - 'Hex' => '1F434' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ‘', - 'iOS7' => '', - 'Hex' => '1F411' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ˜', - 'iOS7' => '', - 'Hex' => '1F418' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿผ', 'iOS7' => '', 'Hex' => '1F43C'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿง', - 'iOS7' => '', - 'Hex' => '1F427' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿฆ', - 'iOS7' => '', - 'Hex' => '1F426' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿค', - 'iOS7' => '', - 'Hex' => '1F424' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿฅ', 'iOS7' => '', 'Hex' => '1F425'), - array('iOS2' => '', 'iOS5' => '๐Ÿฃ', 'iOS7' => '', 'Hex' => '1F423'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ”', - 'iOS7' => '', - 'Hex' => '1F414' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ', - 'iOS7' => '', - 'Hex' => '1F40D' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿข', 'iOS7' => '', 'Hex' => '1F422'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ›', - 'iOS7' => '', - 'Hex' => '1F41B' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿ', 'iOS7' => '', 'Hex' => '1F41D'), - array('iOS2' => '', 'iOS5' => '๐Ÿœ', 'iOS7' => '', 'Hex' => '1F41C'), - array('iOS2' => '', 'iOS5' => '๐Ÿž', 'iOS7' => '', 'Hex' => '1F41E'), - array('iOS2' => '', 'iOS5' => '๐ŸŒ', 'iOS7' => '', 'Hex' => '1F40C'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ™', - 'iOS7' => '', - 'Hex' => '1F419' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿš', - 'iOS7' => '', - 'Hex' => '1F41A' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ ', - 'iOS7' => '', - 'Hex' => '1F420' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐ŸŸ', - 'iOS7' => '', - 'Hex' => '1F41F' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿฌ', - 'iOS7' => '', - 'Hex' => '1F42C' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿณ', - 'iOS7' => '', - 'Hex' => '1F433' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿ‹', 'iOS7' => '', 'Hex' => '1F40B'), - array('iOS2' => '', 'iOS5' => '๐Ÿ„', 'iOS7' => '', 'Hex' => '1F404'), - array('iOS2' => '', 'iOS5' => '๐Ÿ', 'iOS7' => '', 'Hex' => '1F40F'), - array('iOS2' => '', 'iOS5' => '๐Ÿ€', 'iOS7' => '', 'Hex' => '1F400'), - array('iOS2' => '', 'iOS5' => '๐Ÿƒ', 'iOS7' => '', 'Hex' => '1F403'), - array('iOS2' => '', 'iOS5' => '๐Ÿ…', 'iOS7' => '', 'Hex' => '1F405'), - array('iOS2' => '', 'iOS5' => '๐Ÿ‡', 'iOS7' => '', 'Hex' => '1F407'), - array('iOS2' => '', 'iOS5' => '๐Ÿ‰', 'iOS7' => '', 'Hex' => '1F409'), - array( - 'iOS2' => '', - 'iOS5' => '๐ŸŽ', - 'iOS7' => '', - 'Hex' => '1F40E' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿ', 'iOS7' => '', 'Hex' => '1F410'), - array('iOS2' => '', 'iOS5' => '๐Ÿ“', 'iOS7' => '', 'Hex' => '1F413'), - array('iOS2' => '', 'iOS5' => '๐Ÿ•', 'iOS7' => '', 'Hex' => '1F415'), - array('iOS2' => '', 'iOS5' => '๐Ÿ–', 'iOS7' => '', 'Hex' => '1F416'), - array('iOS2' => '', 'iOS5' => '๐Ÿ', 'iOS7' => '', 'Hex' => '1F401'), - array('iOS2' => '', 'iOS5' => '๐Ÿ‚', 'iOS7' => '', 'Hex' => '1F402'), - array('iOS2' => '', 'iOS5' => '๐Ÿฒ', 'iOS7' => '', 'Hex' => '1F432'), - array('iOS2' => '', 'iOS5' => '๐Ÿก', 'iOS7' => '', 'Hex' => '1F421'), - array('iOS2' => '', 'iOS5' => '๐ŸŠ', 'iOS7' => '', 'Hex' => '1F40A'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿซ', - 'iOS7' => '', - 'Hex' => '1F42B' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿช', 'iOS7' => '', 'Hex' => '1F42A'), - array('iOS2' => '', 'iOS5' => '๐Ÿ†', 'iOS7' => '', 'Hex' => '1F406'), - array('iOS2' => '', 'iOS5' => '๐Ÿˆ', 'iOS7' => '', 'Hex' => '1F408'), - array('iOS2' => '', 'iOS5' => '๐Ÿฉ', 'iOS7' => '', 'Hex' => '1F429'), - array('iOS2' => '', 'iOS5' => '๐Ÿพ', 'iOS7' => '', 'Hex' => '1F43E'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ’', - 'iOS7' => '', - 'Hex' => '1F490' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐ŸŒธ', - 'iOS7' => '', - 'Hex' => '1F338' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐ŸŒท', - 'iOS7' => '', - 'Hex' => '1F337' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ€', - 'iOS7' => '', - 'Hex' => '1F340' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐ŸŒน', - 'iOS7' => '', - 'Hex' => '1F339' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐ŸŒป', - 'iOS7' => '', - 'Hex' => '1F33B' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐ŸŒบ', - 'iOS7' => '', - 'Hex' => '1F33A' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ', - 'iOS7' => '', - 'Hex' => '1F341' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿƒ', - 'iOS7' => '', - 'Hex' => '1F343' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ‚', - 'iOS7' => '', - 'Hex' => '1F342' - ), - array('iOS2' => '', 'iOS5' => '๐ŸŒฟ', 'iOS7' => '', 'Hex' => '1F33F'), - array( - 'iOS2' => '', - 'iOS5' => '๐ŸŒพ', - 'iOS7' => '', - 'Hex' => '1F33E' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿ„', 'iOS7' => '', 'Hex' => '1F344'), - array( - 'iOS2' => '', - 'iOS5' => '๐ŸŒต', - 'iOS7' => '', - 'Hex' => '1F335' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐ŸŒด', - 'iOS7' => '', - 'Hex' => '1F334' - ), - array('iOS2' => '', 'iOS5' => '๐ŸŒฒ', 'iOS7' => '', 'Hex' => '1F332'), - array('iOS2' => '', 'iOS5' => '๐ŸŒณ', 'iOS7' => '', 'Hex' => '1F333'), - array('iOS2' => '', 'iOS5' => '๐ŸŒฐ', 'iOS7' => '', 'Hex' => '1F330'), - array('iOS2' => '', 'iOS5' => '๐ŸŒฑ', 'iOS7' => '', 'Hex' => '1F331'), - array('iOS2' => '', 'iOS5' => '๐ŸŒผ', 'iOS7' => '', 'Hex' => '1F33C'), - array('iOS2' => '', 'iOS5' => '๐ŸŒ', 'iOS7' => '', 'Hex' => '1F310'), - array('iOS2' => '', 'iOS5' => '๐ŸŒž', 'iOS7' => '', 'Hex' => '1F31E'), - array('iOS2' => '', 'iOS5' => '๐ŸŒ', 'iOS7' => '', 'Hex' => '1F31D'), - array('iOS2' => '', 'iOS5' => '๐ŸŒš', 'iOS7' => '', 'Hex' => '1F31A'), - array('iOS2' => '', 'iOS5' => '๐ŸŒ‘', 'iOS7' => '', 'Hex' => '1F311'), - array('iOS2' => '', 'iOS5' => '๐ŸŒ’', 'iOS7' => '', 'Hex' => '1F312'), - array('iOS2' => '', 'iOS5' => '๐ŸŒ“', 'iOS7' => '', 'Hex' => '1F313'), - array('iOS2' => '', 'iOS5' => '๐ŸŒ”', 'iOS7' => '', 'Hex' => '1F314'), - array('iOS2' => '', 'iOS5' => '๐ŸŒ•', 'iOS7' => '', 'Hex' => '1F315'), - array('iOS2' => '', 'iOS5' => '๐ŸŒ–', 'iOS7' => '', 'Hex' => '1F316'), - array('iOS2' => '', 'iOS5' => '๐ŸŒ—', 'iOS7' => '', 'Hex' => '1F317'), - array('iOS2' => '', 'iOS5' => '๐ŸŒ˜', 'iOS7' => '', 'Hex' => '1F318'), - array('iOS2' => '', 'iOS5' => '๐ŸŒœ', 'iOS7' => '', 'Hex' => '1F31C'), - array('iOS2' => '', 'iOS5' => '๐ŸŒ›', 'iOS7' => '', 'Hex' => '1F31B'), - array( - 'iOS2' => '', - 'iOS5' => '๐ŸŒ™', - 'iOS7' => '', - 'Hex' => '1F319' - ), - array('iOS2' => '', 'iOS5' => '๐ŸŒ', 'iOS7' => '', 'Hex' => '1F30D'), - array('iOS2' => '', 'iOS5' => '๐ŸŒŽ', 'iOS7' => '', 'Hex' => '1F30E'), - array('iOS2' => '', 'iOS5' => '๐ŸŒ', 'iOS7' => '', 'Hex' => '1F30F'), - array('iOS2' => '', 'iOS5' => '๐ŸŒ‹', 'iOS7' => '', 'Hex' => '1F30B'), - array('iOS2' => '', 'iOS5' => '๐ŸŒŒ', 'iOS7' => '', 'Hex' => '1F30C'), - array('iOS2' => '', 'iOS5' => '๐ŸŒ ', 'iOS7' => '', 'Hex' => '1F320'), - array('iOS2' => '', 'iOS5' => 'โญ', 'iOS7' => 'โญ๏ธ', 'Hex' => '2B50'), - array( - 'iOS2' => '', - 'iOS5' => 'โ˜€', - 'iOS7' => 'โ˜€๏ธ', - 'Hex' => '2600' - ), - array('iOS2' => '', 'iOS5' => 'โ›…', 'iOS7' => 'โ›…๏ธ', 'Hex' => '26C5'), - array( - 'iOS2' => '', - 'iOS5' => 'โ˜', - 'iOS7' => 'โ˜๏ธ', - 'Hex' => '2601' - ), - array( - 'iOS2' => '', - 'iOS5' => 'โšก', - 'iOS7' => 'โšก๏ธ', - 'Hex' => '26A1' - ), - array( - 'iOS2' => '', - 'iOS5' => 'โ˜”', - 'iOS7' => 'โ˜”๏ธ', - 'Hex' => '2614' - ), - array('iOS2' => '', 'iOS5' => 'โ„', 'iOS7' => 'โ„๏ธ', 'Hex' => '2744'), - array( - 'iOS2' => '', - 'iOS5' => 'โ›„', - 'iOS7' => 'โ›„๏ธ', - 'Hex' => '26C4' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐ŸŒ€', - 'iOS7' => '๐ŸŒ€', - 'Hex' => '1F300' - ), - array('iOS2' => '', 'iOS5' => '๐ŸŒ', 'iOS7' => '', 'Hex' => '1F301'), - array( - 'iOS2' => '', - 'iOS5' => '๐ŸŒˆ', - 'iOS7' => '', - 'Hex' => '1F308' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐ŸŒŠ', - 'iOS7' => '', - 'Hex' => '1F30A' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐ŸŽ', - 'iOS7' => '', - 'Hex' => '1F38D' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ’', - 'iOS7' => '', - 'Hex' => '1F49D' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐ŸŽŽ', - 'iOS7' => '', - 'Hex' => '1F38E' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐ŸŽ’', - 'iOS7' => '', - 'Hex' => '1F392' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐ŸŽ“', - 'iOS7' => '', - 'Hex' => '1F393' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐ŸŽ', - 'iOS7' => '', - 'Hex' => '1F38F' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐ŸŽ†', - 'iOS7' => '', - 'Hex' => '1F386' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐ŸŽ‡', - 'iOS7' => '', - 'Hex' => '1F387' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐ŸŽ', - 'iOS7' => '', - 'Hex' => '1F390' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐ŸŽ‘', - 'iOS7' => '', - 'Hex' => '1F391' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐ŸŽƒ', - 'iOS7' => '', - 'Hex' => '1F383' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ‘ป', - 'iOS7' => '', - 'Hex' => '1F47B' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐ŸŽ…', - 'iOS7' => '', - 'Hex' => '1F385' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐ŸŽ„', - 'iOS7' => '', - 'Hex' => '1F384' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐ŸŽ', - 'iOS7' => '', - 'Hex' => '1F381' - ), - array('iOS2' => '', 'iOS5' => '๐ŸŽ‹', 'iOS7' => '', 'Hex' => '1F38B'), - array( - 'iOS2' => '', - 'iOS5' => '๐ŸŽ‰', - 'iOS7' => '', - 'Hex' => '1F389' - ), - array('iOS2' => '', 'iOS5' => '๐ŸŽŠ', 'iOS7' => '', 'Hex' => '1F38A'), - array( - 'iOS2' => '', - 'iOS5' => '๐ŸŽˆ', - 'iOS7' => '', - 'Hex' => '1F388' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐ŸŽŒ', - 'iOS7' => '', - 'Hex' => '1F38C' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿ”ฎ', 'iOS7' => '', 'Hex' => '1F52E'), - array( - 'iOS2' => '', - 'iOS5' => '๐ŸŽฅ', - 'iOS7' => '', - 'Hex' => '1F3A5' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ“ท', - 'iOS7' => '', - 'Hex' => '1F4F7' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿ“น', 'iOS7' => '', 'Hex' => '1F4F9'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ“ผ', - 'iOS7' => '', - 'Hex' => '1F4FC' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ’ฟ', - 'iOS7' => '', - 'Hex' => '1F4BF' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ“€', - 'iOS7' => '', - 'Hex' => '1F4C0' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ’ฝ', - 'iOS7' => '', - 'Hex' => '1F4BD' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿ’พ', 'iOS7' => '', 'Hex' => '1F4BE'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ’ป', - 'iOS7' => '', - 'Hex' => '1F4BB' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ“ฑ', - 'iOS7' => '', - 'Hex' => '1F4F1' - ), - array( - 'iOS2' => '', - 'iOS5' => 'โ˜Ž', - 'iOS7' => 'โ˜Ž๏ธ', - 'Hex' => '260E' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿ“ž', 'iOS7' => '', 'Hex' => '1F4DE'), - array('iOS2' => '', 'iOS5' => '๐Ÿ“Ÿ', 'iOS7' => '', 'Hex' => '1F4DF'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ“ ', - 'iOS7' => '', - 'Hex' => '1F4E0' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ“ก', - 'iOS7' => '', - 'Hex' => '1F4E1' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ“บ', - 'iOS7' => '', - 'Hex' => '1F4FA' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ“ป', - 'iOS7' => '', - 'Hex' => '1F4FB' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿ”Š', 'iOS7' => '', 'Hex' => '1F50A'), - array('iOS2' => '', 'iOS5' => '๐Ÿ”‰', 'iOS7' => '', 'Hex' => '1F509'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ”ˆ', - 'iOS7' => '', - 'Hex' => '1F508' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿ”‡', 'iOS7' => '', 'Hex' => '1F507'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ””', - 'iOS7' => '', - 'Hex' => '1F514' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿ”•', 'iOS7' => '', 'Hex' => '1F515'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ“ข', - 'iOS7' => '', - 'Hex' => '1F4E2' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ“ฃ', - 'iOS7' => '', - 'Hex' => '1F4E3' - ), - array('iOS2' => '', 'iOS5' => 'โณ', 'iOS7' => '', 'Hex' => '23F3'), - array('iOS2' => '', 'iOS5' => 'โŒ›', 'iOS7' => 'โŒ›๏ธ', 'Hex' => '231B'), - array('iOS2' => '', 'iOS5' => 'โฐ', 'iOS7' => 'โฐ', 'Hex' => '23F0'), - array('iOS2' => '', 'iOS5' => 'โŒš', 'iOS7' => 'โŒš๏ธ', 'Hex' => '231A'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ”“', - 'iOS7' => '', - 'Hex' => '1F513' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ”’', - 'iOS7' => '', - 'Hex' => '1F512' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿ”', 'iOS7' => '', 'Hex' => '1F50F'), - array('iOS2' => '', 'iOS5' => '๐Ÿ”', 'iOS7' => '', 'Hex' => '1F510'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ”‘', - 'iOS7' => '', - 'Hex' => '1F511' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿ”Ž', 'iOS7' => '', 'Hex' => '1F50E'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ’ก', - 'iOS7' => '', - 'Hex' => '1F4A1' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿ”ฆ', 'iOS7' => '', 'Hex' => '1F526'), - array('iOS2' => '', 'iOS5' => '๐Ÿ”†', 'iOS7' => '', 'Hex' => '1F506'), - array('iOS2' => '', 'iOS5' => '๐Ÿ”…', 'iOS7' => '', 'Hex' => '1F505'), - array('iOS2' => '', 'iOS5' => '๐Ÿ”Œ', 'iOS7' => '', 'Hex' => '1F50C'), - array('iOS2' => '', 'iOS5' => '๐Ÿ”‹', 'iOS7' => '', 'Hex' => '1F50B'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ”', - 'iOS7' => '', - 'Hex' => '1F50D' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿ›', 'iOS7' => '', 'Hex' => '1F6C1'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ›€', - 'iOS7' => '', - 'Hex' => '1F6C0' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿšฟ', 'iOS7' => '', 'Hex' => '1F6BF'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿšฝ', - 'iOS7' => '', - 'Hex' => '1F6BD' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿ”ง', 'iOS7' => '', 'Hex' => '1F527'), - array('iOS2' => '', 'iOS5' => '๐Ÿ”ฉ', 'iOS7' => '', 'Hex' => '1F529'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ”จ', - 'iOS7' => '', - 'Hex' => '1F528' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿšช', 'iOS7' => '', 'Hex' => '1F6AA'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿšฌ', - 'iOS7' => '', - 'Hex' => '1F6AC' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ’ฃ', - 'iOS7' => '', - 'Hex' => '1F4A3' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ”ซ', - 'iOS7' => '', - 'Hex' => '1F52B' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿ”ช', 'iOS7' => '', 'Hex' => '1F52A'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ’Š', - 'iOS7' => '', - 'Hex' => '1F48A' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ’‰', - 'iOS7' => '', - 'Hex' => '1F489' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ’ฐ', - 'iOS7' => '', - 'Hex' => '1F4B0' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿ’ด', 'iOS7' => '', 'Hex' => '1F4B4'), - array('iOS2' => '', 'iOS5' => '๐Ÿ’ต', 'iOS7' => '', 'Hex' => '1F4B5'), - array('iOS2' => '', 'iOS5' => '๐Ÿ’ท', 'iOS7' => '', 'Hex' => '1F4B7'), - array('iOS2' => '', 'iOS5' => '๐Ÿ’ถ', 'iOS7' => '', 'Hex' => '1F4B6'), - array('iOS2' => '', 'iOS5' => '๐Ÿ’ณ', 'iOS7' => '', 'Hex' => '1F4B3'), - array('iOS2' => '', 'iOS5' => '๐Ÿ’ธ', 'iOS7' => '', 'Hex' => '1F4B8'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ“ฒ', - 'iOS7' => '', - 'Hex' => '1F4F2' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿ“ง', 'iOS7' => '', 'Hex' => '1F4E7'), - array('iOS2' => '', 'iOS5' => '๐Ÿ“ฅ', 'iOS7' => '', 'Hex' => '1F4E5'), - array('iOS2' => '', 'iOS5' => '๐Ÿ“ค', 'iOS7' => '', 'Hex' => '1F4E4'), - array('iOS2' => '', 'iOS5' => 'โœ‰', 'iOS7' => 'โœ‰๏ธ', 'Hex' => '2709'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ“ฉ', - 'iOS7' => '', - 'Hex' => '1F4E9' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿ“จ', 'iOS7' => '', 'Hex' => '1F4E8'), - array('iOS2' => '', 'iOS5' => '๐Ÿ“ฏ', 'iOS7' => '', 'Hex' => '1F4EF'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ“ซ', - 'iOS7' => '', - 'Hex' => '1F4EB' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿ“ช', 'iOS7' => '', 'Hex' => '1F4EA'), - array('iOS2' => '', 'iOS5' => '๐Ÿ“ฌ', 'iOS7' => '', 'Hex' => '1F4EC'), - array('iOS2' => '', 'iOS5' => '๐Ÿ“ญ', 'iOS7' => '', 'Hex' => '1F4ED'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ“ฎ', - 'iOS7' => '', - 'Hex' => '1F4EE' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿ“ฆ', 'iOS7' => '', 'Hex' => '1F4E6'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ“', - 'iOS7' => '', - 'Hex' => '1F4DD' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿ“„', 'iOS7' => '', 'Hex' => '1F4C4'), - array('iOS2' => '', 'iOS5' => '๐Ÿ“ƒ', 'iOS7' => '', 'Hex' => '1F4C3'), - array('iOS2' => '', 'iOS5' => '๐Ÿ“‘', 'iOS7' => '', 'Hex' => '1F4D1'), - array('iOS2' => '', 'iOS5' => '๐Ÿ“Š', 'iOS7' => '', 'Hex' => '1F4CA'), - array('iOS2' => '', 'iOS5' => '๐Ÿ“ˆ', 'iOS7' => '', 'Hex' => '1F4C8'), - array('iOS2' => '', 'iOS5' => '๐Ÿ“‰', 'iOS7' => '', 'Hex' => '1F4C9'), - array('iOS2' => '', 'iOS5' => '๐Ÿ“œ', 'iOS7' => '', 'Hex' => '1F4DC'), - array('iOS2' => '', 'iOS5' => '๐Ÿ“‹', 'iOS7' => '', 'Hex' => '1F4CB'), - array('iOS2' => '', 'iOS5' => '๐Ÿ“…', 'iOS7' => '', 'Hex' => '1F4C5'), - array('iOS2' => '', 'iOS5' => '๐Ÿ“†', 'iOS7' => '', 'Hex' => '1F4C6'), - array('iOS2' => '', 'iOS5' => '๐Ÿ“‡', 'iOS7' => '', 'Hex' => '1F4C7'), - array('iOS2' => '', 'iOS5' => '๐Ÿ“', 'iOS7' => '', 'Hex' => '1F4C1'), - array('iOS2' => '', 'iOS5' => '๐Ÿ“‚', 'iOS7' => '', 'Hex' => '1F4C2'), - array( - 'iOS2' => '', - 'iOS5' => 'โœ‚', - 'iOS7' => 'โœ‚๏ธ', - 'Hex' => '2702' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿ“Œ', 'iOS7' => '', 'Hex' => '1F4CC'), - array('iOS2' => '', 'iOS5' => '๐Ÿ“Ž', 'iOS7' => '', 'Hex' => '1F4CE'), - array('iOS2' => '', 'iOS5' => 'โœ’', 'iOS7' => 'โœ’๏ธ', 'Hex' => '2712'), - array('iOS2' => '', 'iOS5' => 'โœ', 'iOS7' => 'โœ๏ธ', 'Hex' => '270F'), - array('iOS2' => '', 'iOS5' => '๐Ÿ“', 'iOS7' => '', 'Hex' => '1F4CF'), - array('iOS2' => '', 'iOS5' => '๐Ÿ“', 'iOS7' => '', 'Hex' => '1F4D0'), - array('iOS2' => '', 'iOS5' => '๐Ÿ“•', 'iOS7' => '', 'Hex' => '1F4D5'), - array('iOS2' => '', 'iOS5' => '๐Ÿ“—', 'iOS7' => '', 'Hex' => '1F4D7'), - array('iOS2' => '', 'iOS5' => '๐Ÿ“˜', 'iOS7' => '', 'Hex' => '1F4D8'), - array('iOS2' => '', 'iOS5' => '๐Ÿ“™', 'iOS7' => '', 'Hex' => '1F4D9'), - array('iOS2' => '', 'iOS5' => '๐Ÿ““', 'iOS7' => '', 'Hex' => '1F4D3'), - array('iOS2' => '', 'iOS5' => '๐Ÿ“”', 'iOS7' => '', 'Hex' => '1F4D4'), - array('iOS2' => '', 'iOS5' => '๐Ÿ“’', 'iOS7' => '', 'Hex' => '1F4D2'), - array('iOS2' => '', 'iOS5' => '๐Ÿ“š', 'iOS7' => '', 'Hex' => '1F4DA'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ“–', - 'iOS7' => '', - 'Hex' => '1F4D6' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿ”–', 'iOS7' => '', 'Hex' => '1F516'), - array('iOS2' => '', 'iOS5' => '๐Ÿ“›', 'iOS7' => '', 'Hex' => '1F4DB'), - array('iOS2' => '', 'iOS5' => '๐Ÿ”ฌ', 'iOS7' => '', 'Hex' => '1F52C'), - array('iOS2' => '', 'iOS5' => '๐Ÿ”ญ', 'iOS7' => '', 'Hex' => '1F52D'), - array('iOS2' => '', 'iOS5' => '๐Ÿ“ฐ', 'iOS7' => '', 'Hex' => '1F4F0'), - array( - 'iOS2' => '', - 'iOS5' => '๐ŸŽจ', - 'iOS7' => '', - 'Hex' => '1F3A8' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐ŸŽฌ', - 'iOS7' => '', - 'Hex' => '1F3AC' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐ŸŽค', - 'iOS7' => '', - 'Hex' => '1F3A4' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐ŸŽง', - 'iOS7' => '', - 'Hex' => '1F3A7' - ), - array('iOS2' => '', 'iOS5' => '๐ŸŽผ', 'iOS7' => '', 'Hex' => '1F3BC'), - array( - 'iOS2' => '', - 'iOS5' => '๐ŸŽต', - 'iOS7' => '', - 'Hex' => '1F3B5' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐ŸŽถ', - 'iOS7' => '', - 'Hex' => '1F3B6' - ), - array('iOS2' => '', 'iOS5' => '๐ŸŽน', 'iOS7' => '', 'Hex' => '1F3B9'), - array('iOS2' => '', 'iOS5' => '๐ŸŽป', 'iOS7' => '', 'Hex' => '1F3BB'), - array( - 'iOS2' => '', - 'iOS5' => '๐ŸŽบ', - 'iOS7' => '', - 'Hex' => '1F3BA' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐ŸŽท', - 'iOS7' => '', - 'Hex' => '1F3B7' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐ŸŽธ', - 'iOS7' => '', - 'Hex' => '1F3B8' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ‘พ', - 'iOS7' => '', - 'Hex' => '1F47E' - ), - array('iOS2' => '', 'iOS5' => '๐ŸŽฎ', 'iOS7' => '', 'Hex' => '1F3AE'), - array('iOS2' => '', 'iOS5' => '๐Ÿƒ', 'iOS7' => '', 'Hex' => '1F0CF'), - array('iOS2' => '', 'iOS5' => '๐ŸŽด', 'iOS7' => '', 'Hex' => '1F3B4'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ€„', - 'iOS7' => '๐Ÿ€„๏ธ', - 'Hex' => '1F004' - ), - array('iOS2' => '', 'iOS5' => '๐ŸŽฒ', 'iOS7' => '', 'Hex' => '1F3B2'), - array( - 'iOS2' => '', - 'iOS5' => '๐ŸŽฏ', - 'iOS7' => '', - 'Hex' => '1F3AF' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿˆ', - 'iOS7' => '', - 'Hex' => '1F3C8' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ€', - 'iOS7' => '', - 'Hex' => '1F3C0' - ), - array( - 'iOS2' => '', - 'iOS5' => 'โšฝ', - 'iOS7' => 'โšฝ๏ธ', - 'Hex' => '26BD' - ), - array( - 'iOS2' => '', - 'iOS5' => 'โšพ', - 'iOS7' => 'โšพ๏ธ', - 'Hex' => '26BE' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐ŸŽพ', - 'iOS7' => '', - 'Hex' => '1F3BE' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐ŸŽฑ', - 'iOS7' => '', - 'Hex' => '1F3B1' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿ‰', 'iOS7' => '', 'Hex' => '1F3C9'), - array('iOS2' => '', 'iOS5' => '๐ŸŽณ', 'iOS7' => '', 'Hex' => '1F3B3'), - array( - 'iOS2' => '', - 'iOS5' => 'โ›ณ', - 'iOS7' => 'โ›ณ๏ธ', - 'Hex' => '26F3' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿšต', 'iOS7' => '', 'Hex' => '1F6B5'), - array('iOS2' => '', 'iOS5' => '๐Ÿšด', 'iOS7' => '', 'Hex' => '1F6B4'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ', - 'iOS7' => '', - 'Hex' => '1F3C1' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿ‡', 'iOS7' => '', 'Hex' => '1F3C7'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ†', - 'iOS7' => '', - 'Hex' => '1F3C6' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐ŸŽฟ', - 'iOS7' => '', - 'Hex' => '1F3BF' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿ‚', 'iOS7' => '', 'Hex' => '1F3C2'), - array( - 'iOS2' => '', - 'iOS5' => '๐ŸŠ', - 'iOS7' => '', - 'Hex' => '1F3CA' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ„', - 'iOS7' => '', - 'Hex' => '1F3C4' - ), - array('iOS2' => '', 'iOS5' => '๐ŸŽฃ', 'iOS7' => '', 'Hex' => '1F3A3'), - array( - 'iOS2' => '', - 'iOS5' => 'โ˜•', - 'iOS7' => 'โ˜•๏ธ', - 'Hex' => '2615' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿต', - 'iOS7' => '', - 'Hex' => '1F375' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿถ', - 'iOS7' => '', - 'Hex' => '1F376' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿผ', 'iOS7' => '', 'Hex' => '1F37C'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿบ', - 'iOS7' => '', - 'Hex' => '1F37A' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿป', - 'iOS7' => '', - 'Hex' => '1F37B' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿธ', - 'iOS7' => '', - 'Hex' => '1F378' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿน', 'iOS7' => '', 'Hex' => '1F379'), - array('iOS2' => '', 'iOS5' => '๐Ÿท', 'iOS7' => '', 'Hex' => '1F377'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿด', - 'iOS7' => '', - 'Hex' => '1F374' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿ•', 'iOS7' => '', 'Hex' => '1F355'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ”', - 'iOS7' => '', - 'Hex' => '1F354' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐ŸŸ', - 'iOS7' => '', - 'Hex' => '1F35F' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿ—', 'iOS7' => '', 'Hex' => '1F357'), - array('iOS2' => '', 'iOS5' => '๐Ÿ–', 'iOS7' => '', 'Hex' => '1F356'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ', - 'iOS7' => '', - 'Hex' => '1F35D' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ›', - 'iOS7' => '', - 'Hex' => '1F35B' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿค', 'iOS7' => '', 'Hex' => '1F364'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿฑ', - 'iOS7' => '', - 'Hex' => '1F371' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿฃ', - 'iOS7' => '', - 'Hex' => '1F363' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿฅ', 'iOS7' => '', 'Hex' => '1F365'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ™', - 'iOS7' => '', - 'Hex' => '1F359' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ˜', - 'iOS7' => '', - 'Hex' => '1F358' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿš', - 'iOS7' => '', - 'Hex' => '1F35A' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿœ', - 'iOS7' => '', - 'Hex' => '1F35C' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿฒ', - 'iOS7' => '', - 'Hex' => '1F372' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿข', - 'iOS7' => '', - 'Hex' => '1F362' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿก', - 'iOS7' => '', - 'Hex' => '1F361' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿณ', - 'iOS7' => '', - 'Hex' => '1F373' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿž', - 'iOS7' => '', - 'Hex' => '1F35E' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿฉ', 'iOS7' => '', 'Hex' => '1F369'), - array('iOS2' => '', 'iOS5' => '๐Ÿฎ', 'iOS7' => '', 'Hex' => '1F36E'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿฆ', - 'iOS7' => '', - 'Hex' => '1F366' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿจ', 'iOS7' => '', 'Hex' => '1F368'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿง', - 'iOS7' => '', - 'Hex' => '1F367' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐ŸŽ‚', - 'iOS7' => '', - 'Hex' => '1F382' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿฐ', - 'iOS7' => '', - 'Hex' => '1F370' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿช', 'iOS7' => '', 'Hex' => '1F36A'), - array('iOS2' => '', 'iOS5' => '๐Ÿซ', 'iOS7' => '', 'Hex' => '1F36B'), - array('iOS2' => '', 'iOS5' => '๐Ÿฌ', 'iOS7' => '', 'Hex' => '1F36C'), - array('iOS2' => '', 'iOS5' => '๐Ÿญ', 'iOS7' => '', 'Hex' => '1F36D'), - array('iOS2' => '', 'iOS5' => '๐Ÿฏ', 'iOS7' => '', 'Hex' => '1F36F'), - array( - 'iOS2' => '', - 'iOS5' => '๐ŸŽ', - 'iOS7' => '', - 'Hex' => '1F34E' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿ', 'iOS7' => '', 'Hex' => '1F34F'), - array( - 'iOS2' => '', - 'iOS5' => '๐ŸŠ', - 'iOS7' => '', - 'Hex' => '1F34A' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿ‹', 'iOS7' => '', 'Hex' => '1F34B'), - array('iOS2' => '', 'iOS5' => '๐Ÿ’', 'iOS7' => '', 'Hex' => '1F352'), - array('iOS2' => '', 'iOS5' => '๐Ÿ‡', 'iOS7' => '', 'Hex' => '1F347'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ‰', - 'iOS7' => '', - 'Hex' => '1F349' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ“', - 'iOS7' => '', - 'Hex' => '1F353' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿ‘', 'iOS7' => '', 'Hex' => '1F351'), - array('iOS2' => '', 'iOS5' => '๐Ÿˆ', 'iOS7' => '', 'Hex' => '1F348'), - array('iOS2' => '', 'iOS5' => '๐ŸŒ', 'iOS7' => '', 'Hex' => '1F34C'), - array('iOS2' => '', 'iOS5' => '๐Ÿ', 'iOS7' => '', 'Hex' => '1F350'), - array('iOS2' => '', 'iOS5' => '๐Ÿ', 'iOS7' => '', 'Hex' => '1F34D'), - array('iOS2' => '', 'iOS5' => '๐Ÿ ', 'iOS7' => '', 'Hex' => '1F360'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ†', - 'iOS7' => '', - 'Hex' => '1F346' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ…', - 'iOS7' => '', - 'Hex' => '1F345' - ), - array('iOS2' => '', 'iOS5' => '๐ŸŒฝ', 'iOS7' => '', 'Hex' => '1F33D'), - array( - 'iOS2' => '', - 'iOS5' => '1โƒฃ', - 'iOS7' => '', - 'Hex' => '0031_20E3' - ), - array( - 'iOS2' => '', - 'iOS5' => '2โƒฃ', - 'iOS7' => '', - 'Hex' => '0032_20E3' - ), - array( - 'iOS2' => '', - 'iOS5' => '3โƒฃ', - 'iOS7' => '', - 'Heex' => '0034_20E3' - ), - array( - 'iOS2' => '', - 'iOS5' => '2โƒฃ', - 'iOS7' => '', - 'Hex' => '0032_20E3' - ), - array( - 'iOS2' => '', - 'iOS5' => '0โƒฃ', - 'iOS7' => '', - 'Hex' => '0030_20E3' - ), - array( - 'iOS2' => '', - 'iOS5' => '5โƒฃ', - 'iOS7' => '', - 'Hex' => '0035_20E3' - ), - array( - 'iOS2' => '', - 'iOS5' => '6โƒฃ', - 'iOS7' => '', - 'Hex' => '0036_20E3' - ), - array( - 'iOS2' => '', - 'iOS5' => '7โƒฃ', - 'iOS7' => '', - 'Hex' => '0037_20E3' - ), - array( - 'iOS2' => '', - 'iOS5' => '8โƒฃ', - 'iOS7' => '', - 'Hex' => '0038_20E3' - ), - array( - 'iOS2' => '', - 'iOS5' => '9โƒฃ', - 'iOS7' => '', - 'Hex' => '0039_20E3' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿ”Ÿ', 'iOS7' => '', 'Hex' => '1F51F'), - array('iOS2' => '', 'iOS5' => '๐Ÿ”ข', 'iOS7' => '', 'Hex' => '1F522'), - array( - 'iOS2' => '', - 'iOS5' => '#โƒฃ', - 'iOS7' => '', - 'Hex' => '0023_20E3' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿ”ฃ', 'iOS7' => '', 'Hex' => '1F523'), - array( - 'iOS2' => '', - 'iOS5' => 'โฌ†', - 'iOS7' => 'โฌ†๏ธ', - 'Hex' => '2B06' - ), - array( - 'iOS2' => '', - 'iOS5' => 'โฌ‡', - 'iOS7' => 'โฌ‡๏ธ', - 'Hex' => '2B07' - ), - array( - 'iOS2' => '', - 'iOS5' => 'โฌ…', - 'iOS7' => 'โฌ…๏ธ', - 'Hex' => '2B05' - ), - array( - 'iOS2' => '', - 'iOS5' => 'โžก', - 'iOS7' => 'โžก๏ธ', - 'Hex' => '27A1' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿ” ', 'iOS7' => '', 'Hex' => '1F520'), - array('iOS2' => '', 'iOS5' => '๐Ÿ”ก', 'iOS7' => '', 'Hex' => '1F521'), - array('iOS2' => '', 'iOS5' => '๐Ÿ”ค', 'iOS7' => '', 'Hex' => '1F524'), - array( - 'iOS2' => '', - 'iOS5' => 'โ†—', - 'iOS7' => 'โ†—๏ธ', - 'Hex' => '2197' - ), - array( - 'iOS2' => '', - 'iOS5' => 'โ†–', - 'iOS7' => 'โ†–๏ธ', - 'Hex' => '2196' - ), - array( - 'iOS2' => '', - 'iOS5' => 'โ†˜', - 'iOS7' => 'โ†˜๏ธ', - 'Hex' => '2198' - ), - array( - 'iOS2' => '', - 'iOS5' => 'โ†™', - 'iOS7' => 'โ†™๏ธ', - 'Hex' => '2199' - ), - array('iOS2' => '', 'iOS5' => 'โ†”', 'iOS7' => 'โ†”๏ธ', 'Hex' => '2194'), - array('iOS2' => '', 'iOS5' => 'โ†•', 'iOS7' => 'โ†•๏ธ', 'Hex' => '2195'), - array('iOS2' => '', 'iOS5' => '๐Ÿ”„', 'iOS7' => '', 'Hex' => '1F504'), - array( - 'iOS2' => '', - 'iOS5' => 'โ—€', - 'iOS7' => 'โ—€๏ธ', - 'Hex' => '25C0' - ), - array( - 'iOS2' => '', - 'iOS5' => 'โ–ถ', - 'iOS7' => 'โ–ถ๏ธ', - 'Hex' => '25B6' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿ”ผ', 'iOS7' => '', 'Hex' => '1F53C'), - array('iOS2' => '', 'iOS5' => '๐Ÿ”ฝ', 'iOS7' => '', 'Hex' => '1F53D'), - array('iOS2' => '', 'iOS5' => 'โ†ฉ', 'iOS7' => 'โ†ฉ๏ธ', 'Hex' => '21A9'), - array('iOS2' => '', 'iOS5' => 'โ†ช', 'iOS7' => 'โ†ช๏ธ', 'Hex' => '21AA'), - array('iOS2' => '', 'iOS5' => 'โ„น', 'iOS7' => 'โ„น๏ธ', 'Hex' => '2139'), - array('iOS2' => '', 'iOS5' => 'โช', 'iOS7' => '', 'Hex' => '23EA'), - array('iOS2' => '', 'iOS5' => 'โฉ', 'iOS7' => '', 'Hex' => '23E9'), - array('iOS2' => '', 'iOS5' => 'โซ', 'iOS7' => '', 'Hex' => '23EB'), - array('iOS2' => '', 'iOS5' => 'โฌ', 'iOS7' => '', 'Hex' => '23EC'), - array('iOS2' => '', 'iOS5' => 'โคต', 'iOS7' => 'โคต๏ธ', 'Hex' => '2935'), - array('iOS2' => '', 'iOS5' => 'โคด', 'iOS7' => 'โคด๏ธ', 'Hex' => '2934'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ†—', - 'iOS7' => '', - 'Hex' => '1F197' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿ”€', 'iOS7' => '', 'Hex' => '1F500'), - array('iOS2' => '', 'iOS5' => '๐Ÿ”', 'iOS7' => '', 'Hex' => '1F501'), - array('iOS2' => '', 'iOS5' => '๐Ÿ”‚', 'iOS7' => '', 'Hex' => '1F502'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ†•', - 'iOS7' => '', - 'Hex' => '1F195' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ†™', - 'iOS7' => '', - 'Hex' => '1F199' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ†’', - 'iOS7' => '', - 'Hex' => '1F192' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿ†“', 'iOS7' => '', 'Hex' => '1F193'), - array('iOS2' => '', 'iOS5' => '๐Ÿ†–', 'iOS7' => '', 'Hex' => '1F196'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ“ถ', - 'iOS7' => '', - 'Hex' => '1F4F6' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐ŸŽฆ', - 'iOS7' => '', - 'Hex' => '1F3A6' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿˆ', - 'iOS7' => '', - 'Hex' => '1F201' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿˆฏ', - 'iOS7' => '๐Ÿˆฏ๏ธ', - 'Hex' => '1F22F' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿˆณ', - 'iOS7' => '', - 'Hex' => '1F233' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿˆต', - 'iOS7' => '', - 'Hex' => '1F235' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿˆด', 'iOS7' => '', 'Hex' => '1F234'), - array('iOS2' => '', 'iOS5' => '๐Ÿˆฒ', 'iOS7' => '', 'Hex' => '1F232'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ‰', - 'iOS7' => '', - 'Hex' => '1F250' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿˆน', - 'iOS7' => '', - 'Hex' => '1F239' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿˆบ', - 'iOS7' => '', - 'Hex' => '1F23A' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿˆถ', - 'iOS7' => '', - 'Hex' => '1F236' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿˆš', - 'iOS7' => '๐Ÿˆš๏ธ', - 'Hex' => '1F21A' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿšป', - 'iOS7' => '', - 'Hex' => '1F6BB' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿšน', - 'iOS7' => '', - 'Hex' => '1F6B9' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿšบ', - 'iOS7' => '', - 'Hex' => '1F6BA' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿšผ', - 'iOS7' => '', - 'Hex' => '1F6BC' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿšพ', - 'iOS7' => '', - 'Hex' => '1F6BE' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿšฐ', 'iOS7' => '', 'Hex' => '1F6B0'), - array('iOS2' => '', 'iOS5' => '๐Ÿšฎ', 'iOS7' => '', 'Hex' => '1F6AE'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ…ฟ', - 'iOS7' => '๐Ÿ…ฟ๏ธ', - 'Hex' => '1F17F' - ), - array( - 'iOS2' => '', - 'iOS5' => 'โ™ฟ', - 'iOS7' => 'โ™ฟ๏ธ', - 'Hex' => '267F' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿšญ', - 'iOS7' => '', - 'Hex' => '1F6AD' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿˆท', - 'iOS7' => '', - 'Hex' => '1F237' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿˆธ', - 'iOS7' => '', - 'Hex' => '1F238' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿˆ‚', - 'iOS7' => '', - 'Hex' => '1F202' - ), - array('iOS2' => '', 'iOS5' => 'โ“‚', 'iOS7' => 'โ“‚๏ธ', 'Hex' => '24C2'), - array('iOS2' => '', 'iOS5' => '๐Ÿ›‚', 'iOS7' => '', 'Hex' => '1F6C2'), - array('iOS2' => '', 'iOS5' => '๐Ÿ›„', 'iOS7' => '', 'Hex' => '1F6C4'), - array('iOS2' => '', 'iOS5' => '๐Ÿ›…', 'iOS7' => '', 'Hex' => '1F6C5'), - array('iOS2' => '', 'iOS5' => '๐Ÿ›ƒ', 'iOS7' => '', 'Hex' => '1F6C3'), - array('iOS2' => '', 'iOS5' => '๐Ÿ‰‘', 'iOS7' => '', 'Hex' => '1F251'), - array( - 'iOS2' => '', - 'iOS5' => 'ใŠ™', - 'iOS7' => 'ใŠ™๏ธ', - 'Hex' => '3299' - ), - array( - 'iOS2' => '', - 'iOS5' => 'ใŠ—', - 'iOS7' => 'ใŠ—๏ธ', - 'Hex' => '3297' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿ†‘', 'iOS7' => '', 'Hex' => '1F191'), - array('iOS2' => '', 'iOS5' => '๐Ÿ†˜', 'iOS7' => '', 'Hex' => '1F198'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ†”', - 'iOS7' => '', - 'Hex' => '1F194' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿšซ', 'iOS7' => '', 'Hex' => '1F6AB'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ”ž', - 'iOS7' => '', - 'Hex' => '1F51E' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿ“ต', 'iOS7' => '', 'Hex' => '1F4F5'), - array('iOS2' => '', 'iOS5' => '๐Ÿšฏ', 'iOS7' => '', 'Hex' => '1F6AF'), - array('iOS2' => '', 'iOS5' => '๐Ÿšฑ', 'iOS7' => '', 'Hex' => '1F6B1'), - array('iOS2' => '', 'iOS5' => '๐Ÿšณ', 'iOS7' => '', 'Hex' => '1F6B3'), - array('iOS2' => '', 'iOS5' => '๐Ÿšท', 'iOS7' => '', 'Hex' => '1F6B7'), - array('iOS2' => '', 'iOS5' => '๐Ÿšธ', 'iOS7' => '', 'Hex' => '1F6B8'), - array('iOS2' => '', 'iOS5' => 'โ›”', 'iOS7' => 'โ›”๏ธ', 'Hex' => '26D4'), - array( - 'iOS2' => '', - 'iOS5' => 'โœณ', - 'iOS7' => 'โœณ๏ธ', - 'Hex' => '2733' - ), - array('iOS2' => '', 'iOS5' => 'โ‡', 'iOS7' => 'โ‡๏ธ', 'Hex' => '2747'), - array('iOS2' => '', 'iOS5' => 'โŽ', 'iOS7' => '', 'Hex' => '274E'), - array('iOS2' => '', 'iOS5' => 'โœ…', 'iOS7' => '', 'Hex' => '2705'), - array( - 'iOS2' => '', - 'iOS5' => 'โœด', - 'iOS7' => 'โœด๏ธ', - 'Hex' => '2734' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ’Ÿ', - 'iOS7' => '', - 'Hex' => '1F49F' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ†š', - 'iOS7' => '', - 'Hex' => '1F19A' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ“ณ', - 'iOS7' => '', - 'Hex' => '1F4F3' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ“ด', - 'iOS7' => '', - 'Hex' => '1F4F4' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ…ฐ', - 'iOS7' => '', - 'Hex' => '1F170' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ…ฑ', - 'iOS7' => '', - 'Hex' => '1F171' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ†Ž', - 'iOS7' => '', - 'Hex' => '1F18E' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ…พ', - 'iOS7' => '', - 'Hex' => '1F17E' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿ’ ', 'iOS7' => '', 'Hex' => '1F4A0'), - array('iOS2' => '', 'iOS5' => 'โžฟ', 'iOS7' => '', 'Hex' => '27BF'), - array('iOS2' => '', 'iOS5' => 'โ™ป', 'iOS7' => 'โ™ป๏ธ', 'Hex' => '267B'), - array( - 'iOS2' => '', - 'iOS5' => 'โ™ˆ', - 'iOS7' => 'โ™ˆ๏ธ', - 'Hex' => '2648' - ), - array( - 'iOS2' => '', - 'iOS5' => 'โ™‰', - 'iOS7' => 'โ™‰๏ธ', - 'Hex' => '2649' - ), - array( - 'iOS2' => '', - 'iOS5' => 'โ™Š', - 'iOS7' => 'โ™Š๏ธ', - 'Hex' => '264A' - ), - array( - 'iOS2' => '', - 'iOS5' => 'โ™‹', - 'iOS7' => 'โ™‹๏ธ', - 'Hex' => '264B' - ), - array( - 'iOS2' => '', - 'iOS5' => 'โ™Œ', - 'iOS7' => 'โ™Œ๏ธ', - 'Hex' => '264C' - ), - array( - 'iOS2' => '', - 'iOS5' => 'โ™', - 'iOS7' => 'โ™๏ธ', - 'Hex' => '264D' - ), - array( - 'iOS2' => '', - 'iOS5' => 'โ™Ž', - 'iOS7' => 'โ™Ž๏ธ', - 'Hex' => '264E' - ), - array( - 'iOS2' => '', - 'iOS5' => 'โ™', - 'iOS7' => 'โ™๏ธ', - 'Hex' => '264F' - ), - array( - 'iOS2' => '', - 'iOS5' => 'โ™', - 'iOS7' => 'โ™๏ธ', - 'Hex' => '2650' - ), - array( - 'iOS2' => '', - 'iOS5' => 'โ™‘', - 'iOS7' => 'โ™‘๏ธ', - 'Hex' => '2651' - ), - array( - 'iOS2' => '', - 'iOS5' => 'โ™’', - 'iOS7' => 'โ™’๏ธ', - 'Hex' => '2652' - ), - array( - 'iOS2' => '', - 'iOS5' => 'โ™“', - 'iOS7' => 'โ™“๏ธ', - 'Hex' => '2653' - ), - array('iOS2' => '', 'iOS5' => 'โ›Ž', 'iOS7' => '', 'Hex' => '26CE'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ”ฏ', - 'iOS7' => '', - 'Hex' => '1F52F' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿง', - 'iOS7' => '', - 'Hex' => '1F3E7' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ’น', - 'iOS7' => '', - 'Hex' => '1F4B9' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿ’ฒ', 'iOS7' => '', 'Hex' => '1F4B2'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ’ฑ', - 'iOS7' => '', - 'Hex' => '1F4B1' - ), - array('iOS2' => 'ยฉ', 'iOS5' => 'ยฉ', 'iOS7' => '', 'Hex' => '00A9'), - array('iOS2' => 'ยฎ', 'iOS5' => 'ยฎ', 'iOS7' => '', 'Hex' => '00AE'), - array('iOS2' => 'โ„ข', 'iOS5' => 'โ„ข', 'iOS7' => '', 'Hex' => '2122'), - array( - 'iOS2' => '', - 'iOS5' => 'ใ€ฝ', - 'iOS7' => 'ใ€ฝ๏ธ', - 'Hex' => '303D' - ), - array('iOS2' => '', 'iOS5' => 'ใ€ฐ', 'iOS7' => '', 'Hex' => '3030'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ”', - 'iOS7' => '', - 'Hex' => '1F51D' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿ”š', 'iOS7' => '', 'Hex' => '1F51A'), - array('iOS2' => '', 'iOS5' => '๐Ÿ”™', 'iOS7' => '', 'Hex' => '1F519'), - array('iOS2' => '', 'iOS5' => '๐Ÿ”›', 'iOS7' => '', 'Hex' => '1F51B'), - array('iOS2' => '', 'iOS5' => '๐Ÿ”œ', 'iOS7' => '', 'Hex' => '1F51C'), - array('iOS2' => '', 'iOS5' => 'โŒ', 'iOS7' => '', 'Hex' => '274C'), - array( - 'iOS2' => '', - 'iOS5' => 'โญ•', - 'iOS7' => 'โญ•๏ธ', - 'Hex' => '2B55' - ), - array('iOS2' => '', 'iOS5' => 'โ—', 'iOS7' => 'โ—๏ธ', 'Hex' => '2757'), - array('iOS2' => '', 'iOS5' => 'โ“', 'iOS7' => '', 'Hex' => '2753'), - array('iOS2' => '', 'iOS5' => 'โ•', 'iOS7' => '', 'Hex' => '2755'), - array('iOS2' => '', 'iOS5' => 'โ”', 'iOS7' => '', 'Hex' => '2754'), - array('iOS2' => '', 'iOS5' => '๐Ÿ”ƒ', 'iOS7' => '', 'Hex' => '1F503'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ•›', - 'iOS7' => '', - 'Hex' => '1F55B' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿ•ง', 'iOS7' => '', 'Hex' => '1F567'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ•', - 'iOS7' => '', - 'Hex' => '1F550' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿ•œ', 'iOS7' => '', 'Hex' => '1F55C'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ•‘', - 'iOS7' => '', - 'Hex' => '1F551' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿ•', 'iOS7' => '', 'Hex' => '1F55D'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ•’', - 'iOS7' => '', - 'Hex' => '1F552' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿ•ž', 'iOS7' => '', 'Hex' => '1F55E'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ•“', - 'iOS7' => '', - 'Hex' => '1F553' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿ•Ÿ', 'iOS7' => '', 'Hex' => '1F55F'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ•”', - 'iOS7' => '', - 'Hex' => '1F554' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿ• ', 'iOS7' => '', 'Hex' => '1F560'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ••', - 'iOS7' => '', - 'Hex' => '1F555' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ•–', - 'iOS7' => '', - 'Hex' => '1F556' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ•—', - 'iOS7' => '', - 'Hex' => '1F557' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ•˜', - 'iOS7' => '', - 'Hex' => '1F558' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ•™', - 'iOS7' => '', - 'Hex' => '1F559' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ•š', - 'iOS7' => '', - 'Hex' => '1F55A' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿ•ก', 'iOS7' => '', 'Hex' => '1F561'), - array('iOS2' => '', 'iOS5' => '๐Ÿ•ข', 'iOS7' => '', 'Hex' => '1F562'), - array('iOS2' => '', 'iOS5' => '๐Ÿ•ฃ', 'iOS7' => '', 'Hex' => '1F563'), - array('iOS2' => '', 'iOS5' => '๐Ÿ•ค', 'iOS7' => '', 'Hex' => '1F564'), - array('iOS2' => '', 'iOS5' => '๐Ÿ•ฅ', 'iOS7' => '', 'Hex' => '1F565'), - array('iOS2' => '', 'iOS5' => '๐Ÿ•ฆ', 'iOS7' => '', 'Hex' => '1F566'), - array('iOS2' => '', 'iOS5' => 'โœ–', 'iOS7' => 'โœ–๏ธ', 'Hex' => '2716'), - array('iOS2' => '', 'iOS5' => 'โž•', 'iOS7' => '', 'Hex' => '2795'), - array('iOS2' => '', 'iOS5' => 'โž–', 'iOS7' => '', 'Hex' => '2796'), - array('iOS2' => '', 'iOS5' => 'โž—', 'iOS7' => '', 'Hex' => '2797'), - array( - 'iOS2' => '', - 'iOS5' => 'โ™ ', - 'iOS7' => 'โ™ ๏ธ', - 'Hex' => '2660' - ), - array( - 'iOS2' => '', - 'iOS5' => 'โ™ฅ', - 'iOS7' => 'โ™ฅ๏ธ', - 'Hex' => '2665' - ), - array( - 'iOS2' => '', - 'iOS5' => 'โ™ฃ', - 'iOS7' => 'โ™ฃ๏ธ', - 'Hex' => '2663' - ), - array( - 'iOS2' => '', - 'iOS5' => 'โ™ฆ', - 'iOS7' => 'โ™ฆ๏ธ', - 'Hex' => '2666' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿ’ฎ', 'iOS7' => '', 'Hex' => '1F4AE'), - array('iOS2' => '', 'iOS5' => '๐Ÿ’ฏ', 'iOS7' => '', 'Hex' => '1F4AF'), - array('iOS2' => '', 'iOS5' => 'โœ”', 'iOS7' => 'โœ”๏ธ', 'Hex' => '2714'), - array('iOS2' => '', 'iOS5' => 'โ˜‘', 'iOS7' => 'โ˜‘๏ธ', 'Hex' => '2611'), - array('iOS2' => '', 'iOS5' => '๐Ÿ”˜', 'iOS7' => '', 'Hex' => '1F518'), - array('iOS2' => '', 'iOS5' => '๐Ÿ”—', 'iOS7' => '', 'Hex' => '1F517'), - array('iOS2' => '', 'iOS5' => 'โžฐ', 'iOS7' => '', 'Hex' => '27B0'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ”ฑ', - 'iOS7' => '', - 'Hex' => '1F531' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ”ฒ', - 'iOS7' => '', - 'Hex' => '1F532' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ”ณ', - 'iOS7' => '', - 'Hex' => '1F533' - ), - array('iOS2' => '', 'iOS5' => 'โ—ผ', 'iOS7' => 'โ—ผ๏ธ', 'Hex' => '25FC'), - array('iOS2' => '', 'iOS5' => 'โ—ป', 'iOS7' => 'โ—ป๏ธ', 'Hex' => '25FB'), - array('iOS2' => '', 'iOS5' => 'โ—พ', 'iOS7' => 'โ—พ๏ธ', 'Hex' => '25FE'), - array('iOS2' => '', 'iOS5' => 'โ—ฝ', 'iOS7' => 'โ—ฝ๏ธ', 'Hex' => '25FD'), - array('iOS2' => '', 'iOS5' => 'โ–ช', 'iOS7' => 'โ–ช๏ธ', 'Hex' => '25AA'), - array('iOS2' => '', 'iOS5' => 'โ–ซ', 'iOS7' => 'โ–ซ๏ธ', 'Hex' => '25AB'), - array('iOS2' => '', 'iOS5' => '๐Ÿ”บ', 'iOS7' => '', 'Hex' => '1F53A'), - array('iOS2' => '', 'iOS5' => 'โฌœ', 'iOS7' => 'โฌœ๏ธ', 'Hex' => '2B1C'), - array('iOS2' => '', 'iOS5' => 'โฌ›', 'iOS7' => 'โฌ›๏ธ', 'Hex' => '2B1B'), - array('iOS2' => '', 'iOS5' => 'โšซ', 'iOS7' => 'โšซ๏ธ', 'Hex' => '26AB'), - array('iOS2' => '', 'iOS5' => 'โšช', 'iOS7' => 'โšช๏ธ', 'Hex' => '26AA'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ”ด', - 'iOS7' => '', - 'Hex' => '1F534' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿ”ต', 'iOS7' => '', 'Hex' => '1F535'), - array('iOS2' => '', 'iOS5' => '๐Ÿ”ป', 'iOS7' => '', 'Hex' => '1F53B'), - array('iOS2' => '', 'iOS5' => '๐Ÿ”ถ', 'iOS7' => '', 'Hex' => '1F536'), - array('iOS2' => '', 'iOS5' => '๐Ÿ”ท', 'iOS7' => '', 'Hex' => '1F537'), - array('iOS2' => '', 'iOS5' => '๐Ÿ”ธ', 'iOS7' => '', 'Hex' => '1F538'), - array('iOS2' => '', 'iOS5' => '๐Ÿ”น', 'iOS7' => '', 'Hex' => '1F539'), - array('iOS2' => '', 'iOS5' => 'โ‰', 'iOS7' => 'โ‰๏ธ', 'Hex' => '2049'), - array('iOS2' => '', 'iOS5' => 'โ€ผ', 'iOS7' => 'โ€ผ๏ธ', 'Hex' => '203C') - ); - } +function ArrayEmojis() +{ + return array( + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ˜„', + 'iOS7' => '', + 'Hex' => '1F604' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ˜ƒ', + 'iOS7' => '', + 'Hex' => '1F603' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿ˜€', 'iOS7' => '', 'Hex' => '1F600'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ˜Š', + 'iOS7' => '', + 'Hex' => '1F60A' + ), + array( + 'iOS2' => '', + 'iOS5' => 'โ˜บ', + 'iOS7' => 'โ˜บ๏ธ', + 'Hex' => '263A' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ˜‰', + 'iOS7' => '', + 'Hex' => '1F609' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ˜', + 'iOS7' => '', + 'Hex' => '1F60D' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ˜˜', + 'iOS7' => '', + 'Hex' => '1F618' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ˜š', + 'iOS7' => '', + 'Hex' => '1F61A' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿ˜—', 'iOS7' => '', 'Hex' => '1F617'), + array('iOS2' => '', 'iOS5' => '๐Ÿ˜™', 'iOS7' => '', 'Hex' => '1F619'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ˜œ', + 'iOS7' => '', + 'Hex' => '1F61C' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ˜', + 'iOS7' => '', + 'Hex' => '1F61D' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿ˜›', 'iOS7' => '', 'Hex' => '1F61B'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ˜ณ', + 'iOS7' => '', + 'Hex' => '1F633' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ˜', + 'iOS7' => '', + 'Hex' => '1F601' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ˜”', + 'iOS7' => '', + 'Hex' => '1F614' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ˜Œ', + 'iOS7' => '', + 'Hex' => '1F60C' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ˜’', + 'iOS7' => '', + 'Hex' => '1F612' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ˜ž', + 'iOS7' => '', + 'Hex' => '1F61E' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ˜ฃ', + 'iOS7' => '', + 'Hex' => '1F623' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ˜ข', + 'iOS7' => '', + 'Hex' => '1F622' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ˜‚', + 'iOS7' => '', + 'Hex' => '1F602' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ˜ญ', + 'iOS7' => '', + 'Hex' => '1F62D' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ˜ช', + 'iOS7' => '', + 'Hex' => '1F62A' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ˜ฅ', + 'iOS7' => '', + 'Hex' => '1F625' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ˜ฐ', + 'iOS7' => '', + 'Hex' => '1F630' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿ˜…', 'iOS7' => '', 'Hex' => '1F605'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ˜“', + 'iOS7' => '', + 'Hex' => '1F613' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿ˜ฉ', 'iOS7' => '', 'Hex' => '1F629'), + array('iOS2' => '', 'iOS5' => '๐Ÿ˜ซ', 'iOS7' => '', 'Hex' => '1F62B'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ˜จ', + 'iOS7' => '', + 'Hex' => '1F628' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ˜ฑ', + 'iOS7' => '', + 'Hex' => '1F631' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ˜ ', + 'iOS7' => '', + 'Hex' => '1F620' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ˜ก', + 'iOS7' => '', + 'Hex' => '1F621' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿ˜ค', 'iOS7' => '', 'Hex' => '1F624'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ˜–', + 'iOS7' => '', + 'Hex' => '1F616' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿ˜†', 'iOS7' => '', 'Hex' => '1F606'), + array('iOS2' => '', 'iOS5' => '๐Ÿ˜‹', 'iOS7' => '', 'Hex' => '1F60B'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ˜ท', + 'iOS7' => '', + 'Hex' => '1F637' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿ˜Ž', 'iOS7' => '', 'Hex' => '1F60E'), + array('iOS2' => '', 'iOS5' => '๐Ÿ˜ด', 'iOS7' => '', 'Hex' => '1F634'), + array('iOS2' => '', 'iOS5' => '๐Ÿ˜ต', 'iOS7' => '', 'Hex' => '1F635'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ˜ฒ', + 'iOS7' => '', + 'Hex' => '1F632' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿ˜Ÿ', 'iOS7' => '', 'Hex' => '1F61F'), + array('iOS2' => '', 'iOS5' => '๐Ÿ˜ฆ', 'iOS7' => '', 'Hex' => '1F626'), + array('iOS2' => '', 'iOS5' => '๐Ÿ˜ง', 'iOS7' => '', 'Hex' => '1F627'), + array('iOS2' => '', 'iOS5' => '๐Ÿ˜ˆ', 'iOS7' => '', 'Hex' => '1F608'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ‘ฟ', + 'iOS7' => '', + 'Hex' => '1F47F' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿ˜ฎ', 'iOS7' => '', 'Hex' => '1F62E'), + array('iOS2' => '', 'iOS5' => '๐Ÿ˜ฌ', 'iOS7' => '', 'Hex' => '1F62C'), + array('iOS2' => '', 'iOS5' => '๐Ÿ˜', 'iOS7' => '', 'Hex' => '1F610'), + array('iOS2' => '', 'iOS5' => '๐Ÿ˜•', 'iOS7' => '', 'Hex' => '1F615'), + array('iOS2' => '', 'iOS5' => '๐Ÿ˜ฏ', 'iOS7' => '', 'Hex' => '1F62F'), + array('iOS2' => '', 'iOS5' => '๐Ÿ˜ถ', 'iOS7' => '', 'Hex' => '1F636'), + array('iOS2' => '', 'iOS5' => '๐Ÿ˜‡', 'iOS7' => '', 'Hex' => '1F607'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ˜', + 'iOS7' => '', + 'Hex' => '1F60F' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿ˜‘', 'iOS7' => '', 'Hex' => '1F611'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ‘ฒ', + 'iOS7' => '', + 'Hex' => '1F472' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ‘ณ', + 'iOS7' => '', + 'Hex' => '1F473' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ‘ฎ', + 'iOS7' => '', + 'Hex' => '1F46E' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ‘ท', + 'iOS7' => '', + 'Hex' => '1F477' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ’‚', + 'iOS7' => '', + 'Hex' => '1F482' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ‘ถ', + 'iOS7' => '', + 'Hex' => '1F476' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ‘ฆ', + 'iOS7' => '', + 'Hex' => '1F466' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ‘ง', + 'iOS7' => '', + 'Hex' => '1F467' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ‘จ', + 'iOS7' => '', + 'Hex' => '1F468' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ‘ฉ', + 'iOS7' => '', + 'Hex' => '1F469' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ‘ด', + 'iOS7' => '', + 'Hex' => '1F474' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ‘ต', + 'iOS7' => '', + 'Hex' => '1F475' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ‘ฑ', + 'iOS7' => '', + 'Hex' => '1F471' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ‘ผ', + 'iOS7' => '', + 'Hex' => '1F47C' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ‘ธ', + 'iOS7' => '', + 'Hex' => '1F478' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿ˜บ', 'iOS7' => '', 'Hex' => '1F63A'), + array('iOS2' => '', 'iOS5' => '๐Ÿ˜ธ', 'iOS7' => '', 'Hex' => '1F638'), + array('iOS2' => '', 'iOS5' => '๐Ÿ˜ป', 'iOS7' => '', 'Hex' => '1F63B'), + array('iOS2' => '', 'iOS5' => '๐Ÿ˜ฝ', 'iOS7' => '', 'Hex' => '1F63D'), + array('iOS2' => '', 'iOS5' => '๐Ÿ˜ผ', 'iOS7' => '', 'Hex' => '1F63C'), + array('iOS2' => '', 'iOS5' => '๐Ÿ™€', 'iOS7' => '', 'Hex' => '1F640'), + array('iOS2' => '', 'iOS5' => '๐Ÿ˜ฟ', 'iOS7' => '', 'Hex' => '1F63F'), + array('iOS2' => '', 'iOS5' => '๐Ÿ˜น', 'iOS7' => '', 'Hex' => '1F639'), + array('iOS2' => '', 'iOS5' => '๐Ÿ˜พ', 'iOS7' => '', 'Hex' => '1F63E'), + array('iOS2' => '', 'iOS5' => '๐Ÿ‘น', 'iOS7' => '', 'Hex' => '1F479'), + array('iOS2' => '', 'iOS5' => '๐Ÿ‘บ', 'iOS7' => '', 'Hex' => '1F47A'), + array('iOS2' => '', 'iOS5' => '๐Ÿ™ˆ', 'iOS7' => '', 'Hex' => '1F648'), + array('iOS2' => '', 'iOS5' => '๐Ÿ™‰', 'iOS7' => '', 'Hex' => '1F649'), + array('iOS2' => '', 'iOS5' => '๐Ÿ™Š', 'iOS7' => '', 'Hex' => '1F64A'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ’€', + 'iOS7' => '', + 'Hex' => '1F480' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ‘ฝ', + 'iOS7' => '', + 'Hex' => '1F47D' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ’ฉ', + 'iOS7' => '', + 'Hex' => '1F4A9' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ”ฅ', + 'iOS7' => '', + 'Hex' => '1F525' + ), + array('iOS2' => '', 'iOS5' => 'โœจ', 'iOS7' => '', 'Hex' => '2728'), + array( + 'iOS2' => '', + 'iOS5' => '๐ŸŒŸ', + 'iOS7' => '', + 'Hex' => '1F31F' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿ’ซ', 'iOS7' => '', 'Hex' => '1F4AB'), + array('iOS2' => '', 'iOS5' => '๐Ÿ’ฅ', 'iOS7' => '', 'Hex' => '1F4A5'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ’ข', + 'iOS7' => '', + 'Hex' => '1F4A2' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ’ฆ', + 'iOS7' => '', + 'Hex' => '1F4A6' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿ’ง', 'iOS7' => '', 'Hex' => '1F4A7'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ’ค', + 'iOS7' => '', + 'Hex' => '1F4A4' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ’จ', + 'iOS7' => '', + 'Hex' => '1F4A8' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ‘‚', + 'iOS7' => '', + 'Hex' => '1F442' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ‘€', + 'iOS7' => '', + 'Hex' => '1F440' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ‘ƒ', + 'iOS7' => '', + 'Hex' => '1F443' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿ‘…', 'iOS7' => '', 'Hex' => '1F445'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ‘„', + 'iOS7' => '', + 'Hex' => '1F444' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ‘', + 'iOS7' => '', + 'Hex' => '1F44D' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ‘Ž', + 'iOS7' => '', + 'Hex' => '1F44E' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ‘Œ', + 'iOS7' => '', + 'Hex' => '1F44C' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ‘Š', + 'iOS7' => '', + 'Hex' => '1F44A' + ), + array('iOS2' => '', 'iOS5' => 'โœŠ', 'iOS7' => '', 'Hex' => '270A'), + array( + 'iOS2' => '', + 'iOS5' => 'โœŒ', + 'iOS7' => 'โœŒ๏ธ', + 'Hex' => '270C' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ‘‹', + 'iOS7' => '', + 'Hex' => '1F44B' + ), + array('iOS2' => '', 'iOS5' => 'โœ‹', 'iOS7' => '', 'Hex' => '270B'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ‘', + 'iOS7' => '', + 'Hex' => '1F450' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ‘†', + 'iOS7' => '', + 'Hex' => '1F446' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ‘‡', + 'iOS7' => '', + 'Hex' => '1F447' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ‘‰', + 'iOS7' => '', + 'Hex' => '1F449' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ‘ˆ', + 'iOS7' => '', + 'Hex' => '1F448' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ™Œ', + 'iOS7' => '', + 'Hex' => '1F64C' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ™', + 'iOS7' => '', + 'Hex' => '1F64F' + ), + array( + 'iOS2' => '', + 'iOS5' => 'โ˜', + 'iOS7' => 'โ˜๏ธ', + 'Hex' => '261D' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ‘', + 'iOS7' => '', + 'Hex' => '1F44F' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ’ช', + 'iOS7' => '', + 'Hex' => '1F4AA' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿšถ', + 'iOS7' => '', + 'Hex' => '1F6B6' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿƒ', + 'iOS7' => '', + 'Hex' => '1F3C3' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ’ƒ', + 'iOS7' => '', + 'Hex' => '1F483' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ‘ซ', + 'iOS7' => '', + 'Hex' => '1F46B' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿ‘ช', 'iOS7' => '', 'Hex' => '1F46A'), + array('iOS2' => '', 'iOS5' => '๐Ÿ‘ฌ', 'iOS7' => '', 'Hex' => '1F46C'), + array('iOS2' => '', 'iOS5' => '๐Ÿ‘ญ', 'iOS7' => '', 'Hex' => '1F46D'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ’', + 'iOS7' => '', + 'Hex' => '1F48F' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ’‘', + 'iOS7' => '', + 'Hex' => '1F491' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ‘ฏ', + 'iOS7' => '', + 'Hex' => '1F46F' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ™†', + 'iOS7' => '', + 'Hex' => '1F646' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ™…', + 'iOS7' => '', + 'Hex' => '1F645' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ’', + 'iOS7' => '', + 'Hex' => '1F481' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿ™‹', 'iOS7' => '', 'Hex' => '1F64B'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ’†', + 'iOS7' => '', + 'Hex' => '1F486' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ’‡', + 'iOS7' => '', + 'Hex' => '1F487' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ’…', + 'iOS7' => '', + 'Hex' => '1F485' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿ‘ฐ', 'iOS7' => '', 'Hex' => '1F470'), + array('iOS2' => '', 'iOS5' => '๐Ÿ™Ž', 'iOS7' => '', 'Hex' => '1F64E'), + array('iOS2' => '', 'iOS5' => '๐Ÿ™', 'iOS7' => '', 'Hex' => '1F64D'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ™‡', + 'iOS7' => '', + 'Hex' => '1F647' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐ŸŽฉ', + 'iOS7' => '', + 'Hex' => '1F3A9' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ‘‘', + 'iOS7' => '', + 'Hex' => '1F451' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ‘’', + 'iOS7' => '', + 'Hex' => '1F452' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ‘Ÿ', + 'iOS7' => '', + 'Hex' => '1F45F' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿ‘ž', 'iOS7' => '', 'Hex' => '1F45E'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ‘ก', + 'iOS7' => '', + 'Hex' => '1F461' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ‘ ', + 'iOS7' => '', + 'Hex' => '1F460' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ‘ข', + 'iOS7' => '', + 'Hex' => '1F462' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ‘•', + 'iOS7' => '', + 'Hex' => '1F455' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ‘”', + 'iOS7' => '', + 'Hex' => '1F454' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿ‘š', 'iOS7' => '', 'Hex' => '1F45A'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ‘—', + 'iOS7' => '', + 'Hex' => '1F457' + ), + array('iOS2' => '', 'iOS5' => '๐ŸŽฝ', 'iOS7' => '', 'Hex' => '1F3BD'), + array('iOS2' => '', 'iOS5' => '๐Ÿ‘–', 'iOS7' => '', 'Hex' => '1F456'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ‘˜', + 'iOS7' => '', + 'Hex' => '1F458' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ‘™', + 'iOS7' => '', + 'Hex' => '1F459' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ’ผ', + 'iOS7' => '', + 'Hex' => '1F4BC' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ‘œ', + 'iOS7' => '', + 'Hex' => '1F45C' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿ‘', 'iOS7' => '', 'Hex' => '1F45D'), + array('iOS2' => '', 'iOS5' => '๐Ÿ‘›', 'iOS7' => '', 'Hex' => '1F45B'), + array('iOS2' => '', 'iOS5' => '๐Ÿ‘“', 'iOS7' => '', 'Hex' => '1F453'), + array( + 'iOS2' => '', + 'iOS5' => '๐ŸŽ€', + 'iOS7' => '', + 'Hex' => '1F380' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐ŸŒ‚', + 'iOS7' => '', + 'Hex' => '1F302' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ’„', + 'iOS7' => '', + 'Hex' => '1F484' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ’›', + 'iOS7' => '', + 'Hex' => '1F49B' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ’™', + 'iOS7' => '', + 'Hex' => '1F499' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ’œ', + 'iOS7' => '', + 'Hex' => '1F49C' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ’š', + 'iOS7' => '', + 'Hex' => '1F49A' + ), + array( + 'iOS2' => '', + 'iOS5' => 'โค', + 'iOS7' => 'โค๏ธ', + 'Hex' => '2764' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ’”', + 'iOS7' => '', + 'Hex' => '1F494' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ’—', + 'iOS7' => '', + 'Hex' => '1F497' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ’“', + 'iOS7' => '', + 'Hex' => '1F493' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿ’•', 'iOS7' => '', 'Hex' => '1F495'), + array('iOS2' => '', 'iOS5' => '๐Ÿ’–', 'iOS7' => '', 'Hex' => '1F496'), + array('iOS2' => '', 'iOS5' => '๐Ÿ’ž', 'iOS7' => '', 'Hex' => '1F49E'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ’˜', + 'iOS7' => '', + 'Hex' => '1F498' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿ’Œ', 'iOS7' => '', 'Hex' => '1F48C'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ’‹', + 'iOS7' => '', + 'Hex' => '1F48B' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ’', + 'iOS7' => '', + 'Hex' => '1F48D' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ’Ž', + 'iOS7' => '', + 'Hex' => '1F48E' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿ‘ค', 'iOS7' => '', 'Hex' => '1F464'), + array('iOS2' => '', 'iOS5' => '๐Ÿ‘ฅ', 'iOS7' => '', 'Hex' => '1F465'), + array('iOS2' => '', 'iOS5' => '๐Ÿ’ฌ', 'iOS7' => '', 'Hex' => '1F4AC'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ‘ฃ', + 'iOS7' => '', + 'Hex' => '1F463' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿ’ญ', 'iOS7' => '', 'Hex' => '1F4AD'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ ', + 'iOS7' => '', + 'Hex' => '1F3E0' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿก', 'iOS7' => '', 'Hex' => '1F3E1'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿซ', + 'iOS7' => '', + 'Hex' => '1F3EB' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿข', + 'iOS7' => '', + 'Hex' => '1F3E2' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿฃ', + 'iOS7' => '', + 'Hex' => '1F3E3' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿฅ', + 'iOS7' => '', + 'Hex' => '1F3E5' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿฆ', + 'iOS7' => '', + 'Hex' => '1F3E6' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿช', + 'iOS7' => '', + 'Hex' => '1F3EA' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿฉ', + 'iOS7' => '', + 'Hex' => '1F3E9' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿจ', + 'iOS7' => '', + 'Hex' => '1F3E8' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ’’', + 'iOS7' => '', + 'Hex' => '1F492' + ), + array( + 'iOS2' => '', + 'iOS5' => 'โ›ช', + 'iOS7' => 'โ›ช๏ธ', + 'Hex' => '26EA' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿฌ', + 'iOS7' => '', + 'Hex' => '1F3EC' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿค', 'iOS7' => '', 'Hex' => '1F3E4'), + array( + 'iOS2' => '', + 'iOS5' => '๐ŸŒ‡', + 'iOS7' => '', + 'Hex' => '1F307' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐ŸŒ†', + 'iOS7' => '', + 'Hex' => '1F306' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿฏ', + 'iOS7' => '', + 'Hex' => '1F3EF' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿฐ', + 'iOS7' => '', + 'Hex' => '1F3F0' + ), + array( + 'iOS2' => '', + 'iOS5' => 'โ›บ', + 'iOS7' => 'โ›บ๏ธ', + 'Hex' => '26FA' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿญ', + 'iOS7' => '', + 'Hex' => '1F3ED' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ—ผ', + 'iOS7' => '', + 'Hex' => '1F5FC' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿ—พ', 'iOS7' => '', 'Hex' => '1F5FE'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ—ป', + 'iOS7' => '', + 'Hex' => '1F5FB' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐ŸŒ„', + 'iOS7' => '', + 'Hex' => '1F304' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐ŸŒ…', + 'iOS7' => '', + 'Hex' => '1F305' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐ŸŒƒ', + 'iOS7' => '', + 'Hex' => '1F303' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ—ฝ', + 'iOS7' => '', + 'Hex' => '1F5FD' + ), + array('iOS2' => '', 'iOS5' => '๐ŸŒ‰', 'iOS7' => '', 'Hex' => '1F309'), + array('iOS2' => '', 'iOS5' => '๐ŸŽ ', 'iOS7' => '', 'Hex' => '1F3A0'), + array( + 'iOS2' => '', + 'iOS5' => '๐ŸŽก', + 'iOS7' => '', + 'Hex' => '1F3A1' + ), + array( + 'iOS2' => '', + 'iOS5' => 'โ›ฒ', + 'iOS7' => 'โ›ฒ๏ธ', + 'Hex' => '26F2' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐ŸŽข', + 'iOS7' => '', + 'Hex' => '1F3A2' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿšข', + 'iOS7' => '', + 'Hex' => '1F6A2' + ), + array( + 'iOS2' => '', + 'iOS5' => 'โ›ต', + 'iOS7' => 'โ›ต๏ธ', + 'Hex' => '26F5' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿšค', + 'iOS7' => '', + 'Hex' => '1F6A4' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿšฃ', 'iOS7' => '', 'Hex' => '1F6A3'), + array('iOS2' => '', 'iOS5' => 'โš“', 'iOS7' => 'โš“๏ธ', 'Hex' => '2693'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿš€', + 'iOS7' => '', + 'Hex' => '1F680' + ), + array( + 'iOS2' => '', + 'iOS5' => 'โœˆ', + 'iOS7' => 'โœˆ๏ธ', + 'Hex' => '2708' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ’บ', + 'iOS7' => '', + 'Hex' => '1F4BA' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿš', 'iOS7' => '', 'Hex' => '1F681'), + array('iOS2' => '', 'iOS5' => '๐Ÿš‚', 'iOS7' => '', 'Hex' => '1F682'), + array('iOS2' => '', 'iOS5' => '๐ŸšŠ', 'iOS7' => '', 'Hex' => '1F68A'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿš‰', + 'iOS7' => '', + 'Hex' => '1F689' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿšž', 'iOS7' => '', 'Hex' => '1F69E'), + array('iOS2' => '', 'iOS5' => '๐Ÿš†', 'iOS7' => '', 'Hex' => '1F686'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿš„', + 'iOS7' => '', + 'Hex' => '1F684' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿš…', + 'iOS7' => '', + 'Hex' => '1F685' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿšˆ', 'iOS7' => '', 'Hex' => '1F688'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿš‡', + 'iOS7' => '', + 'Hex' => '1F687' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿš', 'iOS7' => '', 'Hex' => '1F69D'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿš‹', + 'iOS7' => '', + 'Hex' => '1F68B' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿšƒ', 'iOS7' => '', 'Hex' => '1F683'), + array('iOS2' => '', 'iOS5' => '๐ŸšŽ', 'iOS7' => '', 'Hex' => '1F68E'), + array( + 'iOS2' => '', + 'iOS5' => '๐ŸšŒ', + 'iOS7' => '', + 'Hex' => '1F68C' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿš', 'iOS7' => '', 'Hex' => '1F68D'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿš™', + 'iOS7' => '', + 'Hex' => '1F699' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿš˜', 'iOS7' => '', 'Hex' => '1F698'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿš—', + 'iOS7' => '', + 'Hex' => '1F697' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿš•', + 'iOS7' => '', + 'Hex' => '1F695' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿš–', 'iOS7' => '', 'Hex' => '1F696'), + array('iOS2' => '', 'iOS5' => '๐Ÿš›', 'iOS7' => '', 'Hex' => '1F69B'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿšš', + 'iOS7' => '', + 'Hex' => '1F69A' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿšจ', 'iOS7' => '', 'Hex' => '1F6A8'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿš“', + 'iOS7' => '', + 'Hex' => '1F693' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿš”', 'iOS7' => '', 'Hex' => '1F694'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿš’', + 'iOS7' => '', + 'Hex' => '1F692' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿš‘', + 'iOS7' => '', + 'Hex' => '1F691' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿš', 'iOS7' => '', 'Hex' => '1F690'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿšฒ', + 'iOS7' => '', + 'Hex' => '1F6B2' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿšก', 'iOS7' => '', 'Hex' => '1F6A1'), + array('iOS2' => '', 'iOS5' => '๐ŸšŸ', 'iOS7' => '', 'Hex' => '1F69F'), + array('iOS2' => '', 'iOS5' => '๐Ÿš ', 'iOS7' => '', 'Hex' => '1F6A0'), + array('iOS2' => '', 'iOS5' => '๐Ÿšœ', 'iOS7' => '', 'Hex' => '1F69C'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ’ˆ', + 'iOS7' => '', + 'Hex' => '1F488' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿš', + 'iOS7' => '', + 'Hex' => '1F68F' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐ŸŽซ', + 'iOS7' => '', + 'Hex' => '1F3AB' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿšฆ', 'iOS7' => '', 'Hex' => '1F6A6'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿšฅ', + 'iOS7' => '', + 'Hex' => '1F6A5' + ), + array( + 'iOS2' => '', + 'iOS5' => 'โš ', + 'iOS7' => 'โš ๏ธ', + 'Hex' => '26A0' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿšง', + 'iOS7' => '', + 'Hex' => '1F6A7' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ”ฐ', + 'iOS7' => '', + 'Hex' => '1F530' + ), + array( + 'iOS2' => '', + 'iOS5' => 'โ›ฝ', + 'iOS7' => 'โ›ฝ๏ธ', + 'Hex' => '26FD' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿฎ', 'iOS7' => '', 'Hex' => '1F3EE'), + array( + 'iOS2' => '', + 'iOS5' => '๐ŸŽฐ', + 'iOS7' => '', + 'Hex' => '1F3B0' + ), + array( + 'iOS2' => '', + 'iOS5' => 'โ™จ', + 'iOS7' => 'โ™จ๏ธ', + 'Hex' => '2668' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿ—ฟ', 'iOS7' => '', 'Hex' => '1F5FF'), + array('iOS2' => '', 'iOS5' => '๐ŸŽช', 'iOS7' => '', 'Hex' => '1F3AA'), + array('iOS2' => '', 'iOS5' => '๐ŸŽญ', 'iOS7' => '', 'Hex' => '1F3AD'), + array('iOS2' => '', 'iOS5' => '๐Ÿ“', 'iOS7' => '', 'Hex' => '1F4CD'), + array('iOS2' => '', 'iOS5' => '๐Ÿšฉ', 'iOS7' => '', 'Hex' => '1F6A9'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ‡ฏ๐Ÿ‡ต', + 'iOS7' => '', + 'Hex' => '1F1EF_1F1F5' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ‡ฐ๐Ÿ‡ท', + 'iOS7' => '', + 'Hex' => '1F1F0_1F1F7' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ‡ฉ๐Ÿ‡ช', + 'iOS7' => '', + 'Hex' => '1F1E9_1F1EA' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ‡จ๐Ÿ‡ณ', + 'iOS7' => '', + 'Hex' => '1F1E8_1F1F3' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ‡บ๐Ÿ‡ธ', + 'iOS7' => '', + 'Hex' => '1F1FA_1F1F8' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ‡ซ๐Ÿ‡ท', + 'iOS7' => '', + 'Hex' => '1F1EB_1F1F7' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ‡ช๐Ÿ‡ธ', + 'iOS7' => '', + 'Hex' => '1F1EA_1F1F8' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ‡ฎ๐Ÿ‡น', + 'iOS7' => '', + 'Hex' => '1F1EE_1F1F9' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ‡ท๐Ÿ‡บ', + 'iOS7' => '', + 'Hex' => '1F1F7_1F1FA' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ‡ฌ๐Ÿ‡ง', + 'iOS7' => '', + 'Hex' => '1F1EC_1F1E7' + ), + array( + 'iOS2' => '', + 'iOS5' => '', + 'iOS7' => '', + 'Hex' => '' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿถ', + 'iOS7' => '', + 'Hex' => '1F436' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿบ', + 'iOS7' => '', + 'Hex' => '1F43A' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿฑ', + 'iOS7' => '', + 'Hex' => '1F431' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿญ', + 'iOS7' => '', + 'Hex' => '1F42D' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿน', + 'iOS7' => '', + 'Hex' => '1F439' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿฐ', + 'iOS7' => '', + 'Hex' => '1F430' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿธ', + 'iOS7' => '', + 'Hex' => '1F438' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿฏ', + 'iOS7' => '', + 'Hex' => '1F42F' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿจ', + 'iOS7' => '', + 'Hex' => '1F428' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿป', + 'iOS7' => '', + 'Hex' => '1F43B' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿท', + 'iOS7' => '', + 'Hex' => '1F437' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿฝ', 'iOS7' => '', 'Hex' => '1F43D'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿฎ', + 'iOS7' => '', + 'Hex' => '1F42E' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ—', + 'iOS7' => '', + 'Hex' => '1F417' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿต', + 'iOS7' => '', + 'Hex' => '1F435' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ’', + 'iOS7' => '', + 'Hex' => '1F412' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿด', + 'iOS7' => '', + 'Hex' => '1F434' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ‘', + 'iOS7' => '', + 'Hex' => '1F411' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ˜', + 'iOS7' => '', + 'Hex' => '1F418' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿผ', 'iOS7' => '', 'Hex' => '1F43C'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿง', + 'iOS7' => '', + 'Hex' => '1F427' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿฆ', + 'iOS7' => '', + 'Hex' => '1F426' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿค', + 'iOS7' => '', + 'Hex' => '1F424' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿฅ', 'iOS7' => '', 'Hex' => '1F425'), + array('iOS2' => '', 'iOS5' => '๐Ÿฃ', 'iOS7' => '', 'Hex' => '1F423'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ”', + 'iOS7' => '', + 'Hex' => '1F414' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ', + 'iOS7' => '', + 'Hex' => '1F40D' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿข', 'iOS7' => '', 'Hex' => '1F422'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ›', + 'iOS7' => '', + 'Hex' => '1F41B' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿ', 'iOS7' => '', 'Hex' => '1F41D'), + array('iOS2' => '', 'iOS5' => '๐Ÿœ', 'iOS7' => '', 'Hex' => '1F41C'), + array('iOS2' => '', 'iOS5' => '๐Ÿž', 'iOS7' => '', 'Hex' => '1F41E'), + array('iOS2' => '', 'iOS5' => '๐ŸŒ', 'iOS7' => '', 'Hex' => '1F40C'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ™', + 'iOS7' => '', + 'Hex' => '1F419' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿš', + 'iOS7' => '', + 'Hex' => '1F41A' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ ', + 'iOS7' => '', + 'Hex' => '1F420' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐ŸŸ', + 'iOS7' => '', + 'Hex' => '1F41F' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿฌ', + 'iOS7' => '', + 'Hex' => '1F42C' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿณ', + 'iOS7' => '', + 'Hex' => '1F433' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿ‹', 'iOS7' => '', 'Hex' => '1F40B'), + array('iOS2' => '', 'iOS5' => '๐Ÿ„', 'iOS7' => '', 'Hex' => '1F404'), + array('iOS2' => '', 'iOS5' => '๐Ÿ', 'iOS7' => '', 'Hex' => '1F40F'), + array('iOS2' => '', 'iOS5' => '๐Ÿ€', 'iOS7' => '', 'Hex' => '1F400'), + array('iOS2' => '', 'iOS5' => '๐Ÿƒ', 'iOS7' => '', 'Hex' => '1F403'), + array('iOS2' => '', 'iOS5' => '๐Ÿ…', 'iOS7' => '', 'Hex' => '1F405'), + array('iOS2' => '', 'iOS5' => '๐Ÿ‡', 'iOS7' => '', 'Hex' => '1F407'), + array('iOS2' => '', 'iOS5' => '๐Ÿ‰', 'iOS7' => '', 'Hex' => '1F409'), + array( + 'iOS2' => '', + 'iOS5' => '๐ŸŽ', + 'iOS7' => '', + 'Hex' => '1F40E' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿ', 'iOS7' => '', 'Hex' => '1F410'), + array('iOS2' => '', 'iOS5' => '๐Ÿ“', 'iOS7' => '', 'Hex' => '1F413'), + array('iOS2' => '', 'iOS5' => '๐Ÿ•', 'iOS7' => '', 'Hex' => '1F415'), + array('iOS2' => '', 'iOS5' => '๐Ÿ–', 'iOS7' => '', 'Hex' => '1F416'), + array('iOS2' => '', 'iOS5' => '๐Ÿ', 'iOS7' => '', 'Hex' => '1F401'), + array('iOS2' => '', 'iOS5' => '๐Ÿ‚', 'iOS7' => '', 'Hex' => '1F402'), + array('iOS2' => '', 'iOS5' => '๐Ÿฒ', 'iOS7' => '', 'Hex' => '1F432'), + array('iOS2' => '', 'iOS5' => '๐Ÿก', 'iOS7' => '', 'Hex' => '1F421'), + array('iOS2' => '', 'iOS5' => '๐ŸŠ', 'iOS7' => '', 'Hex' => '1F40A'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿซ', + 'iOS7' => '', + 'Hex' => '1F42B' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿช', 'iOS7' => '', 'Hex' => '1F42A'), + array('iOS2' => '', 'iOS5' => '๐Ÿ†', 'iOS7' => '', 'Hex' => '1F406'), + array('iOS2' => '', 'iOS5' => '๐Ÿˆ', 'iOS7' => '', 'Hex' => '1F408'), + array('iOS2' => '', 'iOS5' => '๐Ÿฉ', 'iOS7' => '', 'Hex' => '1F429'), + array('iOS2' => '', 'iOS5' => '๐Ÿพ', 'iOS7' => '', 'Hex' => '1F43E'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ’', + 'iOS7' => '', + 'Hex' => '1F490' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐ŸŒธ', + 'iOS7' => '', + 'Hex' => '1F338' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐ŸŒท', + 'iOS7' => '', + 'Hex' => '1F337' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ€', + 'iOS7' => '', + 'Hex' => '1F340' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐ŸŒน', + 'iOS7' => '', + 'Hex' => '1F339' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐ŸŒป', + 'iOS7' => '', + 'Hex' => '1F33B' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐ŸŒบ', + 'iOS7' => '', + 'Hex' => '1F33A' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ', + 'iOS7' => '', + 'Hex' => '1F341' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿƒ', + 'iOS7' => '', + 'Hex' => '1F343' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ‚', + 'iOS7' => '', + 'Hex' => '1F342' + ), + array('iOS2' => '', 'iOS5' => '๐ŸŒฟ', 'iOS7' => '', 'Hex' => '1F33F'), + array( + 'iOS2' => '', + 'iOS5' => '๐ŸŒพ', + 'iOS7' => '', + 'Hex' => '1F33E' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿ„', 'iOS7' => '', 'Hex' => '1F344'), + array( + 'iOS2' => '', + 'iOS5' => '๐ŸŒต', + 'iOS7' => '', + 'Hex' => '1F335' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐ŸŒด', + 'iOS7' => '', + 'Hex' => '1F334' + ), + array('iOS2' => '', 'iOS5' => '๐ŸŒฒ', 'iOS7' => '', 'Hex' => '1F332'), + array('iOS2' => '', 'iOS5' => '๐ŸŒณ', 'iOS7' => '', 'Hex' => '1F333'), + array('iOS2' => '', 'iOS5' => '๐ŸŒฐ', 'iOS7' => '', 'Hex' => '1F330'), + array('iOS2' => '', 'iOS5' => '๐ŸŒฑ', 'iOS7' => '', 'Hex' => '1F331'), + array('iOS2' => '', 'iOS5' => '๐ŸŒผ', 'iOS7' => '', 'Hex' => '1F33C'), + array('iOS2' => '', 'iOS5' => '๐ŸŒ', 'iOS7' => '', 'Hex' => '1F310'), + array('iOS2' => '', 'iOS5' => '๐ŸŒž', 'iOS7' => '', 'Hex' => '1F31E'), + array('iOS2' => '', 'iOS5' => '๐ŸŒ', 'iOS7' => '', 'Hex' => '1F31D'), + array('iOS2' => '', 'iOS5' => '๐ŸŒš', 'iOS7' => '', 'Hex' => '1F31A'), + array('iOS2' => '', 'iOS5' => '๐ŸŒ‘', 'iOS7' => '', 'Hex' => '1F311'), + array('iOS2' => '', 'iOS5' => '๐ŸŒ’', 'iOS7' => '', 'Hex' => '1F312'), + array('iOS2' => '', 'iOS5' => '๐ŸŒ“', 'iOS7' => '', 'Hex' => '1F313'), + array('iOS2' => '', 'iOS5' => '๐ŸŒ”', 'iOS7' => '', 'Hex' => '1F314'), + array('iOS2' => '', 'iOS5' => '๐ŸŒ•', 'iOS7' => '', 'Hex' => '1F315'), + array('iOS2' => '', 'iOS5' => '๐ŸŒ–', 'iOS7' => '', 'Hex' => '1F316'), + array('iOS2' => '', 'iOS5' => '๐ŸŒ—', 'iOS7' => '', 'Hex' => '1F317'), + array('iOS2' => '', 'iOS5' => '๐ŸŒ˜', 'iOS7' => '', 'Hex' => '1F318'), + array('iOS2' => '', 'iOS5' => '๐ŸŒœ', 'iOS7' => '', 'Hex' => '1F31C'), + array('iOS2' => '', 'iOS5' => '๐ŸŒ›', 'iOS7' => '', 'Hex' => '1F31B'), + array( + 'iOS2' => '', + 'iOS5' => '๐ŸŒ™', + 'iOS7' => '', + 'Hex' => '1F319' + ), + array('iOS2' => '', 'iOS5' => '๐ŸŒ', 'iOS7' => '', 'Hex' => '1F30D'), + array('iOS2' => '', 'iOS5' => '๐ŸŒŽ', 'iOS7' => '', 'Hex' => '1F30E'), + array('iOS2' => '', 'iOS5' => '๐ŸŒ', 'iOS7' => '', 'Hex' => '1F30F'), + array('iOS2' => '', 'iOS5' => '๐ŸŒ‹', 'iOS7' => '', 'Hex' => '1F30B'), + array('iOS2' => '', 'iOS5' => '๐ŸŒŒ', 'iOS7' => '', 'Hex' => '1F30C'), + array('iOS2' => '', 'iOS5' => '๐ŸŒ ', 'iOS7' => '', 'Hex' => '1F320'), + array('iOS2' => '', 'iOS5' => 'โญ', 'iOS7' => 'โญ๏ธ', 'Hex' => '2B50'), + array( + 'iOS2' => '', + 'iOS5' => 'โ˜€', + 'iOS7' => 'โ˜€๏ธ', + 'Hex' => '2600' + ), + array('iOS2' => '', 'iOS5' => 'โ›…', 'iOS7' => 'โ›…๏ธ', 'Hex' => '26C5'), + array( + 'iOS2' => '', + 'iOS5' => 'โ˜', + 'iOS7' => 'โ˜๏ธ', + 'Hex' => '2601' + ), + array( + 'iOS2' => '', + 'iOS5' => 'โšก', + 'iOS7' => 'โšก๏ธ', + 'Hex' => '26A1' + ), + array( + 'iOS2' => '', + 'iOS5' => 'โ˜”', + 'iOS7' => 'โ˜”๏ธ', + 'Hex' => '2614' + ), + array('iOS2' => '', 'iOS5' => 'โ„', 'iOS7' => 'โ„๏ธ', 'Hex' => '2744'), + array( + 'iOS2' => '', + 'iOS5' => 'โ›„', + 'iOS7' => 'โ›„๏ธ', + 'Hex' => '26C4' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐ŸŒ€', + 'iOS7' => '๐ŸŒ€', + 'Hex' => '1F300' + ), + array('iOS2' => '', 'iOS5' => '๐ŸŒ', 'iOS7' => '', 'Hex' => '1F301'), + array( + 'iOS2' => '', + 'iOS5' => '๐ŸŒˆ', + 'iOS7' => '', + 'Hex' => '1F308' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐ŸŒŠ', + 'iOS7' => '', + 'Hex' => '1F30A' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐ŸŽ', + 'iOS7' => '', + 'Hex' => '1F38D' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ’', + 'iOS7' => '', + 'Hex' => '1F49D' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐ŸŽŽ', + 'iOS7' => '', + 'Hex' => '1F38E' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐ŸŽ’', + 'iOS7' => '', + 'Hex' => '1F392' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐ŸŽ“', + 'iOS7' => '', + 'Hex' => '1F393' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐ŸŽ', + 'iOS7' => '', + 'Hex' => '1F38F' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐ŸŽ†', + 'iOS7' => '', + 'Hex' => '1F386' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐ŸŽ‡', + 'iOS7' => '', + 'Hex' => '1F387' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐ŸŽ', + 'iOS7' => '', + 'Hex' => '1F390' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐ŸŽ‘', + 'iOS7' => '', + 'Hex' => '1F391' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐ŸŽƒ', + 'iOS7' => '', + 'Hex' => '1F383' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ‘ป', + 'iOS7' => '', + 'Hex' => '1F47B' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐ŸŽ…', + 'iOS7' => '', + 'Hex' => '1F385' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐ŸŽ„', + 'iOS7' => '', + 'Hex' => '1F384' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐ŸŽ', + 'iOS7' => '', + 'Hex' => '1F381' + ), + array('iOS2' => '', 'iOS5' => '๐ŸŽ‹', 'iOS7' => '', 'Hex' => '1F38B'), + array( + 'iOS2' => '', + 'iOS5' => '๐ŸŽ‰', + 'iOS7' => '', + 'Hex' => '1F389' + ), + array('iOS2' => '', 'iOS5' => '๐ŸŽŠ', 'iOS7' => '', 'Hex' => '1F38A'), + array( + 'iOS2' => '', + 'iOS5' => '๐ŸŽˆ', + 'iOS7' => '', + 'Hex' => '1F388' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐ŸŽŒ', + 'iOS7' => '', + 'Hex' => '1F38C' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿ”ฎ', 'iOS7' => '', 'Hex' => '1F52E'), + array( + 'iOS2' => '', + 'iOS5' => '๐ŸŽฅ', + 'iOS7' => '', + 'Hex' => '1F3A5' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ“ท', + 'iOS7' => '', + 'Hex' => '1F4F7' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿ“น', 'iOS7' => '', 'Hex' => '1F4F9'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ“ผ', + 'iOS7' => '', + 'Hex' => '1F4FC' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ’ฟ', + 'iOS7' => '', + 'Hex' => '1F4BF' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ“€', + 'iOS7' => '', + 'Hex' => '1F4C0' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ’ฝ', + 'iOS7' => '', + 'Hex' => '1F4BD' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿ’พ', 'iOS7' => '', 'Hex' => '1F4BE'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ’ป', + 'iOS7' => '', + 'Hex' => '1F4BB' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ“ฑ', + 'iOS7' => '', + 'Hex' => '1F4F1' + ), + array( + 'iOS2' => '', + 'iOS5' => 'โ˜Ž', + 'iOS7' => 'โ˜Ž๏ธ', + 'Hex' => '260E' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿ“ž', 'iOS7' => '', 'Hex' => '1F4DE'), + array('iOS2' => '', 'iOS5' => '๐Ÿ“Ÿ', 'iOS7' => '', 'Hex' => '1F4DF'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ“ ', + 'iOS7' => '', + 'Hex' => '1F4E0' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ“ก', + 'iOS7' => '', + 'Hex' => '1F4E1' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ“บ', + 'iOS7' => '', + 'Hex' => '1F4FA' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ“ป', + 'iOS7' => '', + 'Hex' => '1F4FB' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿ”Š', 'iOS7' => '', 'Hex' => '1F50A'), + array('iOS2' => '', 'iOS5' => '๐Ÿ”‰', 'iOS7' => '', 'Hex' => '1F509'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ”ˆ', + 'iOS7' => '', + 'Hex' => '1F508' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿ”‡', 'iOS7' => '', 'Hex' => '1F507'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ””', + 'iOS7' => '', + 'Hex' => '1F514' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿ”•', 'iOS7' => '', 'Hex' => '1F515'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ“ข', + 'iOS7' => '', + 'Hex' => '1F4E2' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ“ฃ', + 'iOS7' => '', + 'Hex' => '1F4E3' + ), + array('iOS2' => '', 'iOS5' => 'โณ', 'iOS7' => '', 'Hex' => '23F3'), + array('iOS2' => '', 'iOS5' => 'โŒ›', 'iOS7' => 'โŒ›๏ธ', 'Hex' => '231B'), + array('iOS2' => '', 'iOS5' => 'โฐ', 'iOS7' => 'โฐ', 'Hex' => '23F0'), + array('iOS2' => '', 'iOS5' => 'โŒš', 'iOS7' => 'โŒš๏ธ', 'Hex' => '231A'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ”“', + 'iOS7' => '', + 'Hex' => '1F513' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ”’', + 'iOS7' => '', + 'Hex' => '1F512' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿ”', 'iOS7' => '', 'Hex' => '1F50F'), + array('iOS2' => '', 'iOS5' => '๐Ÿ”', 'iOS7' => '', 'Hex' => '1F510'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ”‘', + 'iOS7' => '', + 'Hex' => '1F511' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿ”Ž', 'iOS7' => '', 'Hex' => '1F50E'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ’ก', + 'iOS7' => '', + 'Hex' => '1F4A1' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿ”ฆ', 'iOS7' => '', 'Hex' => '1F526'), + array('iOS2' => '', 'iOS5' => '๐Ÿ”†', 'iOS7' => '', 'Hex' => '1F506'), + array('iOS2' => '', 'iOS5' => '๐Ÿ”…', 'iOS7' => '', 'Hex' => '1F505'), + array('iOS2' => '', 'iOS5' => '๐Ÿ”Œ', 'iOS7' => '', 'Hex' => '1F50C'), + array('iOS2' => '', 'iOS5' => '๐Ÿ”‹', 'iOS7' => '', 'Hex' => '1F50B'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ”', + 'iOS7' => '', + 'Hex' => '1F50D' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿ›', 'iOS7' => '', 'Hex' => '1F6C1'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ›€', + 'iOS7' => '', + 'Hex' => '1F6C0' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿšฟ', 'iOS7' => '', 'Hex' => '1F6BF'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿšฝ', + 'iOS7' => '', + 'Hex' => '1F6BD' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿ”ง', 'iOS7' => '', 'Hex' => '1F527'), + array('iOS2' => '', 'iOS5' => '๐Ÿ”ฉ', 'iOS7' => '', 'Hex' => '1F529'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ”จ', + 'iOS7' => '', + 'Hex' => '1F528' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿšช', 'iOS7' => '', 'Hex' => '1F6AA'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿšฌ', + 'iOS7' => '', + 'Hex' => '1F6AC' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ’ฃ', + 'iOS7' => '', + 'Hex' => '1F4A3' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ”ซ', + 'iOS7' => '', + 'Hex' => '1F52B' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿ”ช', 'iOS7' => '', 'Hex' => '1F52A'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ’Š', + 'iOS7' => '', + 'Hex' => '1F48A' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ’‰', + 'iOS7' => '', + 'Hex' => '1F489' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ’ฐ', + 'iOS7' => '', + 'Hex' => '1F4B0' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿ’ด', 'iOS7' => '', 'Hex' => '1F4B4'), + array('iOS2' => '', 'iOS5' => '๐Ÿ’ต', 'iOS7' => '', 'Hex' => '1F4B5'), + array('iOS2' => '', 'iOS5' => '๐Ÿ’ท', 'iOS7' => '', 'Hex' => '1F4B7'), + array('iOS2' => '', 'iOS5' => '๐Ÿ’ถ', 'iOS7' => '', 'Hex' => '1F4B6'), + array('iOS2' => '', 'iOS5' => '๐Ÿ’ณ', 'iOS7' => '', 'Hex' => '1F4B3'), + array('iOS2' => '', 'iOS5' => '๐Ÿ’ธ', 'iOS7' => '', 'Hex' => '1F4B8'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ“ฒ', + 'iOS7' => '', + 'Hex' => '1F4F2' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿ“ง', 'iOS7' => '', 'Hex' => '1F4E7'), + array('iOS2' => '', 'iOS5' => '๐Ÿ“ฅ', 'iOS7' => '', 'Hex' => '1F4E5'), + array('iOS2' => '', 'iOS5' => '๐Ÿ“ค', 'iOS7' => '', 'Hex' => '1F4E4'), + array('iOS2' => '', 'iOS5' => 'โœ‰', 'iOS7' => 'โœ‰๏ธ', 'Hex' => '2709'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ“ฉ', + 'iOS7' => '', + 'Hex' => '1F4E9' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿ“จ', 'iOS7' => '', 'Hex' => '1F4E8'), + array('iOS2' => '', 'iOS5' => '๐Ÿ“ฏ', 'iOS7' => '', 'Hex' => '1F4EF'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ“ซ', + 'iOS7' => '', + 'Hex' => '1F4EB' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿ“ช', 'iOS7' => '', 'Hex' => '1F4EA'), + array('iOS2' => '', 'iOS5' => '๐Ÿ“ฌ', 'iOS7' => '', 'Hex' => '1F4EC'), + array('iOS2' => '', 'iOS5' => '๐Ÿ“ญ', 'iOS7' => '', 'Hex' => '1F4ED'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ“ฎ', + 'iOS7' => '', + 'Hex' => '1F4EE' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿ“ฆ', 'iOS7' => '', 'Hex' => '1F4E6'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ“', + 'iOS7' => '', + 'Hex' => '1F4DD' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿ“„', 'iOS7' => '', 'Hex' => '1F4C4'), + array('iOS2' => '', 'iOS5' => '๐Ÿ“ƒ', 'iOS7' => '', 'Hex' => '1F4C3'), + array('iOS2' => '', 'iOS5' => '๐Ÿ“‘', 'iOS7' => '', 'Hex' => '1F4D1'), + array('iOS2' => '', 'iOS5' => '๐Ÿ“Š', 'iOS7' => '', 'Hex' => '1F4CA'), + array('iOS2' => '', 'iOS5' => '๐Ÿ“ˆ', 'iOS7' => '', 'Hex' => '1F4C8'), + array('iOS2' => '', 'iOS5' => '๐Ÿ“‰', 'iOS7' => '', 'Hex' => '1F4C9'), + array('iOS2' => '', 'iOS5' => '๐Ÿ“œ', 'iOS7' => '', 'Hex' => '1F4DC'), + array('iOS2' => '', 'iOS5' => '๐Ÿ“‹', 'iOS7' => '', 'Hex' => '1F4CB'), + array('iOS2' => '', 'iOS5' => '๐Ÿ“…', 'iOS7' => '', 'Hex' => '1F4C5'), + array('iOS2' => '', 'iOS5' => '๐Ÿ“†', 'iOS7' => '', 'Hex' => '1F4C6'), + array('iOS2' => '', 'iOS5' => '๐Ÿ“‡', 'iOS7' => '', 'Hex' => '1F4C7'), + array('iOS2' => '', 'iOS5' => '๐Ÿ“', 'iOS7' => '', 'Hex' => '1F4C1'), + array('iOS2' => '', 'iOS5' => '๐Ÿ“‚', 'iOS7' => '', 'Hex' => '1F4C2'), + array( + 'iOS2' => '', + 'iOS5' => 'โœ‚', + 'iOS7' => 'โœ‚๏ธ', + 'Hex' => '2702' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿ“Œ', 'iOS7' => '', 'Hex' => '1F4CC'), + array('iOS2' => '', 'iOS5' => '๐Ÿ“Ž', 'iOS7' => '', 'Hex' => '1F4CE'), + array('iOS2' => '', 'iOS5' => 'โœ’', 'iOS7' => 'โœ’๏ธ', 'Hex' => '2712'), + array('iOS2' => '', 'iOS5' => 'โœ', 'iOS7' => 'โœ๏ธ', 'Hex' => '270F'), + array('iOS2' => '', 'iOS5' => '๐Ÿ“', 'iOS7' => '', 'Hex' => '1F4CF'), + array('iOS2' => '', 'iOS5' => '๐Ÿ“', 'iOS7' => '', 'Hex' => '1F4D0'), + array('iOS2' => '', 'iOS5' => '๐Ÿ“•', 'iOS7' => '', 'Hex' => '1F4D5'), + array('iOS2' => '', 'iOS5' => '๐Ÿ“—', 'iOS7' => '', 'Hex' => '1F4D7'), + array('iOS2' => '', 'iOS5' => '๐Ÿ“˜', 'iOS7' => '', 'Hex' => '1F4D8'), + array('iOS2' => '', 'iOS5' => '๐Ÿ“™', 'iOS7' => '', 'Hex' => '1F4D9'), + array('iOS2' => '', 'iOS5' => '๐Ÿ““', 'iOS7' => '', 'Hex' => '1F4D3'), + array('iOS2' => '', 'iOS5' => '๐Ÿ“”', 'iOS7' => '', 'Hex' => '1F4D4'), + array('iOS2' => '', 'iOS5' => '๐Ÿ“’', 'iOS7' => '', 'Hex' => '1F4D2'), + array('iOS2' => '', 'iOS5' => '๐Ÿ“š', 'iOS7' => '', 'Hex' => '1F4DA'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ“–', + 'iOS7' => '', + 'Hex' => '1F4D6' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿ”–', 'iOS7' => '', 'Hex' => '1F516'), + array('iOS2' => '', 'iOS5' => '๐Ÿ“›', 'iOS7' => '', 'Hex' => '1F4DB'), + array('iOS2' => '', 'iOS5' => '๐Ÿ”ฌ', 'iOS7' => '', 'Hex' => '1F52C'), + array('iOS2' => '', 'iOS5' => '๐Ÿ”ญ', 'iOS7' => '', 'Hex' => '1F52D'), + array('iOS2' => '', 'iOS5' => '๐Ÿ“ฐ', 'iOS7' => '', 'Hex' => '1F4F0'), + array( + 'iOS2' => '', + 'iOS5' => '๐ŸŽจ', + 'iOS7' => '', + 'Hex' => '1F3A8' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐ŸŽฌ', + 'iOS7' => '', + 'Hex' => '1F3AC' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐ŸŽค', + 'iOS7' => '', + 'Hex' => '1F3A4' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐ŸŽง', + 'iOS7' => '', + 'Hex' => '1F3A7' + ), + array('iOS2' => '', 'iOS5' => '๐ŸŽผ', 'iOS7' => '', 'Hex' => '1F3BC'), + array( + 'iOS2' => '', + 'iOS5' => '๐ŸŽต', + 'iOS7' => '', + 'Hex' => '1F3B5' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐ŸŽถ', + 'iOS7' => '', + 'Hex' => '1F3B6' + ), + array('iOS2' => '', 'iOS5' => '๐ŸŽน', 'iOS7' => '', 'Hex' => '1F3B9'), + array('iOS2' => '', 'iOS5' => '๐ŸŽป', 'iOS7' => '', 'Hex' => '1F3BB'), + array( + 'iOS2' => '', + 'iOS5' => '๐ŸŽบ', + 'iOS7' => '', + 'Hex' => '1F3BA' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐ŸŽท', + 'iOS7' => '', + 'Hex' => '1F3B7' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐ŸŽธ', + 'iOS7' => '', + 'Hex' => '1F3B8' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ‘พ', + 'iOS7' => '', + 'Hex' => '1F47E' + ), + array('iOS2' => '', 'iOS5' => '๐ŸŽฎ', 'iOS7' => '', 'Hex' => '1F3AE'), + array('iOS2' => '', 'iOS5' => '๐Ÿƒ', 'iOS7' => '', 'Hex' => '1F0CF'), + array('iOS2' => '', 'iOS5' => '๐ŸŽด', 'iOS7' => '', 'Hex' => '1F3B4'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ€„', + 'iOS7' => '๐Ÿ€„๏ธ', + 'Hex' => '1F004' + ), + array('iOS2' => '', 'iOS5' => '๐ŸŽฒ', 'iOS7' => '', 'Hex' => '1F3B2'), + array( + 'iOS2' => '', + 'iOS5' => '๐ŸŽฏ', + 'iOS7' => '', + 'Hex' => '1F3AF' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿˆ', + 'iOS7' => '', + 'Hex' => '1F3C8' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ€', + 'iOS7' => '', + 'Hex' => '1F3C0' + ), + array( + 'iOS2' => '', + 'iOS5' => 'โšฝ', + 'iOS7' => 'โšฝ๏ธ', + 'Hex' => '26BD' + ), + array( + 'iOS2' => '', + 'iOS5' => 'โšพ', + 'iOS7' => 'โšพ๏ธ', + 'Hex' => '26BE' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐ŸŽพ', + 'iOS7' => '', + 'Hex' => '1F3BE' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐ŸŽฑ', + 'iOS7' => '', + 'Hex' => '1F3B1' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿ‰', 'iOS7' => '', 'Hex' => '1F3C9'), + array('iOS2' => '', 'iOS5' => '๐ŸŽณ', 'iOS7' => '', 'Hex' => '1F3B3'), + array( + 'iOS2' => '', + 'iOS5' => 'โ›ณ', + 'iOS7' => 'โ›ณ๏ธ', + 'Hex' => '26F3' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿšต', 'iOS7' => '', 'Hex' => '1F6B5'), + array('iOS2' => '', 'iOS5' => '๐Ÿšด', 'iOS7' => '', 'Hex' => '1F6B4'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ', + 'iOS7' => '', + 'Hex' => '1F3C1' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿ‡', 'iOS7' => '', 'Hex' => '1F3C7'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ†', + 'iOS7' => '', + 'Hex' => '1F3C6' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐ŸŽฟ', + 'iOS7' => '', + 'Hex' => '1F3BF' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿ‚', 'iOS7' => '', 'Hex' => '1F3C2'), + array( + 'iOS2' => '', + 'iOS5' => '๐ŸŠ', + 'iOS7' => '', + 'Hex' => '1F3CA' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ„', + 'iOS7' => '', + 'Hex' => '1F3C4' + ), + array('iOS2' => '', 'iOS5' => '๐ŸŽฃ', 'iOS7' => '', 'Hex' => '1F3A3'), + array( + 'iOS2' => '', + 'iOS5' => 'โ˜•', + 'iOS7' => 'โ˜•๏ธ', + 'Hex' => '2615' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿต', + 'iOS7' => '', + 'Hex' => '1F375' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿถ', + 'iOS7' => '', + 'Hex' => '1F376' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿผ', 'iOS7' => '', 'Hex' => '1F37C'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿบ', + 'iOS7' => '', + 'Hex' => '1F37A' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿป', + 'iOS7' => '', + 'Hex' => '1F37B' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿธ', + 'iOS7' => '', + 'Hex' => '1F378' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿน', 'iOS7' => '', 'Hex' => '1F379'), + array('iOS2' => '', 'iOS5' => '๐Ÿท', 'iOS7' => '', 'Hex' => '1F377'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿด', + 'iOS7' => '', + 'Hex' => '1F374' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿ•', 'iOS7' => '', 'Hex' => '1F355'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ”', + 'iOS7' => '', + 'Hex' => '1F354' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐ŸŸ', + 'iOS7' => '', + 'Hex' => '1F35F' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿ—', 'iOS7' => '', 'Hex' => '1F357'), + array('iOS2' => '', 'iOS5' => '๐Ÿ–', 'iOS7' => '', 'Hex' => '1F356'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ', + 'iOS7' => '', + 'Hex' => '1F35D' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ›', + 'iOS7' => '', + 'Hex' => '1F35B' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿค', 'iOS7' => '', 'Hex' => '1F364'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿฑ', + 'iOS7' => '', + 'Hex' => '1F371' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿฃ', + 'iOS7' => '', + 'Hex' => '1F363' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿฅ', 'iOS7' => '', 'Hex' => '1F365'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ™', + 'iOS7' => '', + 'Hex' => '1F359' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ˜', + 'iOS7' => '', + 'Hex' => '1F358' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿš', + 'iOS7' => '', + 'Hex' => '1F35A' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿœ', + 'iOS7' => '', + 'Hex' => '1F35C' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿฒ', + 'iOS7' => '', + 'Hex' => '1F372' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿข', + 'iOS7' => '', + 'Hex' => '1F362' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿก', + 'iOS7' => '', + 'Hex' => '1F361' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿณ', + 'iOS7' => '', + 'Hex' => '1F373' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿž', + 'iOS7' => '', + 'Hex' => '1F35E' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿฉ', 'iOS7' => '', 'Hex' => '1F369'), + array('iOS2' => '', 'iOS5' => '๐Ÿฎ', 'iOS7' => '', 'Hex' => '1F36E'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿฆ', + 'iOS7' => '', + 'Hex' => '1F366' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿจ', 'iOS7' => '', 'Hex' => '1F368'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿง', + 'iOS7' => '', + 'Hex' => '1F367' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐ŸŽ‚', + 'iOS7' => '', + 'Hex' => '1F382' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿฐ', + 'iOS7' => '', + 'Hex' => '1F370' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿช', 'iOS7' => '', 'Hex' => '1F36A'), + array('iOS2' => '', 'iOS5' => '๐Ÿซ', 'iOS7' => '', 'Hex' => '1F36B'), + array('iOS2' => '', 'iOS5' => '๐Ÿฌ', 'iOS7' => '', 'Hex' => '1F36C'), + array('iOS2' => '', 'iOS5' => '๐Ÿญ', 'iOS7' => '', 'Hex' => '1F36D'), + array('iOS2' => '', 'iOS5' => '๐Ÿฏ', 'iOS7' => '', 'Hex' => '1F36F'), + array( + 'iOS2' => '', + 'iOS5' => '๐ŸŽ', + 'iOS7' => '', + 'Hex' => '1F34E' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿ', 'iOS7' => '', 'Hex' => '1F34F'), + array( + 'iOS2' => '', + 'iOS5' => '๐ŸŠ', + 'iOS7' => '', + 'Hex' => '1F34A' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿ‹', 'iOS7' => '', 'Hex' => '1F34B'), + array('iOS2' => '', 'iOS5' => '๐Ÿ’', 'iOS7' => '', 'Hex' => '1F352'), + array('iOS2' => '', 'iOS5' => '๐Ÿ‡', 'iOS7' => '', 'Hex' => '1F347'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ‰', + 'iOS7' => '', + 'Hex' => '1F349' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ“', + 'iOS7' => '', + 'Hex' => '1F353' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿ‘', 'iOS7' => '', 'Hex' => '1F351'), + array('iOS2' => '', 'iOS5' => '๐Ÿˆ', 'iOS7' => '', 'Hex' => '1F348'), + array('iOS2' => '', 'iOS5' => '๐ŸŒ', 'iOS7' => '', 'Hex' => '1F34C'), + array('iOS2' => '', 'iOS5' => '๐Ÿ', 'iOS7' => '', 'Hex' => '1F350'), + array('iOS2' => '', 'iOS5' => '๐Ÿ', 'iOS7' => '', 'Hex' => '1F34D'), + array('iOS2' => '', 'iOS5' => '๐Ÿ ', 'iOS7' => '', 'Hex' => '1F360'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ†', + 'iOS7' => '', + 'Hex' => '1F346' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ…', + 'iOS7' => '', + 'Hex' => '1F345' + ), + array('iOS2' => '', 'iOS5' => '๐ŸŒฝ', 'iOS7' => '', 'Hex' => '1F33D'), + array( + 'iOS2' => '', + 'iOS5' => '1โƒฃ', + 'iOS7' => '', + 'Hex' => '0031_20E3' + ), + array( + 'iOS2' => '', + 'iOS5' => '2โƒฃ', + 'iOS7' => '', + 'Hex' => '0032_20E3' + ), + array( + 'iOS2' => '', + 'iOS5' => '3โƒฃ', + 'iOS7' => '', + 'Heex' => '0034_20E3' + ), + array( + 'iOS2' => '', + 'iOS5' => '2โƒฃ', + 'iOS7' => '', + 'Hex' => '0032_20E3' + ), + array( + 'iOS2' => '', + 'iOS5' => '0โƒฃ', + 'iOS7' => '', + 'Hex' => '0030_20E3' + ), + array( + 'iOS2' => '', + 'iOS5' => '5โƒฃ', + 'iOS7' => '', + 'Hex' => '0035_20E3' + ), + array( + 'iOS2' => '', + 'iOS5' => '6โƒฃ', + 'iOS7' => '', + 'Hex' => '0036_20E3' + ), + array( + 'iOS2' => '', + 'iOS5' => '7โƒฃ', + 'iOS7' => '', + 'Hex' => '0037_20E3' + ), + array( + 'iOS2' => '', + 'iOS5' => '8โƒฃ', + 'iOS7' => '', + 'Hex' => '0038_20E3' + ), + array( + 'iOS2' => '', + 'iOS5' => '9โƒฃ', + 'iOS7' => '', + 'Hex' => '0039_20E3' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿ”Ÿ', 'iOS7' => '', 'Hex' => '1F51F'), + array('iOS2' => '', 'iOS5' => '๐Ÿ”ข', 'iOS7' => '', 'Hex' => '1F522'), + array( + 'iOS2' => '', + 'iOS5' => '#โƒฃ', + 'iOS7' => '', + 'Hex' => '0023_20E3' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿ”ฃ', 'iOS7' => '', 'Hex' => '1F523'), + array( + 'iOS2' => '', + 'iOS5' => 'โฌ†', + 'iOS7' => 'โฌ†๏ธ', + 'Hex' => '2B06' + ), + array( + 'iOS2' => '', + 'iOS5' => 'โฌ‡', + 'iOS7' => 'โฌ‡๏ธ', + 'Hex' => '2B07' + ), + array( + 'iOS2' => '', + 'iOS5' => 'โฌ…', + 'iOS7' => 'โฌ…๏ธ', + 'Hex' => '2B05' + ), + array( + 'iOS2' => '', + 'iOS5' => 'โžก', + 'iOS7' => 'โžก๏ธ', + 'Hex' => '27A1' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿ” ', 'iOS7' => '', 'Hex' => '1F520'), + array('iOS2' => '', 'iOS5' => '๐Ÿ”ก', 'iOS7' => '', 'Hex' => '1F521'), + array('iOS2' => '', 'iOS5' => '๐Ÿ”ค', 'iOS7' => '', 'Hex' => '1F524'), + array( + 'iOS2' => '', + 'iOS5' => 'โ†—', + 'iOS7' => 'โ†—๏ธ', + 'Hex' => '2197' + ), + array( + 'iOS2' => '', + 'iOS5' => 'โ†–', + 'iOS7' => 'โ†–๏ธ', + 'Hex' => '2196' + ), + array( + 'iOS2' => '', + 'iOS5' => 'โ†˜', + 'iOS7' => 'โ†˜๏ธ', + 'Hex' => '2198' + ), + array( + 'iOS2' => '', + 'iOS5' => 'โ†™', + 'iOS7' => 'โ†™๏ธ', + 'Hex' => '2199' + ), + array('iOS2' => '', 'iOS5' => 'โ†”', 'iOS7' => 'โ†”๏ธ', 'Hex' => '2194'), + array('iOS2' => '', 'iOS5' => 'โ†•', 'iOS7' => 'โ†•๏ธ', 'Hex' => '2195'), + array('iOS2' => '', 'iOS5' => '๐Ÿ”„', 'iOS7' => '', 'Hex' => '1F504'), + array( + 'iOS2' => '', + 'iOS5' => 'โ—€', + 'iOS7' => 'โ—€๏ธ', + 'Hex' => '25C0' + ), + array( + 'iOS2' => '', + 'iOS5' => 'โ–ถ', + 'iOS7' => 'โ–ถ๏ธ', + 'Hex' => '25B6' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿ”ผ', 'iOS7' => '', 'Hex' => '1F53C'), + array('iOS2' => '', 'iOS5' => '๐Ÿ”ฝ', 'iOS7' => '', 'Hex' => '1F53D'), + array('iOS2' => '', 'iOS5' => 'โ†ฉ', 'iOS7' => 'โ†ฉ๏ธ', 'Hex' => '21A9'), + array('iOS2' => '', 'iOS5' => 'โ†ช', 'iOS7' => 'โ†ช๏ธ', 'Hex' => '21AA'), + array('iOS2' => '', 'iOS5' => 'โ„น', 'iOS7' => 'โ„น๏ธ', 'Hex' => '2139'), + array('iOS2' => '', 'iOS5' => 'โช', 'iOS7' => '', 'Hex' => '23EA'), + array('iOS2' => '', 'iOS5' => 'โฉ', 'iOS7' => '', 'Hex' => '23E9'), + array('iOS2' => '', 'iOS5' => 'โซ', 'iOS7' => '', 'Hex' => '23EB'), + array('iOS2' => '', 'iOS5' => 'โฌ', 'iOS7' => '', 'Hex' => '23EC'), + array('iOS2' => '', 'iOS5' => 'โคต', 'iOS7' => 'โคต๏ธ', 'Hex' => '2935'), + array('iOS2' => '', 'iOS5' => 'โคด', 'iOS7' => 'โคด๏ธ', 'Hex' => '2934'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ†—', + 'iOS7' => '', + 'Hex' => '1F197' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿ”€', 'iOS7' => '', 'Hex' => '1F500'), + array('iOS2' => '', 'iOS5' => '๐Ÿ”', 'iOS7' => '', 'Hex' => '1F501'), + array('iOS2' => '', 'iOS5' => '๐Ÿ”‚', 'iOS7' => '', 'Hex' => '1F502'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ†•', + 'iOS7' => '', + 'Hex' => '1F195' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ†™', + 'iOS7' => '', + 'Hex' => '1F199' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ†’', + 'iOS7' => '', + 'Hex' => '1F192' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿ†“', 'iOS7' => '', 'Hex' => '1F193'), + array('iOS2' => '', 'iOS5' => '๐Ÿ†–', 'iOS7' => '', 'Hex' => '1F196'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ“ถ', + 'iOS7' => '', + 'Hex' => '1F4F6' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐ŸŽฆ', + 'iOS7' => '', + 'Hex' => '1F3A6' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿˆ', + 'iOS7' => '', + 'Hex' => '1F201' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿˆฏ', + 'iOS7' => '๐Ÿˆฏ๏ธ', + 'Hex' => '1F22F' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿˆณ', + 'iOS7' => '', + 'Hex' => '1F233' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿˆต', + 'iOS7' => '', + 'Hex' => '1F235' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿˆด', 'iOS7' => '', 'Hex' => '1F234'), + array('iOS2' => '', 'iOS5' => '๐Ÿˆฒ', 'iOS7' => '', 'Hex' => '1F232'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ‰', + 'iOS7' => '', + 'Hex' => '1F250' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿˆน', + 'iOS7' => '', + 'Hex' => '1F239' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿˆบ', + 'iOS7' => '', + 'Hex' => '1F23A' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿˆถ', + 'iOS7' => '', + 'Hex' => '1F236' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿˆš', + 'iOS7' => '๐Ÿˆš๏ธ', + 'Hex' => '1F21A' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿšป', + 'iOS7' => '', + 'Hex' => '1F6BB' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿšน', + 'iOS7' => '', + 'Hex' => '1F6B9' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿšบ', + 'iOS7' => '', + 'Hex' => '1F6BA' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿšผ', + 'iOS7' => '', + 'Hex' => '1F6BC' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿšพ', + 'iOS7' => '', + 'Hex' => '1F6BE' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿšฐ', 'iOS7' => '', 'Hex' => '1F6B0'), + array('iOS2' => '', 'iOS5' => '๐Ÿšฎ', 'iOS7' => '', 'Hex' => '1F6AE'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ…ฟ', + 'iOS7' => '๐Ÿ…ฟ๏ธ', + 'Hex' => '1F17F' + ), + array( + 'iOS2' => '', + 'iOS5' => 'โ™ฟ', + 'iOS7' => 'โ™ฟ๏ธ', + 'Hex' => '267F' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿšญ', + 'iOS7' => '', + 'Hex' => '1F6AD' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿˆท', + 'iOS7' => '', + 'Hex' => '1F237' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿˆธ', + 'iOS7' => '', + 'Hex' => '1F238' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿˆ‚', + 'iOS7' => '', + 'Hex' => '1F202' + ), + array('iOS2' => '', 'iOS5' => 'โ“‚', 'iOS7' => 'โ“‚๏ธ', 'Hex' => '24C2'), + array('iOS2' => '', 'iOS5' => '๐Ÿ›‚', 'iOS7' => '', 'Hex' => '1F6C2'), + array('iOS2' => '', 'iOS5' => '๐Ÿ›„', 'iOS7' => '', 'Hex' => '1F6C4'), + array('iOS2' => '', 'iOS5' => '๐Ÿ›…', 'iOS7' => '', 'Hex' => '1F6C5'), + array('iOS2' => '', 'iOS5' => '๐Ÿ›ƒ', 'iOS7' => '', 'Hex' => '1F6C3'), + array('iOS2' => '', 'iOS5' => '๐Ÿ‰‘', 'iOS7' => '', 'Hex' => '1F251'), + array( + 'iOS2' => '', + 'iOS5' => 'ใŠ™', + 'iOS7' => 'ใŠ™๏ธ', + 'Hex' => '3299' + ), + array( + 'iOS2' => '', + 'iOS5' => 'ใŠ—', + 'iOS7' => 'ใŠ—๏ธ', + 'Hex' => '3297' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿ†‘', 'iOS7' => '', 'Hex' => '1F191'), + array('iOS2' => '', 'iOS5' => '๐Ÿ†˜', 'iOS7' => '', 'Hex' => '1F198'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ†”', + 'iOS7' => '', + 'Hex' => '1F194' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿšซ', 'iOS7' => '', 'Hex' => '1F6AB'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ”ž', + 'iOS7' => '', + 'Hex' => '1F51E' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿ“ต', 'iOS7' => '', 'Hex' => '1F4F5'), + array('iOS2' => '', 'iOS5' => '๐Ÿšฏ', 'iOS7' => '', 'Hex' => '1F6AF'), + array('iOS2' => '', 'iOS5' => '๐Ÿšฑ', 'iOS7' => '', 'Hex' => '1F6B1'), + array('iOS2' => '', 'iOS5' => '๐Ÿšณ', 'iOS7' => '', 'Hex' => '1F6B3'), + array('iOS2' => '', 'iOS5' => '๐Ÿšท', 'iOS7' => '', 'Hex' => '1F6B7'), + array('iOS2' => '', 'iOS5' => '๐Ÿšธ', 'iOS7' => '', 'Hex' => '1F6B8'), + array('iOS2' => '', 'iOS5' => 'โ›”', 'iOS7' => 'โ›”๏ธ', 'Hex' => '26D4'), + array( + 'iOS2' => '', + 'iOS5' => 'โœณ', + 'iOS7' => 'โœณ๏ธ', + 'Hex' => '2733' + ), + array('iOS2' => '', 'iOS5' => 'โ‡', 'iOS7' => 'โ‡๏ธ', 'Hex' => '2747'), + array('iOS2' => '', 'iOS5' => 'โŽ', 'iOS7' => '', 'Hex' => '274E'), + array('iOS2' => '', 'iOS5' => 'โœ…', 'iOS7' => '', 'Hex' => '2705'), + array( + 'iOS2' => '', + 'iOS5' => 'โœด', + 'iOS7' => 'โœด๏ธ', + 'Hex' => '2734' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ’Ÿ', + 'iOS7' => '', + 'Hex' => '1F49F' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ†š', + 'iOS7' => '', + 'Hex' => '1F19A' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ“ณ', + 'iOS7' => '', + 'Hex' => '1F4F3' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ“ด', + 'iOS7' => '', + 'Hex' => '1F4F4' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ…ฐ', + 'iOS7' => '', + 'Hex' => '1F170' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ…ฑ', + 'iOS7' => '', + 'Hex' => '1F171' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ†Ž', + 'iOS7' => '', + 'Hex' => '1F18E' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ…พ', + 'iOS7' => '', + 'Hex' => '1F17E' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿ’ ', 'iOS7' => '', 'Hex' => '1F4A0'), + array('iOS2' => '', 'iOS5' => 'โžฟ', 'iOS7' => '', 'Hex' => '27BF'), + array('iOS2' => '', 'iOS5' => 'โ™ป', 'iOS7' => 'โ™ป๏ธ', 'Hex' => '267B'), + array( + 'iOS2' => '', + 'iOS5' => 'โ™ˆ', + 'iOS7' => 'โ™ˆ๏ธ', + 'Hex' => '2648' + ), + array( + 'iOS2' => '', + 'iOS5' => 'โ™‰', + 'iOS7' => 'โ™‰๏ธ', + 'Hex' => '2649' + ), + array( + 'iOS2' => '', + 'iOS5' => 'โ™Š', + 'iOS7' => 'โ™Š๏ธ', + 'Hex' => '264A' + ), + array( + 'iOS2' => '', + 'iOS5' => 'โ™‹', + 'iOS7' => 'โ™‹๏ธ', + 'Hex' => '264B' + ), + array( + 'iOS2' => '', + 'iOS5' => 'โ™Œ', + 'iOS7' => 'โ™Œ๏ธ', + 'Hex' => '264C' + ), + array( + 'iOS2' => '', + 'iOS5' => 'โ™', + 'iOS7' => 'โ™๏ธ', + 'Hex' => '264D' + ), + array( + 'iOS2' => '', + 'iOS5' => 'โ™Ž', + 'iOS7' => 'โ™Ž๏ธ', + 'Hex' => '264E' + ), + array( + 'iOS2' => '', + 'iOS5' => 'โ™', + 'iOS7' => 'โ™๏ธ', + 'Hex' => '264F' + ), + array( + 'iOS2' => '', + 'iOS5' => 'โ™', + 'iOS7' => 'โ™๏ธ', + 'Hex' => '2650' + ), + array( + 'iOS2' => '', + 'iOS5' => 'โ™‘', + 'iOS7' => 'โ™‘๏ธ', + 'Hex' => '2651' + ), + array( + 'iOS2' => '', + 'iOS5' => 'โ™’', + 'iOS7' => 'โ™’๏ธ', + 'Hex' => '2652' + ), + array( + 'iOS2' => '', + 'iOS5' => 'โ™“', + 'iOS7' => 'โ™“๏ธ', + 'Hex' => '2653' + ), + array('iOS2' => '', 'iOS5' => 'โ›Ž', 'iOS7' => '', 'Hex' => '26CE'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ”ฏ', + 'iOS7' => '', + 'Hex' => '1F52F' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿง', + 'iOS7' => '', + 'Hex' => '1F3E7' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ’น', + 'iOS7' => '', + 'Hex' => '1F4B9' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿ’ฒ', 'iOS7' => '', 'Hex' => '1F4B2'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ’ฑ', + 'iOS7' => '', + 'Hex' => '1F4B1' + ), + array('iOS2' => 'ยฉ', 'iOS5' => 'ยฉ', 'iOS7' => '', 'Hex' => '00A9'), + array('iOS2' => 'ยฎ', 'iOS5' => 'ยฎ', 'iOS7' => '', 'Hex' => '00AE'), + array('iOS2' => 'โ„ข', 'iOS5' => 'โ„ข', 'iOS7' => '', 'Hex' => '2122'), + array( + 'iOS2' => '', + 'iOS5' => 'ใ€ฝ', + 'iOS7' => 'ใ€ฝ๏ธ', + 'Hex' => '303D' + ), + array('iOS2' => '', 'iOS5' => 'ใ€ฐ', 'iOS7' => '', 'Hex' => '3030'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ”', + 'iOS7' => '', + 'Hex' => '1F51D' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿ”š', 'iOS7' => '', 'Hex' => '1F51A'), + array('iOS2' => '', 'iOS5' => '๐Ÿ”™', 'iOS7' => '', 'Hex' => '1F519'), + array('iOS2' => '', 'iOS5' => '๐Ÿ”›', 'iOS7' => '', 'Hex' => '1F51B'), + array('iOS2' => '', 'iOS5' => '๐Ÿ”œ', 'iOS7' => '', 'Hex' => '1F51C'), + array('iOS2' => '', 'iOS5' => 'โŒ', 'iOS7' => '', 'Hex' => '274C'), + array( + 'iOS2' => '', + 'iOS5' => 'โญ•', + 'iOS7' => 'โญ•๏ธ', + 'Hex' => '2B55' + ), + array('iOS2' => '', 'iOS5' => 'โ—', 'iOS7' => 'โ—๏ธ', 'Hex' => '2757'), + array('iOS2' => '', 'iOS5' => 'โ“', 'iOS7' => '', 'Hex' => '2753'), + array('iOS2' => '', 'iOS5' => 'โ•', 'iOS7' => '', 'Hex' => '2755'), + array('iOS2' => '', 'iOS5' => 'โ”', 'iOS7' => '', 'Hex' => '2754'), + array('iOS2' => '', 'iOS5' => '๐Ÿ”ƒ', 'iOS7' => '', 'Hex' => '1F503'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ•›', + 'iOS7' => '', + 'Hex' => '1F55B' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿ•ง', 'iOS7' => '', 'Hex' => '1F567'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ•', + 'iOS7' => '', + 'Hex' => '1F550' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿ•œ', 'iOS7' => '', 'Hex' => '1F55C'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ•‘', + 'iOS7' => '', + 'Hex' => '1F551' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿ•', 'iOS7' => '', 'Hex' => '1F55D'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ•’', + 'iOS7' => '', + 'Hex' => '1F552' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿ•ž', 'iOS7' => '', 'Hex' => '1F55E'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ•“', + 'iOS7' => '', + 'Hex' => '1F553' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿ•Ÿ', 'iOS7' => '', 'Hex' => '1F55F'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ•”', + 'iOS7' => '', + 'Hex' => '1F554' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿ• ', 'iOS7' => '', 'Hex' => '1F560'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ••', + 'iOS7' => '', + 'Hex' => '1F555' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ•–', + 'iOS7' => '', + 'Hex' => '1F556' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ•—', + 'iOS7' => '', + 'Hex' => '1F557' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ•˜', + 'iOS7' => '', + 'Hex' => '1F558' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ•™', + 'iOS7' => '', + 'Hex' => '1F559' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ•š', + 'iOS7' => '', + 'Hex' => '1F55A' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿ•ก', 'iOS7' => '', 'Hex' => '1F561'), + array('iOS2' => '', 'iOS5' => '๐Ÿ•ข', 'iOS7' => '', 'Hex' => '1F562'), + array('iOS2' => '', 'iOS5' => '๐Ÿ•ฃ', 'iOS7' => '', 'Hex' => '1F563'), + array('iOS2' => '', 'iOS5' => '๐Ÿ•ค', 'iOS7' => '', 'Hex' => '1F564'), + array('iOS2' => '', 'iOS5' => '๐Ÿ•ฅ', 'iOS7' => '', 'Hex' => '1F565'), + array('iOS2' => '', 'iOS5' => '๐Ÿ•ฆ', 'iOS7' => '', 'Hex' => '1F566'), + array('iOS2' => '', 'iOS5' => 'โœ–', 'iOS7' => 'โœ–๏ธ', 'Hex' => '2716'), + array('iOS2' => '', 'iOS5' => 'โž•', 'iOS7' => '', 'Hex' => '2795'), + array('iOS2' => '', 'iOS5' => 'โž–', 'iOS7' => '', 'Hex' => '2796'), + array('iOS2' => '', 'iOS5' => 'โž—', 'iOS7' => '', 'Hex' => '2797'), + array( + 'iOS2' => '', + 'iOS5' => 'โ™ ', + 'iOS7' => 'โ™ ๏ธ', + 'Hex' => '2660' + ), + array( + 'iOS2' => '', + 'iOS5' => 'โ™ฅ', + 'iOS7' => 'โ™ฅ๏ธ', + 'Hex' => '2665' + ), + array( + 'iOS2' => '', + 'iOS5' => 'โ™ฃ', + 'iOS7' => 'โ™ฃ๏ธ', + 'Hex' => '2663' + ), + array( + 'iOS2' => '', + 'iOS5' => 'โ™ฆ', + 'iOS7' => 'โ™ฆ๏ธ', + 'Hex' => '2666' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿ’ฎ', 'iOS7' => '', 'Hex' => '1F4AE'), + array('iOS2' => '', 'iOS5' => '๐Ÿ’ฏ', 'iOS7' => '', 'Hex' => '1F4AF'), + array('iOS2' => '', 'iOS5' => 'โœ”', 'iOS7' => 'โœ”๏ธ', 'Hex' => '2714'), + array('iOS2' => '', 'iOS5' => 'โ˜‘', 'iOS7' => 'โ˜‘๏ธ', 'Hex' => '2611'), + array('iOS2' => '', 'iOS5' => '๐Ÿ”˜', 'iOS7' => '', 'Hex' => '1F518'), + array('iOS2' => '', 'iOS5' => '๐Ÿ”—', 'iOS7' => '', 'Hex' => '1F517'), + array('iOS2' => '', 'iOS5' => 'โžฐ', 'iOS7' => '', 'Hex' => '27B0'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ”ฑ', + 'iOS7' => '', + 'Hex' => '1F531' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ”ฒ', + 'iOS7' => '', + 'Hex' => '1F532' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ”ณ', + 'iOS7' => '', + 'Hex' => '1F533' + ), + array('iOS2' => '', 'iOS5' => 'โ—ผ', 'iOS7' => 'โ—ผ๏ธ', 'Hex' => '25FC'), + array('iOS2' => '', 'iOS5' => 'โ—ป', 'iOS7' => 'โ—ป๏ธ', 'Hex' => '25FB'), + array('iOS2' => '', 'iOS5' => 'โ—พ', 'iOS7' => 'โ—พ๏ธ', 'Hex' => '25FE'), + array('iOS2' => '', 'iOS5' => 'โ—ฝ', 'iOS7' => 'โ—ฝ๏ธ', 'Hex' => '25FD'), + array('iOS2' => '', 'iOS5' => 'โ–ช', 'iOS7' => 'โ–ช๏ธ', 'Hex' => '25AA'), + array('iOS2' => '', 'iOS5' => 'โ–ซ', 'iOS7' => 'โ–ซ๏ธ', 'Hex' => '25AB'), + array('iOS2' => '', 'iOS5' => '๐Ÿ”บ', 'iOS7' => '', 'Hex' => '1F53A'), + array('iOS2' => '', 'iOS5' => 'โฌœ', 'iOS7' => 'โฌœ๏ธ', 'Hex' => '2B1C'), + array('iOS2' => '', 'iOS5' => 'โฌ›', 'iOS7' => 'โฌ›๏ธ', 'Hex' => '2B1B'), + array('iOS2' => '', 'iOS5' => 'โšซ', 'iOS7' => 'โšซ๏ธ', 'Hex' => '26AB'), + array('iOS2' => '', 'iOS5' => 'โšช', 'iOS7' => 'โšช๏ธ', 'Hex' => '26AA'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ”ด', + 'iOS7' => '', + 'Hex' => '1F534' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿ”ต', 'iOS7' => '', 'Hex' => '1F535'), + array('iOS2' => '', 'iOS5' => '๐Ÿ”ป', 'iOS7' => '', 'Hex' => '1F53B'), + array('iOS2' => '', 'iOS5' => '๐Ÿ”ถ', 'iOS7' => '', 'Hex' => '1F536'), + array('iOS2' => '', 'iOS5' => '๐Ÿ”ท', 'iOS7' => '', 'Hex' => '1F537'), + array('iOS2' => '', 'iOS5' => '๐Ÿ”ธ', 'iOS7' => '', 'Hex' => '1F538'), + array('iOS2' => '', 'iOS5' => '๐Ÿ”น', 'iOS7' => '', 'Hex' => '1F539'), + array('iOS2' => '', 'iOS5' => 'โ‰', 'iOS7' => 'โ‰๏ธ', 'Hex' => '2049'), + array('iOS2' => '', 'iOS5' => 'โ€ผ', 'iOS7' => 'โ€ผ๏ธ', 'Hex' => '203C') + ); } + From 679f9aec03d77dfdb4b835cd4472a087cac6459a Mon Sep 17 00:00:00 2001 From: mgp25 Date: Wed, 12 Nov 2014 15:25:40 +0100 Subject: [PATCH 113/436] Final fix for registration issue :) Special thanks to @SikiFn --- src/countries.csv | 10 +++++----- src/whatsprot.class.php | 11 +++++++---- 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/src/countries.csv b/src/countries.csv index 4d4d669d..fee9acf6 100755 --- a/src/countries.csv +++ b/src/countries.csv @@ -23,7 +23,7 @@ "Belgium",32,206,"BE","nl","001" "Belize",501,702,"BZ","es","067" "Benin",229,616,"BJ","fr","003" -"Bermuda",1441,"350","BM","en","001" +"Bermuda",1441,350,"BM","en","001" "Bhutan",975,402,"BT","dz","011" "Bolivia",591,736,"BO","es","002" "Bosnia and Herzegovina",387,218,"BA","bs","003" @@ -108,7 +108,7 @@ "Jamaica",1876,"338","JM","en","050" "Japan",81,"440|441","JP","ja","001" "Jordan",962,416,"JO","ar","001" -"Kazakhstan",7,401,"KZ","kk","001" +"Kazakhstan",77,401,"KZ","kk","001" "Kenya",254,639,"KE","sw","002" "Kiribati",686,545,"KI","en","009" "Kuwait",965,419,"KW","ar","003" @@ -190,7 +190,7 @@ "Quebec",1819,302,"CA","en","370" "Reunion",262,647,"RE","fr","002" "Romania",40,226,"RO","ro","001" -"Russia",7,250,"RU","ru","001" +"Russia",79,250,"RU","ru","001" "Rwanda",250,635,"RW","rw","013" "Saint-Barthelemy",590,340,"BL","fr","001" "Saint Helena",290,658,"SH","en","000" @@ -215,7 +215,7 @@ "South Africa",27,655,"ZA","xh","001" "South Korea",82,450,"KR","ko","005" "South Sudan",211,659,"SS","en","002" -"Spain",34,214,"es","es","007" +"Spain",34,214,"ES","es","007" "Sri Lanka",94,413,"LK","si","001" "Sudan",249,634,"SD","ar","001" "Suriname",597,746,"SR","nl","002" @@ -240,7 +240,7 @@ "Ukraine",380,255,"UA","uk","001" "United Arab Emirates",971,"424|430|431","AE","ar","003" "United Kingdom",44,"234|235","GB","en","002" -"United States of America",1,"310|311|312|313|314|315|316","en","en","150" +"United States of America",1,"310|311|312|313|314|315|316","US","en","150" "Uruguay",598,748,"UY","es","007" "Uzbekistan",998,434,"UZ","uz","001" "Vanuatu",678,541,"VU","bi","005" diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index d931e06d..0bd9c59c 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -351,16 +351,19 @@ public function codeRequest($method = 'sms', $countryCode = null, $langCode = nu // Build the url. $host = 'https://' . static::WHATSAPP_REQUEST_HOST; $query = array( - 'method' => $method, 'in' => $phone['phone'], 'cc' => $phone['cc'], 'id' => $this->identity, 'lg' => $langCode, 'lc' => $countryCode, - 'token' => urlencode($token), + 'mcc' => $phone['mcc'], + 'mnc' => $phone['mnc'], 'sim_mcc' => $phone['mcc'], - 'sim_mnc' => $phone['mnc'] - //'reason' => 'jailbroken', + 'sim_mnc' => $phone['mnc'], + 'method' => $method, + //'reason' => "self-send-jailbroken", + 'token' => urlencode($token), + 'network_radio_type' => "1" ); if ($this->debug) { From a81fc17327fb70b9bd6d9456878689fd52ff2e30 Mon Sep 17 00:00:00 2001 From: mgp25 Date: Thu, 13 Nov 2014 01:54:29 +0100 Subject: [PATCH 114/436] Fix for Russian numbers --- src/whatsprot.class.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index 0bd9c59c..efbe878c 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -171,6 +171,12 @@ public function checkCredentials() if ($langCode == null) { $langCode = 'en'; } + if ($phone['cc'] == '77') { + $phone['cc'] = '7'; + } + if ($phone['cc'] == '79') { + $phone['cc'] = '7'; + } // Build the url. $host = 'https://' . static::WHATSAPP_CHECK_HOST; From 4af538dbaab8255546e311c31772041ee1394903 Mon Sep 17 00:00:00 2001 From: mgp25 Date: Sat, 15 Nov 2014 01:10:07 +0100 Subject: [PATCH 115/436] added sendGetCipherKeysFromUser --- src/whatsprot.class.php | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index efbe878c..e54f82b4 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -186,6 +186,7 @@ public function checkCredentials() 'id' => $this->identity, 'lg' => $langCode, 'lc' => $countryCode, + 'network_radio_type' => "1" ); $response = $this->getResponse($host, $query); @@ -273,6 +274,7 @@ public function codeRegister($code) 'code' => $code, 'lg' => $langCode, 'lc' => $countryCode, + 'network_radio_type' => "1" ); $response = $this->getResponse($host, $query); @@ -604,6 +606,30 @@ public function sendActiveStatus() $this->sendNode($messageNode); } + /** + * Send a request to get cipher keys from an user + * + * @param $number + * Phone number of the user you want to get the cipher keys. + */ + public function sendGetCipherKeysFromUser($number) + { + $msgId = $this->createMsgId("cipher_keys_"); + + $userNode = new ProtocolNode("user", array( + "jid" => $jid."@".static::WHATSAPP_SERVER + ), null, null); + $keyNode = new ProtocolNode("key", null, array($userNode), null); + $node = new ProtocolNode("iq", array( + "id" => $msgId, + "xmlns" => "encrypt", + "type" => "get", + "to" => static::WHATSAPP_SERVER + ), null, ""); + + $this->sendNode($node); + } + /** * Send a Broadcast Message with audio. * From a571e1b7137517f087d140afa91e0f6b615d0822 Mon Sep 17 00:00:00 2001 From: mgp25 Date: Sat, 15 Nov 2014 01:12:07 +0100 Subject: [PATCH 116/436] added senGetCipherKeysFromUser Forgot to add child node, sorry :/ --- src/whatsprot.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index e54f82b4..50a93806 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -625,7 +625,7 @@ public function sendGetCipherKeysFromUser($number) "xmlns" => "encrypt", "type" => "get", "to" => static::WHATSAPP_SERVER - ), null, ""); + ), array($keyNode), null); $this->sendNode($node); } From 15b20f19ed3fd7e922349eaef863084610f2c745 Mon Sep 17 00:00:00 2001 From: SikiFn Date: Mon, 17 Nov 2014 13:50:33 +0200 Subject: [PATCH 117/436] Fix vCard Exception Some vCards are now sent with name directly in the Data.. --- src/whatsprot.class.php | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index 50a93806..13b1a362 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -2564,6 +2564,14 @@ protected function processInboundDataNode(ProtocolNode $node, $autoReceipt = tru $node->getChild("media")->getAttribute('acodec') )); } elseif ($node->getChild("media")->getAttribute('type') == 'vcard') { + if($node->getChild("media")->hasChild('vcard')) { + $name = $node->getChild("media")->getChild("vcard")->getAttribute('name'); + $data = $node->getChild("media")->getChild("vcard")->getData(); + } else { + $name = "NO_NAME"; + $data = $node->getChild("media")->getData(); + } + $this->eventManager()->fire("onGetvCard", array( $this->phoneNumber, @@ -2572,8 +2580,8 @@ protected function processInboundDataNode(ProtocolNode $node, $autoReceipt = tru $node->getAttribute('type'), $node->getAttribute('t'), $node->getAttribute('notify'), - $node->getChild("media")->getChild("vcard")->getAttribute('name'), - $node->getChild("media")->getChild("vcard")->getData() + $name, + $data )); } elseif ($node->getChild("media")->getAttribute('type') == 'location') { $url = $node->getChild("media")->getAttribute('url'); From cdbf4fd664f939476113172d8ae86373c93d1929 Mon Sep 17 00:00:00 2001 From: SikiFn Date: Mon, 17 Nov 2014 13:55:06 +0200 Subject: [PATCH 118/436] Fixed JID Normalization --- src/whatsprot.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index 13b1a362..81aaab62 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -617,7 +617,7 @@ public function sendGetCipherKeysFromUser($number) $msgId = $this->createMsgId("cipher_keys_"); $userNode = new ProtocolNode("user", array( - "jid" => $jid."@".static::WHATSAPP_SERVER + "jid" => $this->getJID($number) ), null, null); $keyNode = new ProtocolNode("key", null, array($userNode), null); $node = new ProtocolNode("iq", array( From 5e7c48da792a789e2067c85411d3c0ce048b439a Mon Sep 17 00:00:00 2001 From: mgp25 Date: Wed, 19 Nov 2014 17:19:17 +0100 Subject: [PATCH 119/436] Update token + version --- src/token.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/token.php b/src/token.php index f3dff1ae..87361fa5 100755 --- a/src/token.php +++ b/src/token.php @@ -4,7 +4,7 @@ function generateRequestToken($country, $phone) { $signature = "MIIDMjCCAvCgAwIBAgIETCU2pDALBgcqhkjOOAQDBQAwfDELMAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFDASBgNVBAcTC1NhbnRhIENsYXJhMRYwFAYDVQQKEw1XaGF0c0FwcCBJbmMuMRQwEgYDVQQLEwtFbmdpbmVlcmluZzEUMBIGA1UEAxMLQnJpYW4gQWN0b24wHhcNMTAwNjI1MjMwNzE2WhcNNDQwMjE1MjMwNzE2WjB8MQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEUMBIGA1UEBxMLU2FudGEgQ2xhcmExFjAUBgNVBAoTDVdoYXRzQXBwIEluYy4xFDASBgNVBAsTC0VuZ2luZWVyaW5nMRQwEgYDVQQDEwtCcmlhbiBBY3RvbjCCAbgwggEsBgcqhkjOOAQBMIIBHwKBgQD9f1OBHXUSKVLfSpwu7OTn9hG3UjzvRADDHj+AtlEmaUVdQCJR+1k9jVj6v8X1ujD2y5tVbNeBO4AdNG/yZmC3a5lQpaSfn+gEexAiwk+7qdf+t8Yb+DtX58aophUPBPuD9tPFHsMCNVQTWhaRMvZ1864rYdcq7/IiAxmd0UgBxwIVAJdgUI8VIwvMspK5gqLrhAvwWBz1AoGBAPfhoIXWmz3ey7yrXDa4V7l5lK+7+jrqgvlXTAs9B4JnUVlXjrrUWU/mcQcQgYC0SRZxI+hMKBYTt88JMozIpuE8FnqLVHyNKOCjrh4rs6Z1kW6jfwv6ITVi8ftiegEkO8yk8b6oUZCJqIPf4VrlnwaSi2ZegHtVJWQBTDv+z0kqA4GFAAKBgQDRGYtLgWh7zyRtQainJfCpiaUbzjJuhMgo4fVWZIvXHaSHBU1t5w//S0lDK2hiqkj8KpMWGywVov9eZxZy37V26dEqr/c2m5qZ0E+ynSu7sqUD7kGx/zeIcGT0H+KAVgkGNQCo5Uc0koLRWYHNtYoIvt5R3X6YZylbPftF/8ayWTALBgcqhkjOOAQDBQADLwAwLAIUAKYCp0d6z4QQdyN74JDfQ2WCyi8CFDUM4CaNB+ceVXdKtOrNTQcc0e+t"; - $classesMd5 = "6AFrxlvRhUKoSxdMjnYATg=="; // 2.11.431 + $classesMd5 = "Ghame8Kns3K5rsItbpoM7w=="; // 2.11.448 $key2 = base64_decode("/UIGKU1FVQa+ATM2A0za7G2KI9S/CwPYjgAbc67v7ep42eO/WeTLx1lb1cHwxpsEgF4+PmYpLd2YpGUdX/A2JQitsHzDwgcdBpUf7psX1BU="); $data = base64_decode($signature) . base64_decode($classesMd5) . $phone; From 8cd731d321484426700c650bd1f6fcb73639151f Mon Sep 17 00:00:00 2001 From: mgp25 Date: Wed, 19 Nov 2014 17:21:16 +0100 Subject: [PATCH 120/436] sendPresenceUnsubscription added --- src/whatsprot.class.php | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index 81aaab62..c499c5fd 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -46,8 +46,8 @@ class WhatsProt const WHATSAPP_SERVER = 's.whatsapp.net'; // The hostname used to login/send messages. const WHATSAPP_UPLOAD_HOST = 'https://mms.whatsapp.net/client/iphone/upload.php'; // The upload host. const WHATSAPP_DEVICE = 'Android'; // The device name. - const WHATSAPP_VER = '2.11.431'; // The WhatsApp version. - const WHATSAPP_USER_AGENT = 'WhatsApp/2.11.431 Android/4.3 Device/GalaxyS3'; // User agent used in request/registration code. + const WHATSAPP_VER = '2.11.448'; // The WhatsApp version. + const WHATSAPP_USER_AGENT = 'WhatsApp/2.11.448 Android/4.3 Device/GalaxyS3'; // User agent used in request/registration code. const WHATSAPP_VER_CHECKER = 'https://coderus.openrepos.net/whitesoft/whatsapp_version'; // Check WhatsApp version /** @@ -1688,6 +1688,18 @@ public function sendPresenceSubscription($to) $this->sendNode($node); } + /** + * Unsubscribe, will stop subscription + * + * @param string $to + * Phone number. + */ + public function sendPresenceUnsubscription($to) + { + $node = new ProtocolNode("presence", array("type" => "unsubscribe", "to" => $this->getJID($to)), null, ""); + $this->sendNode($node); + } + /** * Set the picture for the group * From 239ed4cf448dfd9db63dbcba61be4cbb821fd93e Mon Sep 17 00:00:00 2001 From: mgp25 Date: Thu, 20 Nov 2014 20:47:30 +0100 Subject: [PATCH 121/436] Number network info --- src/networkinfo.csv | 1697 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 1697 insertions(+) create mode 100644 src/networkinfo.csv diff --git a/src/networkinfo.csv b/src/networkinfo.csv new file mode 100644 index 00000000..9a46f4b8 --- /dev/null +++ b/src/networkinfo.csv @@ -0,0 +1,1697 @@ +289,649,088,2191,ab,Abkhazia,7,A-Mobile +289,649,068,1679,ab,Abkhazia,7,A-Mobile +289,649,067,1663,ab,Abkhazia,7,Aquafon +412,1042,088,2191,af,Afghanistan,93,Afghan Telecom Corp. (AT) +412,1042,080,2063,af,Afghanistan,93,Afghan Telecom Corp. (AT) +412,1042,001,31,af,Afghanistan,93,Afghan Wireless/AWCC +412,1042,040,1039,af,Afghanistan,93,Areeba +412,1042,050,1295,af,Afghanistan,93,Etisalat +412,1042,020,527,af,Afghanistan,93,Roshan +276,630,001,31,al,Albania,355,AMC Mobil +276,630,003,63,al,Albania,355,Eagle Mobile +276,630,004,79,al,Albania,355,PLUS Communication Sh.a +276,630,002,47,al,Albania,355,Vodafone +603,1539,001,31,dz,Algeria,213,ATM Mobils +603,1539,002,47,dz,Algeria,213,Orascom / DJEZZY +603,1539,003,63,dz,Algeria,213,Wataniya / Nedjma +544,1348,011,287,as,American Samoa,684,Blue Sky Communications +213,531,003,63,ad,Andorra,376,Mobiland +631,1585,004,79,ao,Angola,244,MoviCel +631,1585,002,47,ao,Angola,244,Unitel +365,869,840,2112,ai,Anguilla,1264,Cable and Wireless +365,869,010,16,ai,Anguilla,1264,Digicell / Wireless Vent. Ltd +344,836,030,48,ag,Antigua and Barbuda,1268,APUA PCS +344,836,920,2336,ag,Antigua and Barbuda,1268,C & W +344,836,930,2352,ag,Antigua and Barbuda,1268,Cing. Wirel./DigiCel +722,1826,310,784,ar,Argentina Republic,54,Claro/ CTI/AMX +722,1826,330,816,ar,Argentina Republic,54,Claro/ CTI/AMX +722,1826,320,800,ar,Argentina Republic,54,Claro/ CTI/AMX +722,1826,010,16,ar,Argentina Republic,54,Compania De Radiocomunicaciones Moviles SA +722,1826,070,112,ar,Argentina Republic,54,Movistar/Telefonica +722,1826,020,32,ar,Argentina Republic,54,Nextel +722,1826,341,833,ar,Argentina Republic,54,Telecom Personal S.A. +283,643,001,31,am,Armenia,374,ArmenTel/Beeline +283,643,004,4,am,Armenia,374,Karabakh Telecom +283,643,010,271,am,Armenia,374,Orange +283,643,005,95,am,Armenia,374,Vivacell +363,867,020,527,aw,Aruba,297,Digicel +363,867,001,31,aw,Aruba,297,Setar GSM +505,1285,014,335,au,Australia,61,AAPT Ltd. +505,1285,024,591,au,Australia,61,Advanced Comm Tech Pty. +505,1285,009,159,au,Australia,61,Airnet Commercial Australia Ltd.. +505,1285,004,79,au,Australia,61,Department of Defense +505,1285,026,623,au,Australia,61,Dialogue Communications Pty Ltd +505,1285,012,303,au,Australia,61,H3G Ltd. +505,1285,006,111,au,Australia,61,H3G Ltd. +505,1285,088,2191,au,Australia,61,Localstar Holding Pty. Ltd +505,1285,019,415,au,Australia,61,Lycamobile Pty Ltd +505,1285,008,143,au,Australia,61,Railcorp/Vodafone +505,1285,099,2463,au,Australia,61,Railcorp/Vodafone +505,1285,013,319,au,Australia,61,Railcorp/Vodafone +505,1285,090,2319,au,Australia,61,Singtel Optus +505,1285,002,47,au,Australia,61,Singtel Optus +505,1285,001,31,au,Australia,61,Telstra Corp. Ltd. +505,1285,011,287,au,Australia,61,Telstra Corp. Ltd. +505,1285,071,1823,au,Australia,61,Telstra Corp. Ltd. +505,1285,072,1839,au,Australia,61,Telstra Corp. Ltd. +505,1285,005,95,au,Australia,61,The Ozitel Network Pty. +505,1285,016,367,au,Australia,61,Victorian Rail Track Corp. (VicTrack) +505,1285,007,127,au,Australia,61,Vodafone +505,1285,003,63,au,Australia,61,Vodafone +232,562,002,47,at,Austria,43,A1 MobilKom +232,562,011,287,at,Austria,43,A1 MobilKom +232,562,009,159,at,Austria,43,A1 MobilKom +232,562,001,31,at,Austria,43,A1 MobilKom +232,562,015,351,at,Austria,43,T-Mobile/Telering +232,562,000,15,at,Austria,43,Fix Line +232,562,010,271,at,Austria,43,H3G +232,562,014,335,at,Austria,43,H3G +232,562,012,303,at,Austria,43,Orange/One Connect +232,562,006,111,at,Austria,43,Orange/One Connect +232,562,005,95,at,Austria,43,Orange/One Connect +232,562,004,79,at,Austria,43,T-Mobile/Telering +232,562,003,63,at,Austria,43,T-Mobile/Telering +232,562,007,127,at,Austria,43,T-Mobile/Telering +232,562,008,143,at,Austria,43,Telefonica +400,1024,001,31,az,Azerbaijan,994,Azercell Telekom B.M. +400,1024,004,79,az,Azerbaijan,994,Azerfon. +400,1024,003,63,az,Azerbaijan,994,Caspian American Telecommunications LLC (CATEL) +400,1024,002,47,az,Azerbaijan,994,J.V. Bakcell GSM 2000 +364,868,030,783,bs,Bahamas,1242,Bahamas Telco. Comp. +364,868,390,912,bs,Bahamas,1242,Bahamas Telco. Comp. +364,868,039,927,bs,Bahamas,1242,Bahamas Telco. Comp. +364,868,003,3,bs,Bahamas,1242,Smart Communications +426,1062,001,31,bh,Bahrain,973,Batelco +426,1062,002,47,bh,Bahrain,973,MTC Vodafone +426,1062,004,79,bh,Bahrain,973,VIVA +470,1136,002,47,bd,Bangladesh,880,Robi/Aktel +470,1136,005,95,bd,Bangladesh,880,Citycell +470,1136,006,111,bd,Bangladesh,880,Citycell +470,1136,001,31,bd,Bangladesh,880,GrameenPhone +470,1136,003,63,bd,Bangladesh,880,Orascom +470,1136,004,79,bd,Bangladesh,880,TeleTalk +470,1136,007,127,bd,Bangladesh,880,Airtel/Warid +342,834,600,1536,bb,Barbados,1246,C & W BET Ltd. +342,834,810,2064,bb,Barbados,1246,Cingular Wireless +342,834,750,1872,bb,Barbados,1246,Digicel +342,834,050,80,bb,Barbados,1246,Digicel +342,834,820,2080,bb,Barbados,1246,Sunbeach +257,599,003,63,by,Belarus,375,BelCel JV +257,599,004,79,by,Belarus,375,BeST +257,599,001,31,by,Belarus,375,Mobile Digital Communications +257,599,002,47,by,Belarus,375,MTS +206,518,020,527,be,Belgium,32,Base/KPN +206,518,001,31,be,Belgium,32,Belgacom/Proximus +206,518,010,271,be,Belgium,32,Mobistar/Orange +206,518,002,47,be,Belgium,32,SNCT/NMBS +206,518,005,95,be,Belgium,32,Telenet BidCo NV +702,1794,067,1663,bz,Belize,501,DigiCell +702,1794,068,1679,bz,Belize,501,International Telco (INTELCO) +616,1558,004,79,bj,Benin,229,Bell Benin/BBCOM +616,1558,002,47,bj,Benin,229,Etisalat/MOOV +616,1558,005,5,bj,Benin,229,GloMobile +616,1558,001,31,bj,Benin,229,Libercom +616,1558,003,63,bj,Benin,229,MTN/Spacetel +350,848,000,0,bm,Bermuda,1441,Bermuda Digital Communications Ltd (BDC) +350,848,099,2463,bm,Bermuda,1441,CellOne Ltd +350,848,010,271,bm,Bermuda,1441,DigiCel / Cingular +350,848,002,47,bm,Bermuda,1441,M3 Wireless Ltd +350,848,001,31,bm,Bermuda,1441,Telecommunications (Bermuda & West Indies) Ltd (Digicel Bermuda) +402,1026,011,287,bt,Bhutan,975,B-Mobile +402,1026,017,383,bt,Bhutan,975,Bhutan Telecom Ltd (BTL) +402,1026,077,1919,bt,Bhutan,975,TashiCell +736,1846,002,47,bo,Bolivia,591,Entel Pcs +736,1846,001,31,bo,Bolivia,591,Nuevatel +736,1846,003,63,bo,Bolivia,591,TELECEL BOLIVIA +362,866,091,2335,bq,Bonaire Sint Eustatius and Saba,,United Telecommunications Services NV (UTS) +218,536,090,2319,ba,Bosnia & Herzegov.,387,BH Mobile +218,536,003,63,ba,Bosnia & Herzegov.,387,Eronet Mobile +218,536,005,95,ba,Bosnia & Herzegov.,387,M-Tel +652,1618,004,79,bw,Botswana,267,beMOBILE +652,1618,001,31,bw,Botswana,267,Mascom Wireless (Pty) Ltd. +652,1618,002,47,bw,Botswana,267,Orange +724,1828,012,303,br,Brazil,55,Claro/Albra/America Movil +724,1828,038,911,br,Brazil,55,Claro/Albra/America Movil +724,1828,005,95,br,Brazil,55,Claro/Albra/America Movil +724,1828,001,1,br,Brazil,55,Vivo S.A./Telemig +724,1828,033,831,br,Brazil,55,CTBC Celular SA (CTBC) +724,1828,032,815,br,Brazil,55,CTBC Celular SA (CTBC) +724,1828,034,847,br,Brazil,55,CTBC Celular SA (CTBC) +724,1828,008,8,br,Brazil,55,TIM +724,1828,000,15,br,Brazil,55,Nextel (Telet) +724,1828,039,927,br,Brazil,55,Nextel (Telet) +724,1828,030,783,br,Brazil,55,Oi (TNL PCS / Oi) +724,1828,031,799,br,Brazil,55,Oi (TNL PCS / Oi) +724,1828,024,591,br,Brazil,55,Amazonia Celular S/A +724,1828,016,367,br,Brazil,55,Brazil Telcom +724,1828,015,351,br,Brazil,55,Sercontel Cel +724,1828,07,7,br,Brazil,55,CTBC/Triangulo +724,1828,019,415,br,Brazil,55,Vivo S.A./Telemig +724,1828,003,63,br,Brazil,55,TIM +724,1828,002,47,br,Brazil,55,TIM +724,1828,004,79,br,Brazil,55,TIM +724,1828,037,895,br,Brazil,55,Unicel do Brasil Telecomunicacoes Ltda +724,1828,006,111,br,Brazil,55,Vivo S.A./Telemig +724,1828,023,575,br,Brazil,55,Vivo S.A./Telemig +724,1828,011,287,br,Brazil,55,Vivo S.A./Telemig +724,1828,010,271,br,Brazil,55,Vivo S.A./Telemig +348,840,570,1392,vg,British Virgin Islands,284,Caribbean Cellular +348,840,770,1904,vg,British Virgin Islands,284,Digicel +348,840,170,368,vg,British Virgin Islands,284,LIME +528,1320,002,47,bn,Brunei Darussalam,673,b-mobile +528,1320,011,287,bn,Brunei Darussalam,673,Datastream (DTSCom) +528,1320,001,31,bn,Brunei Darussalam,673,Telekom Brunei Bhd (TelBru) +284,644,006,111,bg,Bulgaria,359,BTC Mobile EOOD (vivatel) +284,644,003,63,bg,Bulgaria,359,BTC Mobile EOOD (vivatel) +284,644,005,95,bg,Bulgaria,359,Cosmo Mobile EAD/Globul +284,644,001,31,bg,Bulgaria,359,MobilTel AD +613,1555,003,63,bf,Burkina Faso,226,TeleCel +613,1555,001,31,bf,Burkina Faso,226,TeleMob-OnaTel +613,1555,002,47,bf,Burkina Faso,226,AirTel/ZAIN/CelTel +414,1044,001,31,mm,Burma/Myanmar,95,Myanmar Post & Teleco. +642,1602,002,47,bi,Burundi,257,Africel / Safaris +642,1602,008,143,bi,Burundi,257,HiTs Telecom +642,1602,003,63,bi,Burundi,257,Onatel / Telecel +642,1602,007,127,bi,Burundi,257,Smart Mobile / LACELL +642,1602,001,31,bi,Burundi,257,Spacetel / Econet +642,1602,082,2095,bi,Burundi,257,U-COM +456,1110,004,79,kh,Cambodia,855,Cambodia Advance Communications Co. Ltd (CADCOMMS) +456,1110,002,47,kh,Cambodia,855,Hello/Malaysia Telcom +456,1110,008,143,kh,Cambodia,855,Metfone +456,1110,018,399,kh,Cambodia,855,MFone/Camshin +456,1110,001,31,kh,Cambodia,855,Mobitel/Cam GSM +456,1110,003,63,kh,Cambodia,855,QB/Cambodia Adv. Comms. +456,1110,005,95,kh,Cambodia,855,Smart Mobile +456,1110,006,111,kh,Cambodia,855,Smart Mobile +456,1110,009,159,kh,Cambodia,855,Sotelco Ltd (Beeline Cambodia) +624,1572,001,31,cm,Cameroon,237,MTN +624,1572,002,47,cm,Cameroon,237,Orange +302,770,652,1618,ca,Canada,1,BC Tel Mobility +302,770,630,1584,ca,Canada,1,Bell Aliant +302,770,651,1617,ca,Canada,1,Bell Mobility +302,770,610,1552,ca,Canada,1,Bell Mobility +302,770,670,1648,ca,Canada,1,CityWest Mobility +302,770,360,864,ca,Canada,1,Clearnet +302,770,361,865,ca,Canada,1,Clearnet +302,770,380,896,ca,Canada,1,DMTS Mobility +302,770,710,1808,ca,Canada,1,Globalstar Canada +302,770,640,1600,ca,Canada,1,Latitude Wireless +302,770,370,880,ca,Canada,1,FIDO (Rogers AT&T/ Microcell) +302,770,320,800,ca,Canada,1,mobilicity +302,770,702,1794,ca,Canada,1,MT&T Mobility +302,770,655,1621,ca,Canada,1,MTS Mobility +302,770,660,1632,ca,Canada,1,MTS Mobility +302,770,701,1793,ca,Canada,1,NB Tel Mobility +302,770,703,1795,ca,Canada,1,New Tel Mobility +302,770,760,1888,ca,Canada,1,Public Mobile +302,770,657,1623,ca,Canada,1,Quebectel Mobility +302,770,720,1824,ca,Canada,1,Rogers AT&T Wireless +302,770,654,1620,ca,Canada,1,Sask Tel Mobility +302,770,680,1664,ca,Canada,1,Sask Tel Mobility +302,770,656,1622,ca,Canada,1,Tbay Mobility +302,770,220,544,ca,Canada,1,Telus Mobility +302,770,653,1619,ca,Canada,1,Telus Mobility +302,770,500,1280,ca,Canada,1,Videotron +302,770,490,1168,ca,Canada,1,WIND +625,1573,001,31,cv,Cape Verde,238,CV Movel +625,1573,002,47,cv,Cape Verde,238,T+ Telecom +346,838,050,80,ky,Cayman Islands,1345,Digicel Cayman Ltd +346,838,006,6,ky,Cayman Islands,1345,Digicel Ltd. +346,838,140,320,ky,Cayman Islands,1345,LIME / Cable & Wirel. +623,1571,001,31,cf,Central African Rep.,236,Centrafr. Telecom+ +623,1571,004,79,cf,Central African Rep.,236,Nationlink +623,1571,003,63,cf,Central African Rep.,236,Orange/Celca +623,1571,002,47,cf,Central African Rep.,236,Telecel Centraf. +622,1570,004,79,td,Chad,235,Salam/Sotel +622,1570,002,47,td,Chad,235,Tchad Mobile +622,1570,003,63,td,Chad,235,Tigo/Milicom/Tchad Mobile +622,1570,001,31,td,Chad,235,Zain/Airtel/Celtel +730,1840,006,111,cl,Chile,56,Blue Two Chile SA +730,1840,011,287,cl,Chile,56,Celupago SA +730,1840,015,351,cl,Chile,56,Cibeles Telecom SA +730,1840,003,63,cl,Chile,56,Claro +730,1840,010,271,cl,Chile,56,Entel PCS +730,1840,001,1,cl,Chile,56,Entel Telefonia Mov +730,1840,014,335,cl,Chile,56,Netline Telefonica Movil Ltda +730,1840,009,159,cl,Chile,56,Nextel SA +730,1840,005,95,cl,Chile,56,Nextel SA +730,1840,004,79,cl,Chile,56,Nextel SA +730,1840,002,47,cl,Chile,56,TELEFONICA +730,1840,007,127,cl,Chile,56,TELEFONICA +730,1840,012,303,cl,Chile,56,Telestar Movil SA +730,1840,000,15,cl,Chile,56,TESAM SA +730,1840,013,319,cl,Chile,56,Tribe Mobile SPA +730,1840,008,143,cl,Chile,56,VTR Banda Ancha SA +460,1120,000,15,cn,China,86,China Mobile GSM +460,1120,007,127,cn,China,86,China Mobile GSM +460,1120,002,47,cn,China,86,China Mobile GSM +460,1120,004,79,cn,China,86,China Space Mobile Satellite Telecommunications Co. Ltd (China Spacecom) +460,1120,005,5,cn,China,86,China Telecom +460,1120,003,63,cn,China,86,China Telecom +460,1120,006,6,cn,China,86,China Unicom +460,1120,001,31,cn,China,86,China Unicom +732,1842,130,304,co,Colombia,57,Avantel SAS +732,1842,102,258,co,Colombia,57,Movistar +732,1842,103,259,co,Colombia,57,TIGO/Colombia Movil +732,1842,001,1,co,Colombia,57,TIGO/Colombia Movil +732,1842,101,257,co,Colombia,57,Comcel S.A. Occel S.A./Celcaribe +732,1842,002,2,co,Colombia,57,Edatel S.A. +732,1842,123,291,co,Colombia,57,Movistar +732,1842,111,273,co,Colombia,57,TIGO/Colombia Movil +732,1842,142,322,co,Colombia,57,UNE EPM Telecomunicaciones SA ESP +732,1842,020,32,co,Colombia,57,UNE EPM Telecomunicaciones SA ESP +732,1842,154,340,co,Colombia,57,Virgin Mobile Colombia SAS +654,1620,001,31,km,Comoros,269,HURI - SNPT +630,1584,086,2159,cd,Congo Dem. Rep.,243,Orange RDC sarl +630,1584,005,95,cd,Congo Dem. Rep.,243,SuperCell +630,1584,089,2207,cd,Congo Dem. Rep.,243,TIGO/Oasis +630,1584,001,31,cd,Congo Dem. Rep.,243,Vodacom +630,1584,088,2191,cd,Congo Dem. Rep.,243,Yozma Timeturns sprl (YTT) +630,1584,002,47,cd,Congo Dem. Rep.,243,ZAIN CelTel +629,1577,001,31,cg,Congo Republic,242,Airtel Congo SA +629,1577,002,2,cg,Congo Republic,242,Zain/Celtel +629,1577,010,271,cg,Congo Republic,242,MTN/Libertis +629,1577,007,127,cg,Congo Republic,242,Warid +548,1352,001,31,ck,Cook Islands,682,Telecom Cook Islands +712,1810,003,63,cr,Costa Rica,506,Claro +712,1810,002,47,cr,Costa Rica,506,ICE +712,1810,001,31,cr,Costa Rica,506,ICE +712,1810,004,79,cr,Costa Rica,506,Movistar +219,537,001,31,hr,Croatia,385,T-Mobile/Cronet +219,537,002,47,hr,Croatia,385,Tele2 +219,537,010,271,hr,Croatia,385,VIPnet d.o.o. +368,872,001,31,cu,Cuba,53,C-COM +362,866,095,2399,cw,Curacao,,EOCG Wireless NV +362,866,069,1695,cw,Curacao,,Polycom N.V./ Curacao Telecom d.b.a. Digicel +280,640,010,271,cy,Cyprus,357,MTN/Areeba +280,640,020,527,cy,Cyprus,357,PrimeTel PLC +280,640,001,31,cy,Cyprus,357,Vodafone/CyTa +230,560,008,143,cz,Czech Rep.,420,Compatel s.r.o. +230,560,002,47,cz,Czech Rep.,420,O2 +230,560,001,31,cz,Czech Rep.,420,T-Mobile / RadioMobil +230,560,005,95,cz,Czech Rep.,420,Travel Telekommunikation s.r.o. +230,560,004,79,cz,Czech Rep.,420,Ufone +230,560,099,2463,cz,Czech Rep.,420,Vodafone +230,560,003,63,cz,Czech Rep.,420,Vodafone +238,568,005,5,dk,Denmark,45,ApS KBUS +238,568,023,575,dk,Denmark,45,Banedanmark +238,568,028,655,dk,Denmark,45,CoolTEL ApS +238,568,006,111,dk,Denmark,45,Hi3G +238,568,012,303,dk,Denmark,45,Lycamobile Ltd +238,568,003,63,dk,Denmark,45,Mach Connectivity ApS +238,568,007,127,dk,Denmark,45, +238,568,004,79,dk,Denmark,45,NextGen Mobile Ltd (CardBoardFish) +238,568,010,271,dk,Denmark,45,TDC Denmark +238,568,001,31,dk,Denmark,45,TDC Denmark +238,568,002,47,dk,Denmark,45,Telenor/Sonofon +238,568,077,1919,dk,Denmark,45,Telenor/Sonofon +238,568,020,527,dk,Denmark,45,Telia +238,568,030,783,dk,Denmark,45,Telia +638,1592,001,31,dj,Djibouti,253,Djibouti Telecom SA (Evatis) +366,870,110,272,dm,Dominica,1767,C & W +366,870,020,32,dm,Dominica,1767,Cingular Wireless/Digicel +366,870,050,80,dm,Dominica,1767,Wireless Ventures (Dominica) Ltd (Digicel Dominica) +370,880,002,47,do,Dominican Republic,1809,Claro +370,880,001,31,do,Dominican Republic,1809,Orange +370,880,003,63,do,Dominican Republic,1809,TRIcom +370,880,004,79,do,Dominican Republic,1809,Trilogy Dominicana S. A. +740,1856,002,47,ec,Ecuador,593,Alegro/Telcsa +740,1856,000,15,ec,Ecuador,593,MOVISTAR/OteCel +740,1856,001,31,ec,Ecuador,593,Porta/Conecel +602,1538,001,31,eg,Egypt,20,EMS - Mobinil +602,1538,003,63,eg,Egypt,20,ETISALAT +602,1538,002,47,eg,Egypt,20,Vodafone (Misrfone Telecom) +706,1798,001,31,sv,El Salvador,503,CLARO/CTE +706,1798,002,47,sv,El Salvador,503,Digicel +706,1798,005,95,sv,El Salvador,503,INTELFON SA de CV +706,1798,004,79,sv,El Salvador,503,Telefonica +706,1798,003,63,sv,El Salvador,503,Telemovil +627,1575,003,63,gq,Equatorial Guinea,240,HiTs-GE +627,1575,001,31,gq,Equatorial Guinea,240,ORANGE/GETESA +657,1623,000,0,er,Eritrea,291,EriTel +657,1623,001,31,er,Eritrea,291,Eritel +248,584,001,31,ee,Estonia,372,EMT GSM +248,584,002,47,ee,Estonia,372,Radiolinja Eesti +248,584,003,63,ee,Estonia,372,Tele2 Eesti AS +248,584,004,79,ee,Estonia,372,Top Connect OU +636,1590,001,31,et,Ethiopia,251,ETH/MTN +750,1872,001,1,fk,Falkland Islands (Malvinas),,Cable and Wireless South Atlantic Ltd (Falkland Islands +288,648,003,63,fo,Faroe Islands,298,Edge Mobile Sp/F +288,648,001,31,fo,Faroe Islands,298,Faroese Telecom +288,648,002,47,fo,Faroe Islands,298,Kall GSM +542,1346,002,47,fj,Fiji,679,DigiCell +542,1346,001,31,fj,Fiji,679,Vodafone +244,580,014,335,fi,Finland,358,Alands +244,580,026,623,fi,Finland,358,Compatel Ltd +244,580,013,319,fi,Finland,358,DNA/Finnet +244,580,012,303,fi,Finland,358,DNA/Finnet +244,580,004,79,fi,Finland,358,DNA/Finnet +244,580,003,63,fi,Finland,358,DNA/Finnet +244,580,021,543,fi,Finland,358,Elisa/Saunalahti +244,580,005,95,fi,Finland,358,Elisa/Saunalahti +244,580,082,2095,fi,Finland,358,ID-Mobile +244,580,011,287,fi,Finland,358,Mundio Mobile (Finland) Ltd +244,580,009,159,fi,Finland,358,Nokia Oyj +244,580,010,271,fi,Finland,358,TDC Oy Finland +244,580,091,2335,fi,Finland,358,TeliaSonera +208,520,027,639,fr,France,33,AFONE SA +208,520,092,2351,fr,France,33,Association Plate-forme Telecom +208,520,028,655,fr,France,33,Astrium +208,520,088,2191,fr,France,33,Bouygues Telecom +208,520,021,543,fr,France,33,Bouygues Telecom +208,520,020,527,fr,France,33,Bouygues Telecom +208,520,014,335,fr,France,33,Lliad/FREE Mobile +208,520,005,95,fr,France,33,GlobalStar +208,520,007,127,fr,France,33,GlobalStar +208,520,006,111,fr,France,33,GlobalStar +208,520,029,671,fr,France,33,Orange +208,520,016,367,fr,France,33,Lliad/FREE Mobile +208,520,015,351,fr,France,33,Lliad/FREE Mobile +208,520,025,607,fr,France,33,Lycamobile SARL +208,520,024,591,fr,France,33,MobiquiThings +208,520,003,63,fr,France,33,MobiquiThings +208,520,031,799,fr,France,33,Mundio Mobile (France) Ltd +208,520,026,623,fr,France,33,NRJ +208,520,089,2207,fr,France,33,Omer/Virgin Mobile +208,520,023,575,fr,France,33,Omer/Virgin Mobile +208,520,002,47,fr,France,33,Orange +208,520,001,31,fr,France,33,Orange +208,520,091,2335,fr,France,33,Orange +208,520,013,319,fr,France,33,S.F.R. +208,520,011,287,fr,France,33,S.F.R. +208,520,010,271,fr,France,33,S.F.R. +208,520,009,159,fr,France,33,S.F.R. +208,520,004,79,fr,France,33,SISTEER +208,520,000,15,fr,France,33,Tel/Tel +208,520,022,559,fr,France,33,Transatel SA +340,832,020,527,gf,French Guiana,594,Bouygues/DigiCel +340,832,008,143,gf,French Guiana,594,AMIGO/Dauphin +340,832,001,31,gf,French Guiana,594,Orange Caribe +340,832,002,47,gf,French Guiana,594,Outremer Telecom +340,832,011,287,gf,French Guiana,594,TelCell GSM +340,832,003,63,gf,French Guiana,594,TelCell GSM +547,1351,015,351,pf,French Polynesia,689,Pacific Mobile Telecom (PMT) +547,1351,020,527,pf,French Polynesia,689,Tikiphone +628,1576,004,79,ga,Gabon,241,Azur/Usan S.A. +628,1576,001,31,ga,Gabon,241,Libertis S.A. +628,1576,002,47,ga,Gabon,241,MOOV/Telecel +628,1576,003,63,ga,Gabon,241,ZAIN/Celtel Gabon S.A. +607,1543,002,47,gm,Gambia,220,Africel +607,1543,003,63,gm,Gambia,220,Comium +607,1543,001,31,gm,Gambia,220,Gamcel +607,1543,004,79,gm,Gambia,220,Q-Cell +282,642,001,31,ge,Georgia,995,Geocell Ltd. +282,642,003,3,ge,Georgia,995,Iberiatel Ltd. +282,642,002,47,ge,Georgia,995,Magti GSM Ltd. +282,642,004,79,ge,Georgia,995,MobiTel/Beeline +282,642,000,0,ge,Georgia,995,Silknet +262,610,017,383,de,Germany,49,E-Plus +262,610,003,63,de,Germany,49,E-Plus +262,610,005,95,de,Germany,49,E-Plus +262,610,077,1919,de,Germany,49,E-Plus +262,610,014,335,de,Germany,49,Group 3G UMTS +262,610,043,1087,de,Germany,49,Lycamobile +262,610,013,319,de,Germany,49,Mobilcom +262,610,007,127,de,Germany,49,O2 +262,610,011,287,de,Germany,49,O2 +262,610,008,143,de,Germany,49,O2 +262,610,010,271,de,Germany,49,O2 +262,610,012,303,de,Germany,49,O2 +262,610,006,111,de,Germany,49,Telekom/T-mobile +262,610,001,31,de,Germany,49,Telekom/T-mobile +262,610,016,367,de,Germany,49,Telogic/ViStream +262,610,004,79,de,Germany,49,Vodafone D2 +262,610,002,47,de,Germany,49,Vodafone D2 +262,610,009,159,de,Germany,49,Vodafone D2 +620,1568,004,79,gh,Ghana,233,Expresso Ghana Ltd +620,1568,007,127,gh,Ghana,233,GloMobile +620,1568,003,63,gh,Ghana,233,Milicom/Tigo +620,1568,001,31,gh,Ghana,233,MTN +620,1568,002,47,gh,Ghana,233,Vodafone +620,1568,006,111,gh,Ghana,233,ZAIN +266,614,006,111,gi,Gibraltar,350,CTS Mobile +266,614,009,159,gi,Gibraltar,350,eazi telecom +266,614,001,31,gi,Gibraltar,350,Gibtel GSM +202,514,007,127,gr,Greece,30,AMD Telecom SA +202,514,002,47,gr,Greece,30,Cosmote +202,514,001,31,gr,Greece,30,Cosmote +202,514,004,79,gr,Greece,30,Organismos Sidirodromon Ellados (OSE) +202,514,003,63,gr,Greece,30,OTE Hellenic Telecommunications Organization SA +202,514,010,271,gr,Greece,30,Tim/Wind +202,514,009,159,gr,Greece,30,Tim/Wind +202,514,005,95,gr,Greece,30,Vodafone +290,656,001,31,gl,Greenland,299,Tele Greenland +352,850,110,272,gd,Grenada,1473,Cable & Wireless +352,850,030,48,gd,Grenada,1473,Digicel +352,850,050,80,gd,Grenada,1473,Digicel +340,832,008,143,gp,Guadeloupe,590,Dauphin Telecom SU (Guadeloupe Telecom) (Guadeloupe +340,832,020,527,gp,Guadeloupe,590,Digicel Antilles Francaises Guyane SA (Guadeloupe +340,832,001,31,gp,Guadeloupe,590,Orange Caribe +340,832,002,47,gp,Guadeloupe,590,Outremer Telecom Guadeloupe (only) (Guadeloupe +340,832,010,271,gp,Guadeloupe,590,United Telecommunications Services Caraibe SARL (UTS Caraibe Guadeloupe Telephone Mobile) (Guadeloupe +340,832,003,63,gp,Guadeloupe,590,United Telecommunications Services Caraibe SARL (UTS Caraibe Guadeloupe Telephone Mobile) (Guadeloupe +310,784,480,1152,gu,Guam,1671,Choice Phone LLC +310,784,370,880,gu,Guam,1671,Docomo +310,784,470,1136,gu,Guam,1671,Docomo +310,784,140,320,gu,Guam,1671,GTA Wireless +310,784,033,51,gu,Guam,1671,Guam Teleph. Auth. +310,784,032,50,gu,Guam,1671,IT&E OverSeas +311,785,250,592,gu,Guam,1671,Wave Runner LLC +704,1796,001,31,gt,Guatemala,502,SERCOM +704,1796,003,63,gt,Guatemala,502,Telefonica +704,1796,002,47,gt,Guatemala,502,TIGO/COMCEL +611,1553,004,4,gn,Guinea,224,Areeba - MTN +611,1553,005,95,gn,Guinea,224,Celcom +611,1553,003,63,gn,Guinea,224,Intercel +611,1553,001,31,gn,Guinea,224,Orange/Spacetel +611,1553,002,47,gn,Guinea,224,SotelGui +632,1586,000,0,gw,Guinea-Bissau,245,GuineTel +632,1586,001,31,gw,Guinea-Bissau,245,GuineTel +632,1586,003,63,gw,Guinea-Bissau,245,Orange +632,1586,002,47,gw,Guinea-Bissau,245,SpaceTel +738,1848,002,47,gy,Guyana,592,Cellink Plus +738,1848,001,31,gy,Guyana,592,DigiCel +372,882,001,31,ht,Haiti,509,Comcel +372,882,002,47,ht,Haiti,509,Digicel +372,882,003,63,ht,Haiti,509,National Telecom SA (NatCom) +708,1800,040,64,hn,Honduras,504,Digicel +708,1800,030,48,hn,Honduras,504,HonduTel +708,1800,001,1,hn,Honduras,504,SERCOM/CLARO +708,1800,002,2,hn,Honduras,504,Telefonica/CELTEL +454,1108,013,319,hk,Hongkong China,852,China Mobile/Peoples +454,1108,012,303,hk,Hongkong China,852,China Mobile/Peoples +454,1108,009,159,hk,Hongkong China,852,China Motion +454,1108,007,127,hk,Hongkong China,852,China Unicom Ltd +454,1108,011,287,hk,Hongkong China,852,China-HongKong Telecom Ltd (CHKTL) +454,1108,001,31,hk,Hongkong China,852,Citic Telecom Ltd. +454,1108,018,399,hk,Hongkong China,852,CSL Ltd. +454,1108,002,47,hk,Hongkong China,852,CSL Ltd. +454,1108,000,15,hk,Hongkong China,852,CSL Ltd. +454,1108,010,271,hk,Hongkong China,852,CSL/New World PCS Ltd. +454,1108,014,335,hk,Hongkong China,852,H3G/Hutchinson +454,1108,005,95,hk,Hongkong China,852,H3G/Hutchinson +454,1108,004,79,hk,Hongkong China,852,H3G/Hutchinson +454,1108,003,63,hk,Hongkong China,852,H3G/Hutchinson +454,1108,016,367,hk,Hongkong China,852,HKT/PCCW +454,1108,019,415,hk,Hongkong China,852,HKT/PCCW +454,1108,020,527,hk,Hongkong China,852,HKT/PCCW +454,1108,029,671,hk,Hongkong China,852,HKT/PCCW +454,1108,047,1151,hk,Hongkong China,852,shared by private TETRA systems +454,1108,040,1039,hk,Hongkong China,852,shared by private TETRA systems +454,1108,008,143,hk,Hongkong China,852,Trident Telecom Ventures Ltd. +454,1108,017,383,hk,Hongkong China,852,Vodafone/SmarTone +454,1108,015,351,hk,Hongkong China,852,Vodafone/SmarTone +454,1108,006,111,hk,Hongkong China,852,Vodafone/SmarTone +216,534,001,31,hu,Hungary,36,Pannon/Telenor +216,534,030,783,hu,Hungary,36,T-mobile/Magyar +216,534,071,1823,hu,Hungary,36,UPC Magyarorszag Kft. +216,534,070,1807,hu,Hungary,36,Vodafone +274,628,009,159,is,Iceland,354,Amitelo +274,628,007,127,is,Iceland,354,IceCell +274,628,008,143,is,Iceland,354,Landssiminn +274,628,001,31,is,Iceland,354,Landssiminn +274,628,011,287,is,Iceland,354,NOVA +274,628,004,79,is,Iceland,354,VIKING/IMC +274,628,003,63,is,Iceland,354,Vodafone/Tal hf +274,628,005,95,is,Iceland,354,Vodafone/Tal hf +274,628,002,47,is,Iceland,354,Vodafone/Tal hf +404,1028,029,671,in,India,91,Aircel +404,1028,028,655,in,India,91,Aircel +404,1028,025,607,in,India,91,Aircel +404,1028,017,383,in,India,91,Aircel +404,1028,042,1071,in,India,91,Aircel +404,1028,033,831,in,India,91,Aircel +404,1028,001,1,in,India,91,Aircel Digilink India +404,1028,015,351,in,India,91,Aircel Digilink India +404,1028,060,1551,in,India,91,Aircel Digilink India +405,1029,055,1375,in,India,91,AirTel +405,1029,053,1343,in,India,91,AirTel +405,1029,051,1311,in,India,91,AirTel +405,1029,056,1391,in,India,91,Airtel (Bharati Mobile) - Assam +404,1028,086,2159,in,India,91,Barakhamba Sales & Serv. +404,1028,013,319,in,India,91,Barakhamba Sales & Serv. +404,1028,058,1423,in,India,91,BSNL +404,1028,081,2079,in,India,91,BSNL +404,1028,074,1871,in,India,91,BSNL +404,1028,038,911,in,India,91,BSNL +404,1028,057,1407,in,India,91,BSNL +404,1028,080,2063,in,India,91,BSNL +404,1028,073,1855,in,India,91,BSNL +404,1028,034,847,in,India,91,BSNL +404,1028,066,1647,in,India,91,BSNL +404,1028,055,1375,in,India,91,BSNL +404,1028,072,1839,in,India,91,BSNL +404,1028,077,1919,in,India,91,BSNL +404,1028,064,1615,in,India,91,BSNL +404,1028,054,1359,in,India,91,BSNL +404,1028,071,1823,in,India,91,BSNL +404,1028,076,1903,in,India,91,BSNL +404,1028,053,1343,in,India,91,BSNL +404,1028,062,1583,in,India,91,BSNL +404,1028,059,1439,in,India,91,BSNL +404,1028,075,1887,in,India,91,BSNL +404,1028,051,1311,in,India,91,BSNL +405,1029,010,271,in,India,91,Bharti Airtel Limited (Delhi) +404,1028,079,1951,in,India,91,CellOne A&N +404,1028,089,2207,in,India,91,Escorts Telecom Ltd. +404,1028,088,2191,in,India,91,Escorts Telecom Ltd. +404,1028,087,2175,in,India,91,Escorts Telecom Ltd. +404,1028,082,2095,in,India,91,Escorts Telecom Ltd. +404,1028,012,303,in,India,91,Escotel Mobile Communications +404,1028,019,415,in,India,91,Escotel Mobile Communications +404,1028,056,1391,in,India,91,Escotel Mobile Communications +405,1029,005,5,in,India,91,Fascel Limited +404,1028,005,5,in,India,91,Fascel +404,1028,070,1807,in,India,91,Hexacom India +404,1028,016,367,in,India,91,Hexcom India +404,1028,004,4,in,India,91,Idea Cellular Ltd. +404,1028,024,591,in,India,91,Idea Cellular Ltd. +404,1028,022,559,in,India,91,Idea Cellular Ltd. +404,1028,078,1935,in,India,91,Idea Cellular Ltd. +404,1028,007,7,in,India,91,Idea Cellular Ltd. +404,1028,069,1695,in,India,91,Mahanagar Telephone Nigam +404,1028,068,1679,in,India,91,Mahanagar Telephone Nigam +404,1028,083,2111,in,India,91,Reliable Internet Services +405,1029,009,9,in,India,91,RELIANCE TELECOM +404,1028,036,879,in,India,91,Reliance Telecom Private +404,1028,052,1327,in,India,91,Reliance Telecom Private +404,1028,050,1295,in,India,91,Reliance Telecom Private +404,1028,067,1663,in,India,91,Reliance Telecom Private +404,1028,018,399,in,India,91,Reliance Telecom Private +404,1028,085,2143,in,India,91,Reliance Telecom Private +404,1028,009,9,in,India,91,Reliance Telecom Private +404,1028,041,1055,in,India,91,RPG Cellular +404,1028,014,335,in,India,91,Spice +404,1028,044,1103,in,India,91,Spice +404,1028,011,287,in,India,91,Sterling Cellular Ltd. +404,1028,030,783,in,India,91,Usha Martin Telecom +510,1296,008,143,id,Indonesia,62,Axis/Natrindo +510,1296,089,2207,id,Indonesia,62,H3G CP +510,1296,021,543,id,Indonesia,62,Indosat/Satelindo/M3 +510,1296,001,31,id,Indonesia,62,Indosat/Satelindo/M3 +510,1296,000,0,id,Indonesia,62,PT Pasifik Satelit Nusantara (PSN) +510,1296,000,15,id,Indonesia,62,PT Pasifik Satelit Nusantara (PSN) +510,1296,027,639,id,Indonesia,62,PT Sampoerna Telekomunikasi Indonesia (STI) +510,1296,009,159,id,Indonesia,62,PT Smartfren Telecom Tbk +510,1296,028,655,id,Indonesia,62,PT Smartfren Telecom Tbk +510,1296,011,287,id,Indonesia,62,PT. Excelcom +510,1296,010,271,id,Indonesia,62,Telkomsel +901,2305,013,319,n/a,International Networks,882,Antarctica +432,1074,019,415,ir,Iran,98,Mobile Telecommunications Company of Esfahan JV-PJS (MTCE) +432,1074,070,1807,ir,Iran,98,MTCE +432,1074,035,863,ir,Iran,98,MTN/IranCell +432,1074,032,815,ir,Iran,98,Taliya +432,1074,011,287,ir,Iran,98,TCI / MCI +432,1074,014,335,ir,Iran,98,TKC/KFZO +418,1048,005,95,iq,Iraq,964,Asia Cell +418,1048,092,2351,iq,Iraq,964,Itisaluna and Kalemat +418,1048,082,2095,iq,Iraq,964,Korek +418,1048,040,1039,iq,Iraq,964,Korek +418,1048,045,1119,iq,Iraq,964,Mobitel (Iraq-Kurdistan) and Moutiny +418,1048,030,783,iq,Iraq,964,Orascom Telecom +418,1048,020,527,iq,Iraq,964,ZAIN/Atheer +418,1048,008,8,iq,Iraq,964,Sanatel +272,626,004,79,ie,Ireland,353,Access Telecom Ltd. +272,626,009,159,ie,Ireland,353,Clever Communications Ltd +272,626,007,127,ie,Ireland,353,eircom Ltd +272,626,005,95,ie,Ireland,353,H3G +272,626,011,287,ie,Ireland,353,Liffey Telecom +272,626,013,319,ie,Ireland,353,Lycamobile +272,626,003,63,ie,Ireland,353,Meteor Mobile Ltd. +272,626,002,47,ie,Ireland,353,O2/Digifone +272,626,001,31,ie,Ireland,353,Vodafone Eircell +425,1061,014,335,il,Israel,972,Alon Cellular Ltd +425,1061,002,47,il,Israel,972,Cellcom ltd. +425,1061,008,143,il,Israel,972,Golan Telekom +425,1061,015,351,il,Israel,972,Home Cellular Ltd +425,1061,077,1919,il,Israel,972,Hot Mobile/Mirs +425,1061,007,127,il,Israel,972,Hot Mobile/Mirs +425,1061,001,31,il,Israel,972,Orange/Partner Co. Ltd. +425,1061,003,63,il,Israel,972,Pelephone +425,1061,016,367,il,Israel,972,Rami Levy Hashikma Marketing Communications Ltd +222,546,034,847,it,Italy,39,BT Italia SpA +222,546,002,47,it,Italy,39,Elsacom +222,546,099,2463,it,Italy,39,Hi3G +222,546,033,831,it,Italy,39,Hi3G +222,546,077,1919,it,Italy,39,IPSE 2000 +222,546,035,863,it,Italy,39,Lycamobile Srl +222,546,007,127,it,Italy,39,Noverca Italia Srl +222,546,030,783,it,Italy,39,RFI Rete Ferroviaria Italiana SpA +222,546,048,1167,it,Italy,39,Telecom Italia Mobile SpA +222,546,043,1087,it,Italy,39,Telecom Italia Mobile SpA +222,546,001,31,it,Italy,39,TIM +222,546,010,271,it,Italy,39,Vodafone +222,546,006,111,it,Italy,39,Vodafone +222,546,044,1103,it,Italy,39,WIND (Blu) - +222,546,088,2191,it,Italy,39,WIND (Blu) - +612,1554,007,127,ci,Ivory Coast,225,Aircomm SA +612,1554,002,47,ci,Ivory Coast,225,Atlantik Tel./Moov +612,1554,004,79,ci,Ivory Coast,225,Comium +612,1554,001,1,ci,Ivory Coast,225,Comstar +612,1554,005,95,ci,Ivory Coast,225,MTN +612,1554,003,63,ci,Ivory Coast,225,Orange +612,1554,006,111,ci,Ivory Coast,225,OriCell +612,1554,000,0,ci,Ivory Coast,225,Warid +338,824,110,272,jm,Jamaica,1876,Cable & Wireless +338,824,020,32,jm,Jamaica,1876,Cable & Wireless +338,824,180,384,jm,Jamaica,1876,Cable & Wireless +338,824,050,80,jm,Jamaica,1876,DIGICEL/Mossel +440,1088,000,0,jp,Japan,81,eMobile +440,1088,074,1871,jp,Japan,81,KDDI Corporation +440,1088,070,1807,jp,Japan,81,KDDI Corporation +440,1088,089,2207,jp,Japan,81,KDDI Corporation +440,1088,051,1311,jp,Japan,81,KDDI Corporation +440,1088,075,1887,jp,Japan,81,KDDI Corporation +440,1088,056,1391,jp,Japan,81,KDDI Corporation +441,1089,070,1807,jp,Japan,81,KDDI Corporation +440,1088,052,1327,jp,Japan,81,KDDI Corporation +440,1088,076,1903,jp,Japan,81,KDDI Corporation +440,1088,071,1823,jp,Japan,81,KDDI Corporation +440,1088,053,1343,jp,Japan,81,KDDI Corporation +440,1088,077,1919,jp,Japan,81,KDDI Corporation +440,1088,008,143,jp,Japan,81,KDDI Corporation +440,1088,072,1839,jp,Japan,81,KDDI Corporation +440,1088,054,1359,jp,Japan,81,KDDI Corporation +440,1088,079,1951,jp,Japan,81,KDDI Corporation +440,1088,007,127,jp,Japan,81,KDDI Corporation +440,1088,073,1855,jp,Japan,81,KDDI Corporation +440,1088,055,1375,jp,Japan,81,KDDI Corporation +440,1088,088,2191,jp,Japan,81,KDDI Corporation +440,1088,050,1295,jp,Japan,81,KDDI Corporation +440,1088,021,543,jp,Japan,81,NTT Docomo +441,1089,044,1103,jp,Japan,81,NTT Docomo +440,1088,013,319,jp,Japan,81,NTT Docomo +440,1088,023,575,jp,Japan,81,NTT Docomo +440,1088,016,367,jp,Japan,81,NTT Docomo +441,1089,099,2463,jp,Japan,81,NTT Docomo +440,1088,034,847,jp,Japan,81,NTT Docomo +440,1088,069,1695,jp,Japan,81,NTT Docomo +440,1088,064,1615,jp,Japan,81,NTT Docomo +440,1088,037,895,jp,Japan,81,NTT Docomo +440,1088,025,607,jp,Japan,81,NTT Docomo +440,1088,022,559,jp,Japan,81,NTT Docomo +441,1089,043,1087,jp,Japan,81,NTT Docomo +440,1088,027,639,jp,Japan,81,NTT Docomo +440,1088,002,47,jp,Japan,81,NTT Docomo +440,1088,017,383,jp,Japan,81,NTT Docomo +440,1088,031,799,jp,Japan,81,NTT Docomo +440,1088,087,2175,jp,Japan,81,NTT Docomo +440,1088,065,1631,jp,Japan,81,NTT Docomo +440,1088,036,879,jp,Japan,81,NTT Docomo +441,1089,092,2351,jp,Japan,81,NTT Docomo +440,1088,012,303,jp,Japan,81,NTT Docomo +440,1088,058,1423,jp,Japan,81,NTT Docomo +440,1088,028,655,jp,Japan,81,NTT Docomo +440,1088,003,63,jp,Japan,81,NTT Docomo +440,1088,018,399,jp,Japan,81,NTT Docomo +441,1089,091,2335,jp,Japan,81,NTT Docomo +440,1088,032,815,jp,Japan,81,NTT Docomo +440,1088,061,1567,jp,Japan,81,NTT Docomo +440,1088,066,1647,jp,Japan,81,NTT Docomo +440,1088,035,863,jp,Japan,81,NTT Docomo +441,1089,093,2367,jp,Japan,81,NTT Docomo +441,1089,040,1039,jp,Japan,81,NTT Docomo +440,1088,049,1183,jp,Japan,81,NTT Docomo +440,1088,029,671,jp,Japan,81,NTT Docomo +440,1088,009,159,jp,Japan,81,NTT Docomo +440,1088,019,415,jp,Japan,81,NTT Docomo +441,1089,090,2319,jp,Japan,81,NTT Docomo +440,1088,033,831,jp,Japan,81,NTT Docomo +440,1088,060,1551,jp,Japan,81,NTT Docomo +440,1088,014,335,jp,Japan,81,NTT Docomo +441,1089,094,2383,jp,Japan,81,NTT Docomo +441,1089,041,1055,jp,Japan,81,NTT Docomo +440,1088,067,1663,jp,Japan,81,NTT Docomo +440,1088,062,1583,jp,Japan,81,NTT Docomo +440,1088,001,31,jp,Japan,81,NTT Docomo +440,1088,039,927,jp,Japan,81,NTT Docomo +440,1088,030,783,jp,Japan,81,NTT Docomo +440,1088,010,271,jp,Japan,81,NTT Docomo +440,1088,020,527,jp,Japan,81,NTT Docomo +441,1089,045,1119,jp,Japan,81,NTT Docomo +440,1088,024,591,jp,Japan,81,NTT Docomo +440,1088,015,351,jp,Japan,81,NTT Docomo +441,1089,098,2447,jp,Japan,81,NTT Docomo +441,1089,042,1071,jp,Japan,81,NTT Docomo +440,1088,068,1679,jp,Japan,81,NTT Docomo +440,1088,063,1599,jp,Japan,81,NTT Docomo +440,1088,038,911,jp,Japan,81,NTT Docomo +440,1088,026,623,jp,Japan,81,NTT Docomo +440,1088,011,287,jp,Japan,81,NTT Docomo +440,1088,099,2463,jp,Japan,81,NTT Docomo +440,1088,078,1935,jp,Japan,81,Okinawa Cellular Telephone +440,1088,047,1151,jp,Japan,81,SoftBank Mobile Corp +440,1088,095,2399,jp,Japan,81,SoftBank Mobile Corp +440,1088,041,1055,jp,Japan,81,SoftBank Mobile Corp +441,1089,064,1615,jp,Japan,81,SoftBank Mobile Corp +440,1088,046,1135,jp,Japan,81,SoftBank Mobile Corp +440,1088,097,2431,jp,Japan,81,SoftBank Mobile Corp +440,1088,042,1071,jp,Japan,81,SoftBank Mobile Corp +441,1089,065,1631,jp,Japan,81,SoftBank Mobile Corp +440,1088,090,2319,jp,Japan,81,SoftBank Mobile Corp +440,1088,092,2351,jp,Japan,81,SoftBank Mobile Corp +440,1088,098,2447,jp,Japan,81,SoftBank Mobile Corp +440,1088,043,1087,jp,Japan,81,SoftBank Mobile Corp +440,1088,048,1167,jp,Japan,81,SoftBank Mobile Corp +440,1088,093,2367,jp,Japan,81,SoftBank Mobile Corp +440,1088,006,111,jp,Japan,81,SoftBank Mobile Corp +441,1089,061,1567,jp,Japan,81,SoftBank Mobile Corp +440,1088,044,1103,jp,Japan,81,SoftBank Mobile Corp +440,1088,004,79,jp,Japan,81,SoftBank Mobile Corp +440,1088,094,2383,jp,Japan,81,SoftBank Mobile Corp +441,1089,062,1583,jp,Japan,81,SoftBank Mobile Corp +440,1088,045,1119,jp,Japan,81,SoftBank Mobile Corp +440,1088,040,1039,jp,Japan,81,SoftBank Mobile Corp +440,1088,096,2415,jp,Japan,81,SoftBank Mobile Corp +441,1089,063,1599,jp,Japan,81,SoftBank Mobile Corp +440,1088,085,2143,jp,Japan,81,KDDI Corporation +440,1088,083,2111,jp,Japan,81,KDDI Corporation +440,1088,081,2079,jp,Japan,81,KDDI Corporation +440,1088,080,2063,jp,Japan,81,KDDI Corporation +440,1088,086,2159,jp,Japan,81,KDDI Corporation +440,1088,084,2127,jp,Japan,81,KDDI Corporation +440,1088,082,2095,jp,Japan,81,KDDI Corporation +416,1046,077,1919,jo,Jordan,962,Orange/Petra +416,1046,003,63,jo,Jordan,962,Umniah Mobile Co. +416,1046,002,2,jo,Jordan,962,Xpress +416,1046,001,31,jo,Jordan,962,ZAIN /J.M.T.S +401,1025,001,31,kz,Kazakhstan,7,Beeline/KaR-Tel LLP +401,1025,007,127,kz,Kazakhstan,7,Dalacom/Altel +401,1025,002,47,kz,Kazakhstan,7,K-Cell +401,1025,077,1919,kz,Kazakhstan,7,NEO/MTS +639,1593,005,95,ke,Kenya,254,Econet Wireless +639,1593,007,127,ke,Kenya,254,Orange +639,1593,002,47,ke,Kenya,254,Safaricom Ltd. +639,1593,003,63,ke,Kenya,254,Zain/Celtel Ltd. +545,1349,009,9,ki,Kiribati,686,Kiribati Frigate +467,1127,193,403,kp,Korea N. Dem. People's Rep.,850,Sun Net +450,1104,002,47,kr,Korea S Republic of,82,KT Freetel Co. Ltd. +450,1104,004,79,kr,Korea S Republic of,82,KT Freetel Co. Ltd. +450,1104,008,143,kr,Korea S Republic of,82,KT Freetel Co. Ltd. +450,1104,006,111,kr,Korea S Republic of,82,LG Telecom +450,1104,003,63,kr,Korea S Republic of,82,SK Telecom +450,1104,005,95,kr,Korea S Republic of,82,SK Telecom Co. Ltd +419,1049,004,79,kw,Kuwait,965,Viva +419,1049,003,63,kw,Kuwait,965,Wantaniya +419,1049,002,47,kw,Kuwait,965,Zain +437,1079,003,63,kg,Kyrgyzstan,996,AkTel LLC +437,1079,001,31,kg,Kyrgyzstan,996,Beeline/Bitel +437,1079,005,95,kg,Kyrgyzstan,996,MEGACOM +437,1079,009,159,kg,Kyrgyzstan,996,O!/NUR Telecom +457,1111,002,47,la,Laos P.D.R.,856,ETL Mobile +457,1111,001,31,la,Laos P.D.R.,856,Lao Tel +457,1111,008,143,la,Laos P.D.R.,856,Tigo/Millicom +457,1111,003,63,la,Laos P.D.R.,856,UNITEL/LAT +247,583,005,95,lv,Latvia,371,Bite Latvija +247,583,001,31,lv,Latvia,371,Latvian Mobile Phone +247,583,009,159,lv,Latvia,371,SIA Camel Mobile +247,583,008,143,lv,Latvia,371,SIA IZZI +247,583,007,127,lv,Latvia,371,SIA Master Telecom +247,583,006,111,lv,Latvia,371,SIA Rigatta +247,583,002,47,lv,Latvia,371,Tele2 +247,583,003,63,lv,Latvia,371,TRIATEL/Telekom Baltija +415,1045,033,831,lb,Lebanon,961,Cellis +415,1045,032,815,lb,Lebanon,961,Cellis +415,1045,035,863,lb,Lebanon,961,Cellis +415,1045,034,847,lb,Lebanon,961,FTML Cellis +415,1045,039,927,lb,Lebanon,961,MIC2/LibanCell +415,1045,038,911,lb,Lebanon,961,MIC2/LibanCell +415,1045,037,895,lb,Lebanon,961,MIC2/LibanCell +415,1045,001,31,lb,Lebanon,961,MIC1 (Alfa) +415,1045,003,63,lb,Lebanon,961,MIC2/LibanCell +415,1045,036,879,lb,Lebanon,961,MIC2/LibanCell +651,1617,002,47,ls,Lesotho,266,Econet/Ezi-cel +651,1617,001,31,ls,Lesotho,266,Vodacom Lesotho +618,1560,007,127,lr,Liberia,231,Celcom +618,1560,003,63,lr,Liberia,231,Celcom +618,1560,004,79,lr,Liberia,231,Comium BVI +618,1560,002,47,lr,Liberia,231,Libercell +618,1560,020,527,lr,Liberia,231,LibTelco +618,1560,001,31,lr,Liberia,231,Lonestar +606,1542,002,47,ly,Libya,218,Al-Madar +606,1542,001,31,ly,Libya,218,Al-Madar +606,1542,006,111,ly,Libya,218,Hatef +606,1542,000,15,ly,Libya,218,Libyana +606,1542,003,63,ly,Libya,218,Libyana +295,661,006,111,li,Liechtenstein,423,CUBIC (Liechtenstein +295,661,007,127,li,Liechtenstein,423,First Mobile AG +295,661,005,95,li,Liechtenstein,423,Mobilkom AG +295,661,002,47,li,Liechtenstein,423,Orange +295,661,001,31,li,Liechtenstein,423,Swisscom FL AG +295,661,077,1919,li,Liechtenstein,423,Alpmobile/Tele2 +246,582,002,47,lt,Lithuania,370,Bite +246,582,001,31,lt,Lithuania,370,Omnitel +246,582,003,63,lt,Lithuania,370,Tele2 +270,624,077,1919,lu,Luxembourg,352,Millicom Tango GSM +270,624,001,31,lu,Luxembourg,352,P+T LUXGSM +270,624,099,2463,lu,Luxembourg,352,VOXmobile S.A. +455,1109,004,79,mo,Macao China,853,C.T.M. TELEMOVEL+ +455,1109,001,31,mo,Macao China,853,C.T.M. TELEMOVEL+ +455,1109,002,47,mo,Macao China,853,China Telecom +455,1109,005,95,mo,Macao China,853,Hutchison Telephone (Macau) Company Ltd +455,1109,003,63,mo,Macao China,853,Hutchison Telephone (Macau) Company Ltd +455,1109,006,111,mo,Macao China,853,Smartone Mobile +455,1109,000,15,mo,Macao China,853,Smartone Mobile +294,660,075,1887,mk,Macedonia,389,MTS/Cosmofone +294,660,002,47,mk,Macedonia,389,MTS/Cosmofone +294,660,001,31,mk,Macedonia,389,T-Mobile/Mobimak +294,660,003,63,mk,Macedonia,389,VIP Mobile +646,1606,001,31,mg,Madagascar,261,MADACOM +646,1606,002,47,mg,Madagascar,261,Orange/Soci +646,1606,003,63,mg,Madagascar,261,Sacel +646,1606,004,79,mg,Madagascar,261,Telma +650,1616,001,31,mw,Malawi,265,TNM/Telekom Network Ltd. +650,1616,010,271,mw,Malawi,265,Zain/Celtel ltd. +502,1282,001,31,my,Malaysia,60,Art900 +502,1282,151,337,my,Malaysia,60,Baraka Telecom Sdn Bhd +502,1282,013,319,my,Malaysia,60,CelCom +502,1282,019,415,my,Malaysia,60,CelCom +502,1282,016,367,my,Malaysia,60,Digi Telecommunications +502,1282,010,271,my,Malaysia,60,Digi Telecommunications +502,1282,020,527,my,Malaysia,60,Electcoms Wireless Sdn Bhd +502,1282,012,303,my,Malaysia,60,Maxis +502,1282,017,383,my,Malaysia,60,Maxis +502,1282,011,287,my,Malaysia,60,MTX Utara +502,1282,153,339,my,Malaysia,60,Packet One Networks (Malaysia) Sdn Bhd +502,1282,155,341,my,Malaysia,60,Samata Communications Sdn Bhd +502,1282,154,340,my,Malaysia,60,Talk Focus Sdn Bhd +502,1282,018,399,my,Malaysia,60,U Mobile +502,1282,152,338,my,Malaysia,60,YES +472,1138,001,31,mv,Maldives,960,Dhiraagu/C&W +472,1138,002,47,mv,Maldives,960,Wataniya/WMOBILE +610,1552,001,31,ml,Mali,223,Malitel +610,1552,002,47,ml,Mali,223,Orange/IKATEL +278,632,021,543,mt,Malta,356,GO/Mobisle +278,632,077,1919,mt,Malta,356,Melita +278,632,001,31,mt,Malta,356,Vodafone +340,832,002,47,mq,Martinique (French Department of),,Outremer Telecom Martinique (only) (Martinique +340,832,012,303,mq,Martinique (French Department of),,United Telecommunications Services Caraibe SARL (UTS Caraibe Martinique Telephone Mobile) (Martinique +340,832,003,63,mq,Martinique (French Department of),,United Telecommunications Services Caraibe SARL (UTS Caraibe Martinique Telephone Mobile) (Martinique +609,1545,002,47,mr,Mauritania,222,Chinguitel SA +609,1545,001,31,mr,Mauritania,222,Mattel +609,1545,010,271,mr,Mauritania,222,Mauritel +617,1559,010,271,mu,Mauritius,230,Emtel Ltd +617,1559,002,47,mu,Mauritius,230,Mahanagar Telephone +617,1559,003,63,mu,Mauritius,230,Mahanagar Telephone +617,1559,001,31,mu,Mauritius,230,Orange/Cellplus +334,820,000,15,mx,Mexico,52,Axtel +334,820,050,1295,mx,Mexico,52,IUSACell/UneFon +334,820,050,80,mx,Mexico,52,IUSACell/UneFon +334,820,040,64,mx,Mexico,52,IUSACell/UneFon +334,820,004,79,mx,Mexico,52,IUSACell/UneFon +334,820,003,63,mx,Mexico,52,Movistar/Pegaso +334,820,030,48,mx,Mexico,52,Movistar/Pegaso +334,820,001,31,mx,Mexico,52,NEXTEL +334,820,090,144,mx,Mexico,52,NEXTEL +334,820,010,16,mx,Mexico,52,NEXTEL +334,820,080,128,mx,Mexico,52,Operadora Unefon SA de CV +334,820,070,112,mx,Mexico,52,Operadora Unefon SA de CV +334,820,060,96,mx,Mexico,52,SAI PCS +334,820,000,15,mx,Mexico,52,SAI PCS +334,820,002,47,mx,Mexico,52,TelCel/America Movil +334,820,020,32,mx,Mexico,52,TelCel/America Movil +550,1360,001,31,fm,Micronesia,691,FSM Telecom +259,601,004,79,md,Moldova,373,Eventis Mobile +259,601,099,2463,md,Moldova,373,IDC/Unite +259,601,005,95,md,Moldova,373,IDC/Unite +259,601,003,63,md,Moldova,373,IDC/Unite +259,601,002,47,md,Moldova,373,Moldcell +259,601,001,31,md,Moldova,373,Orange/Voxtel +212,530,001,31,mc,Monaco,377,Dardafone LLC +212,530,010,271,mc,Monaco,377,Monaco Telecom +212,530,001,31,mc,Monaco,377,Monaco Telecom +212,530,001,31,mc,Monaco,377,Post and Telecommunications of Kosovo JSC (PTK) +428,1064,098,2447,mn,Mongolia,976,G-Mobile Corporation Ltd +428,1064,099,2463,mn,Mongolia,976,Mobicom +428,1064,000,15,mn,Mongolia,976,Skytel Co. Ltd +428,1064,088,2191,mn,Mongolia,976,Unitel +297,663,002,47,me,Montenegro,382,Monet/T-mobile +297,663,003,63,me,Montenegro,382,Mtel +297,663,001,31,me,Montenegro,382,Promonte GSM +354,852,860,2144,ms,Montserrat,1664,Cable & Wireless +604,1540,001,31,ma,Morocco,212,IAM/Itissallat +604,1540,002,47,ma,Morocco,212,INWI/WANA +604,1540,000,15,ma,Morocco,212,Medi Telecom +643,1603,001,31,mz,Mozambique,258,mCel +643,1603,003,63,mz,Mozambique,258,Movitel +643,1603,004,79,mz,Mozambique,258,Vodacom Sarl +649,1609,003,63,na,Namibia,264,Leo / Orascom +649,1609,001,31,na,Namibia,264,MTC +649,1609,002,47,na,Namibia,264,Switch/Nam. Telec. +429,1065,002,47,np,Nepal,977,Ncell +429,1065,001,31,np,Nepal,977,NT Mobile / Namaste +429,1065,004,79,np,Nepal,977,Smart Cell +204,516,014,335,nl,Netherlands,31,6GMOBILE BV +204,516,023,575,nl,Netherlands,31,Aspider Solutions +204,516,005,95,nl,Netherlands,31,Elephant Talk Communications Premium Rate Services Netherlands BV +204,516,017,383,nl,Netherlands,31,Intercity Mobile Communications BV +204,516,010,271,nl,Netherlands,31,KPN Telecom B.V. +204,516,008,143,nl,Netherlands,31,KPN Telecom B.V. +204,516,069,1695,nl,Netherlands,31,KPN Telecom B.V. +204,516,012,303,nl,Netherlands,31,KPN/Telfort +204,516,028,655,nl,Netherlands,31,Lancelot BV +204,516,009,159,nl,Netherlands,31,Lycamobile Ltd +204,516,006,111,nl,Netherlands,31,Mundio/Vectone Mobile +204,516,021,543,nl,Netherlands,31,NS Railinfrabeheer B.V. +204,516,024,591,nl,Netherlands,31,Private Mobility Nederland BV +204,516,098,2447,nl,Netherlands,31,T-Mobile B.V. +204,516,016,367,nl,Netherlands,31,T-Mobile B.V. +204,516,020,527,nl,Netherlands,31,Orange/T-mobile +204,516,002,47,nl,Netherlands,31,Tele2 +204,516,007,127,nl,Netherlands,31,Teleena Holding BV +204,516,068,1679,nl,Netherlands,31,Unify Mobile +204,516,018,399,nl,Netherlands,31,UPC Nederland BV +204,516,004,79,nl,Netherlands,31,Vodafone Libertel +204,516,003,63,nl,Netherlands,31,Voiceworks Mobile BV +204,516,015,351,nl,Netherlands,31,Ziggo BV +362,866,630,1584,an,Netherlands Antilles,599,Cingular Wireless +362,866,069,1695,an,Netherlands Antilles,599,DigiCell +362,866,051,1311,an,Netherlands Antilles,599,TELCELL GSM +362,866,091,2335,an,Netherlands Antilles,599,SETEL GSM +362,866,951,2385,an,Netherlands Antilles,599,UTS Wireless +546,1350,001,31,nc,New Caledonia,687,OPT Mobilis +530,1328,028,655,nz,New Zealand,64,2degrees +530,1328,005,95,nz,New Zealand,64,Telecom Mobile Ltd +530,1328,002,2,nz,New Zealand,64,NZ Telecom CDMA +530,1328,004,4,nz,New Zealand,64,Telstra +530,1328,024,591,nz,New Zealand,64,Two Degrees Mobile Ltd +530,1328,001,31,nz,New Zealand,64,Vodafone +530,1328,003,3,nz,New Zealand,64,Walker Wireless Ltd. +710,1808,021,543,ni,Nicaragua,505,Empresa Nicaraguense de Telecomunicaciones SA (ENITEL) +710,1808,030,783,ni,Nicaragua,505,Movistar +710,1808,073,1855,ni,Nicaragua,505,Claro +614,1556,003,63,ne,Niger,227,Etisalat/TeleCel +614,1556,004,79,ne,Niger,227,Orange/Sahelc. +614,1556,001,31,ne,Niger,227,Orange/Sahelc. +614,1556,002,47,ne,Niger,227,Zain/CelTel +621,1569,020,527,ng,Nigeria,234,Airtel/ZAIN/Econet +621,1569,060,1551,ng,Nigeria,234,ETISALAT +621,1569,050,1295,ng,Nigeria,234,Glo Mobile +621,1569,040,1039,ng,Nigeria,234,M-Tel/Nigeria Telecom. Ltd. +621,1569,030,783,ng,Nigeria,234,MTN +621,1569,099,2463,ng,Nigeria,234,Starcomms +621,1569,025,607,ng,Nigeria,234,Visafone +621,1569,001,31,ng,Nigeria,234,Visafone +555,1365,001,31,nu,Niue,,Niue Telecom +242,578,009,159,no,Norway,47,Com4 AS +242,578,020,527,no,Norway,47,Jernbaneverket (GSM-R) +242,578,021,543,no,Norway,47,Jernbaneverket (GSM-R) +242,578,023,575,no,Norway,47,Lycamobile Ltd +242,578,002,47,no,Norway,47,Netcom +242,578,022,559,no,Norway,47,Network Norway AS +242,578,005,95,no,Norway,47,Network Norway AS +242,578,006,6,no,Norway,47,ICE Nordisk Mobiltelefon AS +242,578,008,143,no,Norway,47,TDC Mobil A/S +242,578,004,79,no,Norway,47,Tele2 +242,578,012,303,no,Norway,47,Telenor +242,578,001,31,no,Norway,47,Telenor +242,578,003,63,no,Norway,47,Teletopia +242,578,007,127,no,Norway,47,Ventelo AS +422,1058,003,63,om,Oman,968,Nawras +422,1058,002,47,om,Oman,968,Oman Mobile/GTO +410,1040,008,143,pk,Pakistan,92,Instaphone +410,1040,001,31,pk,Pakistan,92,Mobilink +410,1040,006,111,pk,Pakistan,92,Telenor +410,1040,003,63,pk,Pakistan,92,UFONE/PAKTel +410,1040,007,127,pk,Pakistan,92,Warid Telecom +410,1040,004,79,pk,Pakistan,92,ZONG/CMPak +552,1362,080,2063,pw,Palau (Republic of),,Palau Mobile Corp. (PMC) (Palau +552,1362,001,31,pw,Palau (Republic of),,Palau National Communications Corp. (PNCC) (Palau +425,1061,005,95,ps,Palestinian Territory,970,Jawwal +425,1061,006,111,ps,Palestinian Territory,970,Wataniya Mobile +714,1812,001,31,pa,Panama,507,Cable & Wireless S.A. +714,1812,003,63,pa,Panama,507,Claro +714,1812,004,79,pa,Panama,507,Digicel +714,1812,020,32,pa,Panama,507,Movistar +714,1812,002,47,pa,Panama,507,Movistar +537,1335,003,63,pg,Papua New Guinea,675,Digicel +537,1335,002,47,pg,Papua New Guinea,675,GreenCom PNG Ltd +537,1335,001,31,pg,Papua New Guinea,675,Pacific Mobile +744,1860,002,47,py,Paraguay,595,Claro/Hutchison +744,1860,003,63,py,Paraguay,595,Compa +744,1860,001,31,py,Paraguay,595,Hola/VOX +744,1860,005,5,py,Paraguay,595,TIM/Nucleo/Personal +744,1860,004,79,py,Paraguay,595,Tigo/Telecel +716,1814,020,527,pe,Peru,51,Claro /Amer.Mov./TIM +716,1814,010,271,pe,Peru,51,Claro /Amer.Mov./TIM +716,1814,002,47,pe,Peru,51,GlobalStar +716,1814,001,31,pe,Peru,51,GlobalStar +716,1814,006,111,pe,Peru,51,Movistar +716,1814,007,127,pe,Peru,51,Nextel +515,1301,000,15,ph,Philippines,63,Fix Line +515,1301,001,31,ph,Philippines,63,Globe Telecom +515,1301,002,47,ph,Philippines,63,Globe Telecom +515,1301,088,2191,ph,Philippines,63,Next Mobile +515,1301,018,399,ph,Philippines,63,RED Mobile/Cure +515,1301,003,63,ph,Philippines,63,Smart +515,1301,005,95,ph,Philippines,63,SUN/Digitel +260,608,017,383,pl,Poland,48,Aero2 SP. +260,608,018,399,pl,Poland,48,AMD Telecom. +260,608,038,911,pl,Poland,48,CallFreedom Sp. z o.o. +260,608,012,303,pl,Poland,48,Cyfrowy POLSAT S.A. +260,608,008,143,pl,Poland,48,e-Telko +260,608,009,159,pl,Poland,48,Lycamobile +260,608,016,367,pl,Poland,48,Mobyland +260,608,036,879,pl,Poland,48,Mundio Mobile Sp. z o.o. +260,608,007,127,pl,Poland,48,Play/P4 +260,608,011,287,pl,Poland,48,NORDISK Polska +260,608,005,95,pl,Poland,48,Orange/IDEA/Centertel +260,608,003,63,pl,Poland,48,Orange/IDEA/Centertel +260,608,035,863,pl,Poland,48,PKP Polskie Linie Kolejowe S.A. +260,608,098,2447,pl,Poland,48,Play/P4 +260,608,006,111,pl,Poland,48,Play/P4 +260,608,001,31,pl,Poland,48,Polkomtel/Plus +260,608,010,271,pl,Poland,48,Sferia +260,608,014,335,pl,Poland,48,Sferia +260,608,013,319,pl,Poland,48,Sferia +260,608,034,847,pl,Poland,48,T-Mobile/ERA +260,608,002,47,pl,Poland,48,T-Mobile/ERA +260,608,015,351,pl,Poland,48,Tele2 +260,608,004,79,pl,Poland,48,Tele2 +268,616,004,79,pt,Portugal,351,CTT - Correios de Portugal SA +268,616,003,63,pt,Portugal,351,Optimus +268,616,007,127,pt,Portugal,351,Optimus +268,616,006,111,pt,Portugal,351,TMN +268,616,001,31,pt,Portugal,351,Vodafone +330,816,011,287,pr,Puerto Rico,,Puerto Rico Telephone Company Inc. (PRTC) +427,1063,001,31,qa,Qatar,974,Qtel +427,1063,002,47,qa,Qatar,974,Vodafone +647,1607,000,15,re,Reunion,262,Orange +647,1607,002,47,re,Reunion,262,Outremer Telecom +647,1607,010,271,re,Reunion,262,SFR +226,550,003,63,ro,Romania,40,Cosmote +226,550,011,287,ro,Romania,40,Enigma Systems +226,550,010,271,ro,Romania,40,Orange +226,550,005,95,ro,Romania,40,RCS&RDS Digi Mobile +226,550,002,47,ro,Romania,40,Romtelecom SA +226,550,006,111,ro,Romania,40,Telemobil/Zapp +226,550,001,31,ro,Romania,40,Vodafone +226,550,004,79,ro,Romania,40,Telemobil/Zapp +250,592,012,303,ru,Russian Federation,79,Baykal Westcom +250,592,028,655,ru,Russian Federation,79,Bee Line GSM +250,592,010,271,ru,Russian Federation,79,DTC/Don Telecom +250,592,020,527,ru,Russian Federation,79,JSC Rostov Cellular Communications +250,592,013,319,ru,Russian Federation,79,Kuban GSM +250,592,035,863,ru,Russian Federation,79,LLC Ekaterinburg-2000 +250,592,020,527,ru,Russian Federation,79,LLC Personal Communication Systems in the Region +250,592,002,47,ru,Russian Federation,79,Megafon +250,592,001,31,ru,Russian Federation,79,MTS +250,592,003,63,ru,Russian Federation,79,NCC +250,592,016,367,ru,Russian Federation,79,NTC +250,592,019,415,ru,Russian Federation,79,OJSC Altaysvyaz +250,592,099,2463,ru,Russian Federation,79,OJSC Vimpel-Communications (VimpelCom) +250,592,011,287,ru,Russian Federation,79,Orensot +250,592,092,2351,ru,Russian Federation,79,Printelefone +250,592,004,79,ru,Russian Federation,79,Sibchallenge +250,592,044,1103,ru,Russian Federation,79,StavTelesot +250,592,020,527,ru,Russian Federation,79,Tele2/ECC/Volgogr. +250,592,093,2367,ru,Russian Federation,79,Telecom XXL +250,592,039,927,ru,Russian Federation,79,U-Tel/Ermak RMS +250,592,017,383,ru,Russian Federation,79,U-Tel/Ermak RMS +250,592,039,927,ru,Russian Federation,79,UralTel +250,592,017,383,ru,Russian Federation,79,UralTel +250,592,005,95,ru,Russian Federation,79,Yenisey Telecom +250,592,015,351,ru,Russian Federation,79,ZAO SMARTS +250,592,007,127,ru,Russian Federation,79,ZAO SMARTS +635,1589,014,335,rw,Rwanda,250,Airtel Rwanda Ltd +635,1589,010,271,rw,Rwanda,250,MTN/Rwandacell +635,1589,013,319,rw,Rwanda,250,TIGO +356,854,110,272,kn,Saint Kitts and Nevis,1869,Cable & Wireless +356,854,050,1295,kn,Saint Kitts and Nevis,1869,Digicel +356,854,070,1807,kn,Saint Kitts and Nevis,1869,UTS Cariglobe +358,856,110,272,lc,Saint Lucia,1758,Cable & Wireless +358,856,030,783,lc,Saint Lucia,1758,Cingular Wireless +358,856,050,1295,lc,Saint Lucia,1758,Digicel (St Lucia) Limited +549,1353,027,639,ws,Samoa,685,Samoatel Mobile +549,1353,001,31,ws,Samoa,685,Telecom Samoa Cellular Ltd. +292,658,001,31,sm,San Marino,378,Prima Telecom +626,1574,001,31,st,Sao Tome & Principe,239,CSTmovel +901,2305,014,335,n/a,Satellite Networks,870,AeroMobile +901,2305,011,287,n/a,Satellite Networks,870,InMarSAT +901,2305,012,303,n/a,Satellite Networks,870,Maritime Communications Partner AS +901,2305,005,95,n/a,Satellite Networks,870,Thuraya Satellite +420,1056,007,7,sa,Saudi Arabia,966,Zain +420,1056,003,63,sa,Saudi Arabia,966,Etihad/Etisalat/Mobily +420,1056,001,31,sa,Saudi Arabia,966,STC/Al Jawal +420,1056,004,79,sa,Saudi Arabia,966,Zain +608,1544,003,63,sn,Senegal,221,Expresso/Sudatel +608,1544,001,31,sn,Senegal,221,Orange/Sonatel +608,1544,002,47,sn,Senegal,221,Sentel GSM +220,544,003,63,rs,Serbia,381,MTS/Telekom Srbija +220,544,002,47,rs,Serbia,381,Telenor/Mobtel +220,544,001,1,rs,Serbia,381,Telenor/Mobtel +220,544,005,95,rs,Serbia,381,VIP Mobile +633,1587,010,271,sc,Seychelles,248,Airtel +633,1587,001,31,sc,Seychelles,248,C&W +633,1587,002,47,sc,Seychelles,248,Smartcom +619,1561,003,3,sl,Sierra Leone,232,Africel +619,1561,005,5,sl,Sierra Leone,232,Africel +619,1561,001,1,sl,Sierra Leone,232,Zain/Celtel +619,1561,004,4,sl,Sierra Leone,232,Comium +619,1561,002,2,sl,Sierra Leone,232,Tigo/Millicom +619,1561,025,607,sl,Sierra Leone,232,Mobitel +525,1317,012,303,sg,Singapore,65,GRID Communications Pte Ltd +525,1317,003,63,sg,Singapore,65,MobileOne Ltd +525,1317,001,31,sg,Singapore,65,Singtel +525,1317,007,127,sg,Singapore,65,Singtel +525,1317,002,47,sg,Singapore,65,Singtel +525,1317,006,111,sg,Singapore,65,Starhub +525,1317,005,95,sg,Singapore,65,Starhub +362,866,051,1311,sx,Sint Maarten (Dutch part),,TelCell NV (Sint Maarten +362,866,091,2335,sx,Sint Maarten (Dutch part),,UTS St. Maarten (Sint Maarten +231,561,006,111,sk,Slovakia,421,O2 +231,561,001,31,sk,Slovakia,421,Orange +231,561,005,95,sk,Slovakia,421,Orange +231,561,015,351,sk,Slovakia,421,Orange +231,561,002,47,sk,Slovakia,421,T-Mobile +231,561,004,79,sk,Slovakia,421,T-Mobile +231,561,099,2463,sk,Slovakia,421,Zeleznice Slovenskej republiky (ZSR) +293,659,041,1055,si,Slovenia,386,Dukagjini Telecommunications Sh.P.K. +293,659,041,1055,si,Slovenia,386,Ipko Telecommunications d. o. o. +293,659,041,1055,si,Slovenia,386,Mobitel +293,659,040,1039,si,Slovenia,386,SI.Mobil +293,659,010,271,si,Slovenia,386,Slovenske zeleznice d.o.o. +293,659,064,1615,si,Slovenia,386,T-2 d.o.o. +293,659,070,1807,si,Slovenia,386,TusMobil/VEGA +540,1344,002,47,sb,Solomon Islands,677,bemobile +540,1344,010,271,sb,Solomon Islands,677,BREEZE +540,1344,001,31,sb,Solomon Islands,677,BREEZE +637,1591,030,783,so,Somalia,252,Golis +637,1591,019,415,so,Somalia,252,HorTel +637,1591,060,1551,so,Somalia,252,Nationlink +637,1591,010,271,so,Somalia,252,Nationlink +637,1591,004,4,so,Somalia,252,Somafone +637,1591,082,2095,so,Somalia,252,Telcom Mobile Somalia +637,1591,001,31,so,Somalia,252,Telesom +655,1621,002,47,za,South Africa,27,8.ta +655,1621,021,543,za,South Africa,27,Cape Town Metropolitan +655,1621,007,127,za,South Africa,27,Cell C +655,1621,012,303,za,South Africa,27,MTN +655,1621,010,271,za,South Africa,27,MTN +655,1621,006,111,za,South Africa,27,Sentech +655,1621,001,31,za,South Africa,27,Vodacom +655,1621,019,415,za,South Africa,27,Wireless Business Solutions (Pty) Ltd +659,1625,003,63,ss,South Sudan (Republic of),,Gemtel Ltd (South Sudan +659,1625,002,47,ss,South Sudan (Republic of),,MTN South Sudan (South Sudan +659,1625,004,79,ss,South Sudan (Republic of),,Network of The World Ltd (NOW) (South Sudan +659,1625,006,111,ss,South Sudan (Republic of),,Zain South Sudan (South Sudan +214,532,023,575,es,Spain,34,Lycamobile SL +214,532,022,559,es,Spain,34,Movistar +214,532,015,351,es,Spain,34,BT Espana Compania de Servicios Globales de Telecomunicaciones SAU +214,532,018,399,es,Spain,34,Cableuropa SAU (ONO) +214,532,008,143,es,Spain,34,Euskaltel SA +214,532,020,527,es,Spain,34,fonYou Wireless SL +214,532,021,543,es,Spain,34,Jazz Telecom SAU +214,532,026,623,es,Spain,34,Lleida +214,532,025,607,es,Spain,34,Lycamobile SL +214,532,007,127,es,Spain,34,Movistar2 +214,532,005,95,es,Spain,34,Movistar +214,532,009,159,es,Spain,34,Orange +214,532,003,63,es,Spain,34,Orange2 +214,532,011,287,es,Spain,34,Orange +214,532,017,383,es,Spain,34,R Cable y Telecomunicaciones Galicia SA +214,532,019,415,es,Spain,34,Simyo/KPN +214,532,016,367,es,Spain,34,Telecable de Asturias SA +214,532,027,639,es,Spain,34,Truphone +214,532,001,31,es,Spain,34,Vodafone +214,532,006,111,es,Spain,34,Vodafone Enabler Espana SL +214,532,004,79,es,Spain,34,Yoigo +413,1043,005,95,lk,Sri Lanka,94,Bharti Airtel +413,1043,003,63,lk,Sri Lanka,94,Etisalat/Tigo +413,1043,008,143,lk,Sri Lanka,94,H3G Hutchison +413,1043,001,31,lk,Sri Lanka,94,Mobitel Ltd. +413,1043,002,47,lk,Sri Lanka,94,MTN/Dialog +308,776,001,31,pm,St. Pierre & Miquelon,508,Ameris +360,864,110,272,vc,St. Vincent & Gren.,1784,C & W +360,864,010,271,vc,St. Vincent & Gren.,1784,Cingular +360,864,100,256,vc,St. Vincent & Gren.,1784,Cingular +360,864,050,80,vc,St. Vincent & Gren.,1784,Digicel +360,864,070,1807,vc,St. Vincent & Gren.,1784,Digicel +634,1588,000,15,sd,Sudan,249,Canar Telecom +634,1588,022,559,sd,Sudan,249,MTN +634,1588,002,47,sd,Sudan,249,MTN +634,1588,015,351,sd,Sudan,249,Sudani One +634,1588,007,127,sd,Sudan,249,Sudani One +634,1588,005,95,sd,Sudan,249,Vivacell +634,1588,008,143,sd,Sudan,249,Vivacell +634,1588,001,31,sd,Sudan,249,ZAIN/Mobitel +634,1588,006,111,sd,Sudan,249,ZAIN/Mobitel +746,1862,003,63,sr,Suriname,597,Digicel +746,1862,002,47,sr,Suriname,597,Telecommunicatiebedrijf Suriname (TELESUR) +746,1862,001,1,sr,Suriname,597,Telesur +746,1862,004,79,sr,Suriname,597,UNIQA +653,1619,010,271,sz,Swaziland,268,Swazi MTN +653,1619,001,31,sz,Swaziland,268,SwaziTelecom +240,576,035,863,se,Sweden,46,42 Telecom AB +240,576,016,367,se,Sweden,46,42 Telecom AB +240,576,026,623,se,Sweden,46,Beepsend +240,576,000,15,se,Sweden,46,Compatel +240,576,028,655,se,Sweden,46,CoolTEL Aps +240,576,025,607,se,Sweden,46,Digitel Mobile Srl +240,576,022,559,se,Sweden,46,Eu Tel AB +240,576,027,639,se,Sweden,46,Fogg Mobile AB +240,576,018,399,se,Sweden,46,Generic Mobile Systems Sweden AB +240,576,017,383,se,Sweden,46,Gotalandsnatet AB +240,576,002,47,se,Sweden,46,H3G Access AB +240,576,004,79,se,Sweden,46,H3G Access AB +240,576,036,879,se,Sweden,46,ID Mobile +240,576,023,575,se,Sweden,46,Infobip Ltd. +240,576,011,287,se,Sweden,46,Lindholmen Science Park AB +240,576,012,303,se,Sweden,46,Lycamobile Ltd +240,576,029,671,se,Sweden,46,Mercury International Carrier Services +240,576,003,63,se,Sweden,46,Orange +240,576,010,271,se,Sweden,46,Spring Mobil AB +240,576,014,335,se,Sweden,46,TDC Sverige AB +240,576,007,127,se,Sweden,46,Tele2 Sverige AB +240,576,005,95,se,Sweden,46,Tele2 Sverige AB +240,576,024,591,se,Sweden,46,Tele2 Sverige AB +240,576,024,591,se,Sweden,46,Telenor (Vodafone) +240,576,008,143,se,Sweden,46,Telenor (Vodafone) +240,576,004,79,se,Sweden,46,Telenor (Vodafone) +240,576,006,111,se,Sweden,46,Telenor (Vodafone) +240,576,009,159,se,Sweden,46,Telenor Mobile Sverige AS +240,576,005,95,se,Sweden,46,Telia Mobile +240,576,001,31,se,Sweden,46,Telia Mobile +240,576,000,15,se,Sweden,46,EUTel +240,576,008,143,se,Sweden,46,Timepiece Servicos De Consultoria LDA (Universal Telecom) +240,576,013,319,se,Sweden,46,Ventelo Sverige AB +240,576,020,527,se,Sweden,46,Wireless Maingate AB +240,576,015,351,se,Sweden,46,Wireless Maingate Nordic AB +228,552,051,1311,ch,Switzerland,41,BebbiCell AG +228,552,009,159,ch,Switzerland,41,Comfone AG +228,552,005,95,ch,Switzerland,41,Comfone AG +228,552,007,127,ch,Switzerland,41,TDC Sunrise +228,552,054,1359,ch,Switzerland,41,Lycamobile AG +228,552,052,1327,ch,Switzerland,41,Mundio Mobile AG +228,552,003,63,ch,Switzerland,41,Orange +228,552,001,31,ch,Switzerland,41,Swisscom +228,552,012,303,ch,Switzerland,41,TDC Sunrise +228,552,002,47,ch,Switzerland,41,TDC Sunrise +228,552,008,143,ch,Switzerland,41,TDC Sunrise +228,552,053,1343,ch,Switzerland,41,upc cablecom GmbH +417,1047,002,47,sy,Syrian Arab Republic,963,MTN/Spacetel +417,1047,009,159,sy,Syrian Arab Republic,963,Syriatel Holdings +417,1047,001,31,sy,Syrian Arab Republic,963,Syriatel Holdings +466,1126,068,1679,tw,Taiwan,886,ACeS Taiwan - ACeS Taiwan Telecommunications Co Ltd +466,1126,005,95,tw,Taiwan,886,Asia Pacific Telecom Co. Ltd (APT) +466,1126,011,287,tw,Taiwan,886,Chunghwa Telecom LDM +466,1126,092,2351,tw,Taiwan,886,Chunghwa Telecom LDM +466,1126,002,47,tw,Taiwan,886,Far EasTone +466,1126,001,31,tw,Taiwan,886,Far EasTone +466,1126,007,127,tw,Taiwan,886,Far EasTone +466,1126,006,111,tw,Taiwan,886,Far EasTone +466,1126,003,63,tw,Taiwan,886,Far EasTone +466,1126,010,271,tw,Taiwan,886,Global Mobile Corp. +466,1126,056,1391,tw,Taiwan,886,International Telecom Co. Ltd (FITEL) +466,1126,088,2191,tw,Taiwan,886,KG Telecom +466,1126,099,2463,tw,Taiwan,886,TransAsia +466,1126,097,2431,tw,Taiwan,886,Taiwan Cellular +466,1126,093,2367,tw,Taiwan,886,Mobitai +466,1126,089,2207,tw,Taiwan,886,VIBO +466,1126,009,159,tw,Taiwan,886,VMAX Telecom Co. Ltd +436,1078,004,79,tj,Tajikistan,992,Babilon-M +436,1078,005,95,tj,Tajikistan,992,Bee Line +436,1078,002,47,tj,Tajikistan,992,CJSC Indigo Tajikistan +436,1078,012,303,tj,Tajikistan,992,Tcell/JC Somoncom +436,1078,003,63,tj,Tajikistan,992,MLT/TT mobile +436,1078,001,31,tj,Tajikistan,992,Tcell/JC Somoncom +640,1600,008,143,tz,Tanzania,255,Benson Informatics Ltd +640,1600,006,111,tz,Tanzania,255,Dovetel (T) Ltd +640,1600,009,159,tz,Tanzania,255,ExcellentCom (T) Ltd +640,1600,011,287,tz,Tanzania,255,Smile Communications Tanzania Ltd +640,1600,007,127,tz,Tanzania,255,Tanzania Telecommunications Company Ltd (TTCL) +640,1600,002,47,tz,Tanzania,255,TIGO/MIC +640,1600,001,1,tz,Tanzania,255,Tri Telecomm. Ltd. +640,1600,004,79,tz,Tanzania,255,Vodacom Ltd +640,1600,005,95,tz,Tanzania,255,ZAIN/Celtel +640,1600,003,63,tz,Tanzania,255,Zantel/Zanzibar Telecom +520,1312,020,527,th,Thailand,66,ACeS Thailand - ACeS Regional Services Co Ltd +520,1312,015,351,th,Thailand,66,ACT Mobile +520,1312,003,63,th,Thailand,66,Advanced Wireless Networks/AWN +520,1312,001,31,th,Thailand,66,AIS/Advanced Info Service +520,1312,023,575,th,Thailand,66,Digital Phone Co. +520,1312,000,15,th,Thailand,66,Hutch/CAT CDMA +520,1312,018,399,th,Thailand,66,Total Access (DTAC) +520,1312,005,95,th,Thailand,66,Total Access (DTAC) +520,1312,004,79,th,Thailand,66,True Move/Orange +520,1312,099,2463,th,Thailand,66,True Move/Orange +514,1300,001,31,tl,Timor-Leste,670,Telin/ Telkomcel +514,1300,002,47,tl,Timor-Leste,670,Timor Telecom +615,1557,002,2,tg,Togo,228,Telecel/MOOV +615,1557,003,63,tg,Togo,228,Telecel/MOOV +615,1557,001,31,tg,Togo,228,Togo Telecom/TogoCELL +539,1337,043,1087,to,Tonga,676,Shoreline Communication +539,1337,001,1,to,Tonga,676,Tonga Communications +374,884,129,297,tt,Trinidad and Tobago,1868,Bmobile/TSTT +374,884,130,304,tt,Trinidad and Tobago,1868,Digicel +374,884,140,320,tt,Trinidad and Tobago,1868,LaqTel Ltd. +605,1541,001,31,tn,Tunisia,216,Orange +605,1541,003,63,tn,Tunisia,216,Orascom Telecom +605,1541,002,47,tn,Tunisia,216,Tunisie Telecom +286,646,004,79,tr,Turkey,90,AVEA/Aria +286,646,003,63,tr,Turkey,90,AVEA/Aria +286,646,001,31,tr,Turkey,90,Turkcell +286,646,002,47,tr,Turkey,90,Vodafone-Telsim +438,1080,001,31,tm,Turkmenistan,993,Barash Communication +438,1080,002,47,tm,Turkmenistan,993,TM-Cell +376,886,350,848,tc,Turks and Caicos Islands,,Cable & Wireless (TCI) Ltd +376,886,050,80,tc,Turks and Caicos Islands,,Digicel TCI Ltd +376,886,352,850,tc,Turks and Caicos Islands,,IslandCom Communications Ltd. +553,1363,001,31,tv,Tuvalu,,Tuvalu Telecommunication Corporation (TTC) +641,1601,001,31,ug,Uganda,256,Celtel +641,1601,066,1647,ug,Uganda,256,i-Tel Ltd +641,1601,030,783,ug,Uganda,256,K2 Telecom Ltd +641,1601,010,271,ug,Uganda,256,MTN Ltd. +641,1601,014,335,ug,Uganda,256,Orange +641,1601,033,831,ug,Uganda,256,Smile Communications Uganda Ltd +641,1601,018,399,ug,Uganda,256,Suretelecom Uganda Ltd +641,1601,011,287,ug,Uganda,256,Uganda Telecom Ltd. +641,1601,022,559,ug,Uganda,256,Airtel/Warid +255,597,006,111,ua,Ukraine,380,Astelit/LIFE +255,597,005,95,ua,Ukraine,380,Golden Telecom +255,597,039,927,ua,Ukraine,380,Golden Telecom +255,597,004,79,ua,Ukraine,380,Intertelecom Ltd (IT) +255,597,067,1663,ua,Ukraine,380,KyivStar +255,597,003,63,ua,Ukraine,380,KyivStar +255,597,021,543,ua,Ukraine,380,Telesystems Of Ukraine CJSC (TSU) +255,597,007,127,ua,Ukraine,380,TriMob LLC +255,597,050,1295,ua,Ukraine,380,UMC/MTS +255,597,002,47,ua,Ukraine,380,Beeline +255,597,001,31,ua,Ukraine,380,UMC/MTS +255,597,068,1679,ua,Ukraine,380,Beeline +424,1060,003,63,ae,United Arab Emirates,971,DU +431,1073,002,47,ae,United Arab Emirates,971,Etisalat +430,1072,002,47,ae,United Arab Emirates,971,Etisalat +424,1060,002,47,ae,United Arab Emirates,971,Etisalat +234,564,003,63,gb,United Kingdom,44,Airtel/Vodafone +234,564,076,1903,gb,United Kingdom,44,BT Group +234,564,077,1919,gb,United Kingdom,44,BT Group +234,564,007,127,gb,United Kingdom,44,Cable and Wireless +234,564,092,2351,gb,United Kingdom,44,Cable and Wireless +234,564,036,879,gb,United Kingdom,44,Calbe and Wireless Isle of Man +234,564,018,399,gb,United Kingdom,44,Cloud9/wire9 Tel. +235,565,002,47,gb,United Kingdom,44,Everyth. Ev.wh. +234,564,017,383,gb,United Kingdom,44,FlexTel +234,564,055,1375,gb,United Kingdom,44,Guernsey Telecoms +234,564,014,335,gb,United Kingdom,44,HaySystems +234,564,094,2383,gb,United Kingdom,44,Hutchinson 3G +234,564,020,527,gb,United Kingdom,44,Hutchinson 3G +234,564,075,1887,gb,United Kingdom,44,Inquam Telecom Ltd +234,564,050,1295,gb,United Kingdom,44,Jersey Telecom +234,564,035,863,gb,United Kingdom,44,JSC Ingenicum +234,564,026,623,gb,United Kingdom,44,Lycamobile +234,564,058,1423,gb,United Kingdom,44,Manx Telecom +234,564,001,31,gb,United Kingdom,44,Mapesbury C. Ltd +234,564,028,655,gb,United Kingdom,44,Marthon Telecom +234,564,010,271,gb,United Kingdom,44,O2 Ltd. +234,564,002,47,gb,United Kingdom,44,O2 Ltd. +234,564,011,287,gb,United Kingdom,44,O2 Ltd. +234,564,008,143,gb,United Kingdom,44,OnePhone +234,564,016,367,gb,United Kingdom,44,Opal Telecom +234,564,034,847,gb,United Kingdom,44,Everyth. Ev.wh./Orange +234,564,033,831,gb,United Kingdom,44,Everyth. Ev.wh./Orange +234,564,019,415,gb,United Kingdom,44,PMN/Teleware +234,564,012,303,gb,United Kingdom,44,Railtrack Plc +234,564,022,559,gb,United Kingdom,44,Routotelecom +234,564,024,591,gb,United Kingdom,44,Stour Marine +234,564,037,895,gb,United Kingdom,44,Synectiv Ltd. +234,564,031,799,gb,United Kingdom,44,Everyth. Ev.wh./T-Mobile +234,564,030,783,gb,United Kingdom,44,Everyth. Ev.wh./T-Mobile +234,564,032,815,gb,United Kingdom,44,Everyth. Ev.wh./T-Mobile +234,564,027,639,gb,United Kingdom,44,Vodafone +234,564,009,159,gb,United Kingdom,44,Tismi +234,564,025,607,gb,United Kingdom,44,Truphone +234,564,051,1311,gb,United Kingdom,44,Jersey Telecom +234,564,023,575,gb,United Kingdom,44,Vectofone Mobile Wifi +234,564,015,351,gb,United Kingdom,44,Vodafone +234,564,091,2335,gb,United Kingdom,44,Vodafone +234,564,078,1935,gb,United Kingdom,44,Wave Telecom Ltd +310,784,050,80,us,United States,1, +310,784,880,2176,us,United States,1, +310,784,850,2128,us,United States,1,Aeris Comm. Inc. +310,784,640,1600,us,United States,1, +310,784,510,1296,us,United States,1,Airtel Wireless LLC +310,784,190,400,us,United States,1,Unknown +312,786,090,144,us,United States,1,Allied Wireless Communications Corporation +311,785,130,304,us,United States,1, +311,785,030,48,us,United States,1,Americell PA3 LP +310,784,710,1808,us,United States,1,Arctic Slope Telephone Association Cooperative Inc. +310,784,380,896,us,United States,1,AT&T Wireless Inc. +310,784,170,368,us,United States,1,AT&T Wireless Inc. +310,784,150,336,us,United States,1,AT&T Wireless Inc. +310,784,680,1664,us,United States,1,AT&T Wireless Inc. +310,784,070,112,us,United States,1,AT&T Wireless Inc. +310,784,560,1376,us,United States,1,AT&T Wireless Inc. +310,784,410,1040,us,United States,1,AT&T Wireless Inc. +310,784,980,2432,us,United States,1,AT&T Wireless Inc. +311,785,440,1088,us,United States,1,Bluegrass Wireless LLC +311,785,810,2064,us,United States,1,Bluegrass Wireless LLC +311,785,800,2048,us,United States,1,Bluegrass Wireless LLC +310,784,900,2304,us,United States,1,Cable & Communications Corp. +311,785,590,1424,us,United States,1,California RSA No. 3 Limited Partnership +311,785,500,1280,us,United States,1,Cambridge Telephone Company Inc. +310,784,830,2096,us,United States,1,Caprock Cellular Ltd. +311,785,272,626,us,United States,1,Verizon Wireless +311,785,288,648,us,United States,1,Verizon Wireless +311,785,277,631,us,United States,1,Verizon Wireless +311,785,482,1154,us,United States,1,Verizon Wireless +310,784,590,1424,us,United States,1,Verizon Wireless +311,785,282,642,us,United States,1,Verizon Wireless +311,785,487,1159,us,United States,1,Verizon Wireless +311,785,271,625,us,United States,1,Verizon Wireless +311,785,287,647,us,United States,1,Verizon Wireless +311,785,276,630,us,United States,1,Verizon Wireless +311,785,481,1153,us,United States,1,Verizon Wireless +310,784,013,19,us,United States,1,Verizon Wireless +311,785,281,641,us,United States,1,Verizon Wireless +311,785,486,1158,us,United States,1,Verizon Wireless +311,785,270,624,us,United States,1,Verizon Wireless +311,785,286,646,us,United States,1,Verizon Wireless +311,785,275,629,us,United States,1,Verizon Wireless +311,785,480,1152,us,United States,1,Verizon Wireless +310,784,012,18,us,United States,1,Verizon Wireless +311,785,280,640,us,United States,1,Verizon Wireless +311,785,485,1157,us,United States,1,Verizon Wireless +311,785,110,272,us,United States,1,Verizon Wireless +311,785,285,645,us,United States,1,Verizon Wireless +311,785,274,628,us,United States,1,Verizon Wireless +311,785,390,912,us,United States,1,Verizon Wireless +310,784,010,16,us,United States,1,Verizon Wireless +311,785,279,633,us,United States,1,Verizon Wireless +311,785,484,1156,us,United States,1,Verizon Wireless +310,784,910,2320,us,United States,1,Verizon Wireless +311,785,284,644,us,United States,1,Verizon Wireless +311,785,489,1161,us,United States,1,Verizon Wireless +311,785,273,627,us,United States,1,Verizon Wireless +311,785,289,649,us,United States,1,Verizon Wireless +310,784,004,4,us,United States,1,Verizon Wireless +311,785,278,632,us,United States,1,Verizon Wireless +311,785,483,1155,us,United States,1,Verizon Wireless +310,784,890,2192,us,United States,1,Verizon Wireless +311,785,283,643,us,United States,1,Verizon Wireless +311,785,488,1160,us,United States,1,Verizon Wireless +312,786,280,640,us,United States,1,Cellular Network Partnership LLC +312,786,270,624,us,United States,1,Cellular Network Partnership LLC +310,784,360,864,us,United States,1,Cellular Network Partnership LLC +311,785,190,400,us,United States,1, +310,784,230,560,us,United States,1,Cellular South Licenses Inc. +310,784,030,48,us,United States,1, +311,785,120,288,us,United States,1,Choice Phone LLC +310,784,480,1152,us,United States,1,Choice Phone LLC +310,784,630,1584,us,United States,1, +310,784,420,1056,us,United States,1,Cincinnati Bell Wireless LLC +310,784,180,384,us,United States,1,Cingular Wireless +310,784,620,1568,us,United States,1,Coleman County Telco /Trans TX +311,785,040,64,us,United States,1, +310,784,006,6,us,United States,1,Consolidated Telcom +310,784,060,1551,us,United States,1,Consolidated Telcom +312,786,380,896,us,United States,1, +310,784,930,2352,us,United States,1, +311,785,240,576,us,United States,1, +310,784,008,8,us,United States,1,Unknown +310,784,080,128,us,United States,1, +310,784,700,1792,us,United States,1,Cross Valliant Cellular Partnership +311,785,140,320,us,United States,1,Cross Wireless Telephone Co. +312,786,030,48,us,United States,1,Cross Wireless Telephone Co. +311,785,520,1312,us,United States,1, +311,785,810,2064,us,United States,1,Cumberland Cellular Partnership +311,785,800,2048,us,United States,1,Cumberland Cellular Partnership +311,785,440,1088,us,United States,1,Cumberland Cellular Partnership +312,786,040,64,us,United States,1,Custer Telephone Cooperative Inc. +310,784,016,22,us,United States,1,Denali Spectrum License LLC +310,784,440,1088,us,United States,1,Dobson Cellular Systems +310,784,990,2448,us,United States,1,E.N.M.R. Telephone Coop. +312,786,130,304,us,United States,1,East Kentucky Network LLC +312,786,120,288,us,United States,1,East Kentucky Network LLC +310,784,750,1872,us,United States,1,East Kentucky Network LLC +310,784,009,9,us,United States,1,Edge Wireless LLC +310,784,090,144,us,United States,1,Edge Wireless LLC +310,784,610,1552,us,United States,1,Elkhart TelCo. / Epic Touch Co. +311,785,210,528,us,United States,1, +311,785,311,785,us,United States,1,Farmers +311,785,460,1120,us,United States,1,Fisher Wireless Services Inc. +311,785,370,880,us,United States,1,GCI Communication Corp. +310,784,430,1072,us,United States,1,GCI Communication Corp. +310,784,920,2336,us,United States,1,Get Mobile Inc. +310,784,970,2416,us,United States,1, +310,784,007,127,us,United States,1,Unknown +311,785,250,592,us,United States,1,i CAN_GSM +311,785,340,832,us,United States,1,Illinois Valley Cellular RSA 2 Partnership +311,785,030,48,us,United States,1, +312,786,170,368,us,United States,1,Iowa RSA No. 2 Limited Partnership +311,785,410,1040,us,United States,1,Iowa RSA No. 2 Limited Partnership +310,784,770,1904,us,United States,1,Iowa Wireless Services LLC +310,784,650,1616,us,United States,1,Jasper +310,784,870,2160,us,United States,1,Kaplan Telephone Company Inc. +311,785,810,2064,us,United States,1,Kentucky RSA #3 Cellular General Partnership +311,785,800,2048,us,United States,1,Kentucky RSA #3 Cellular General Partnership +311,785,440,1088,us,United States,1,Kentucky RSA #3 Cellular General Partnership +311,785,440,1088,us,United States,1,Kentucky RSA #4 Cellular General Partnership +311,785,810,2064,us,United States,1,Kentucky RSA #4 Cellular General Partnership +311,785,800,2048,us,United States,1,Kentucky RSA #4 Cellular General Partnership +312,786,180,384,us,United States,1,Keystone Wireless LLC +310,784,690,1680,us,United States,1,Keystone Wireless LLC +311,785,310,784,us,United States,1,Lamar County Cellular +310,784,016,22,us,United States,1,LCW Wireless Operations LLC +310,784,016,22,us,United States,1,Leap Wireless International Inc. +311,785,090,144,us,United States,1, +310,784,040,64,us,United States,1,Matanuska Tel. Assn. Inc. +310,784,780,1920,us,United States,1,Message Express Co. / Airlink PCS +311,785,660,1632,us,United States,1, +311,785,330,816,us,United States,1,Michigan Wireless LLC +311,785,000,0,us,United States,1, +311,785,390,912,us,United States,1, +310,784,400,1024,us,United States,1,Minnesota South. Wirel. Co. / Hickory +312,786,010,16,us,United States,1,Missouri RSA No 5 Partnership +311,785,920,2336,us,United States,1,Missouri RSA No 5 Partnership +311,785,020,32,us,United States,1,Missouri RSA No 5 Partnership +311,785,010,16,us,United States,1,Missouri RSA No 5 Partnership +312,786,220,544,us,United States,1,Missouri RSA No 5 Partnership +310,784,350,848,us,United States,1,Mohave Cellular LP +310,784,570,1392,us,United States,1,MTPCS LLC +310,784,290,656,us,United States,1,NEP Cellcorp Inc. +310,784,034,847,us,United States,1,Nevada Wireless LLC +311,785,380,896,us,United States,1, +310,784,600,1536,us,United States,1,New-Cell Inc. +311,785,100,256,us,United States,1, +311,785,300,768,us,United States,1,Nexus Communications Inc. +310,784,130,304,us,United States,1,North Carolina RSA 3 Cellular Tel. Co. +312,786,230,560,us,United States,1,North Dakota Network Company +311,785,610,1552,us,United States,1,North Dakota Network Company +310,784,450,1104,us,United States,1,Northeast Colorado Cellular Inc. +311,785,710,1808,us,United States,1,Northeast Wireless Networks LLC +310,784,670,1648,us,United States,1,Northstar +310,784,011,17,us,United States,1,Northstar +311,785,420,1056,us,United States,1,Northwest Missouri Cellular Limited Partnership +310,784,540,1344,us,United States,1, +310,784,740,1856,us,United States,1, +310,784,760,1888,us,United States,1,Panhandle Telephone Cooperative Inc. +310,784,580,1408,us,United States,1,PCS ONE +311,785,170,368,us,United States,1,PetroCom +311,785,670,1648,us,United States,1,Pine Belt Cellular Inc. +311,785,080,128,us,United States,1, +310,784,790,1936,us,United States,1, +310,784,100,256,us,United States,1,Plateau Telecommunications Inc. +310,784,940,2368,us,United States,1,Poka Lambro Telco Ltd. +311,785,540,1344,us,United States,1, +311,785,730,1840,us,United States,1, +310,784,500,1280,us,United States,1,Public Service Cellular Inc. +312,786,160,352,us,United States,1,RSA 1 Limited Partnership +311,785,430,1072,us,United States,1,RSA 1 Limited Partnership +311,785,350,848,us,United States,1,Sagebrush Cellular Inc. +311,785,030,48,us,United States,1,Sagir Inc. +311,785,910,2320,us,United States,1, +310,784,046,1135,us,United States,1,SIMMETRY +311,785,260,608,us,United States,1,SLO Cellular Inc / Cellular One of San Luis +310,784,320,800,us,United States,1,Smith Bagley Inc. +310,784,015,351,us,United States,1,Unknown +316,790,011,17,us,United States,1,Southern Communications Services Inc. +310,784,002,2,us,United States,1,Sprint Spectrum +312,786,190,400,us,United States,1,Sprint Spectrum +311,785,880,2176,us,United States,1,Sprint Spectrum +311,785,870,2160,us,United States,1,Sprint Spectrum +311,785,490,1168,us,United States,1,Sprint Spectrum +310,784,120,288,us,United States,1,Sprint Spectrum +316,790,010,16,us,United States,1,Sprint Spectrum +310,784,031,799,us,United States,1,T-Mobile +310,784,220,544,us,United States,1,T-Mobile +310,784,270,624,us,United States,1,T-Mobile +310,784,210,528,us,United States,1,T-Mobile +310,784,260,608,us,United States,1,T-Mobile +310,784,200,512,us,United States,1,T-Mobile +310,784,250,592,us,United States,1,T-Mobile +310,784,160,352,us,United States,1,T-Mobile +310,784,240,576,us,United States,1,T-Mobile +310,784,660,1632,us,United States,1,T-Mobile +310,784,230,560,us,United States,1,T-Mobile +310,784,300,768,us,United States,1,T-Mobile +310,784,280,640,us,United States,1,T-Mobile +310,784,330,816,us,United States,1,T-Mobile +310,784,800,2048,us,United States,1,T-Mobile +310,784,310,784,us,United States,1,T-Mobile +311,785,740,1856,us,United States,1, +310,784,740,1856,us,United States,1,Telemetrix Inc. +310,784,014,335,us,United States,1,Testing +310,784,950,2384,us,United States,1,Unknown +310,784,860,2144,us,United States,1,Texas RSA 15B2 Limited Partnership +311,785,830,2096,us,United States,1,Thumb Cellular Limited Partnership +311,785,050,80,us,United States,1,Thumb Cellular Limited Partnership +310,784,460,1120,us,United States,1,TMP Corporation +310,784,490,1168,us,United States,1,Triton PCS +312,786,290,656,us,United States,1,Uintah Basin Electronics Telecommunications Inc. +311,785,860,2144,us,United States,1,Uintah Basin Electronics Telecommunications Inc. +310,784,960,2400,us,United States,1,Uintah Basin Electronics Telecommunications Inc. +310,784,020,32,us,United States,1,Union Telephone Co. +311,785,220,544,us,United States,1,United States Cellular Corp. +310,784,730,1840,us,United States,1,United States Cellular Corp. +311,785,650,1616,us,United States,1,United Wireless Communications Inc. +310,784,038,911,us,United States,1,USA 3650 AT&T +310,784,520,1312,us,United States,1,VeriSign +310,784,003,3,us,United States,1,Unknown +310,784,023,575,us,United States,1,Unknown +310,784,024,591,us,United States,1,Unknown +310,784,025,607,us,United States,1,Unknown +310,784,530,1328,us,United States,1,West Virginia Wireless +310,784,026,623,us,United States,1,Unknown +310,784,340,832,us,United States,1,Westlink Communications LLC +311,785,150,336,us,United States,1, +311,785,070,112,us,United States,1,Wisconsin RSA #7 Limited Partnership +310,784,390,912,us,United States,1,Yorkville Telephone Cooperative +748,1864,001,31,uy,Uruguay,598,Ancel/Antel +748,1864,003,63,uy,Uruguay,598,Ancel/Antel +748,1864,010,271,uy,Uruguay,598,Claro/AM Wireless +748,1864,007,127,uy,Uruguay,598,MOVISTAR +434,1076,004,79,uz,Uzbekistan,998,Bee Line/Unitel +434,1076,001,1,uz,Uzbekistan,998,Buztel +434,1076,007,127,uz,Uzbekistan,998,MTS/Uzdunrobita +434,1076,005,95,uz,Uzbekistan,998,Ucell/Coscom +434,1076,002,2,uz,Uzbekistan,998,Uzmacom +541,1345,005,95,vu,Vanuatu,678,DigiCel +541,1345,000,0,vu,Vanuatu,678,DigiCel +541,1345,001,31,vu,Vanuatu,678,SMILE +734,1844,003,3,ve,Venezuela,58,DigiTel C.A. +734,1844,002,47,ve,Venezuela,58,DigiTel C.A. +734,1844,001,1,ve,Venezuela,58,DigiTel C.A. +734,1844,006,111,ve,Venezuela,58,Movilnet C.A. +734,1844,004,79,ve,Venezuela,58,Movistar/TelCel +452,1106,007,127,vn,Viet Nam,84,Beeline +452,1106,001,31,vn,Viet Nam,84,Mobifone +452,1106,003,63,vn,Viet Nam,84,S-Fone/Telecom +452,1106,005,95,vn,Viet Nam,84,VietnaMobile +452,1106,008,143,vn,Viet Nam,84,Viettel Mobile +452,1106,006,111,vn,Viet Nam,84,Viettel Mobile +452,1106,004,79,vn,Viet Nam,84,Viettel Mobile +452,1106,002,47,vn,Viet Nam,84,Vinaphone +376,886,350,848,vi,Virgin Islands U.S.,1340,Cable & Wireless (Turks & Caicos) +376,886,050,1295,vi,Virgin Islands U.S.,1340,Digicel +376,886,352,850,vi,Virgin Islands U.S.,1340,IslandCom +421,1057,004,79,ye,Yemen,967,HITS/Y Unitel +421,1057,002,47,ye,Yemen,967,MTN/Spacetel +421,1057,001,31,ye,Yemen,967,Sabaphone +421,1057,003,63,ye,Yemen,967,Yemen Mob. CDMA +645,1605,003,63,zm,Zambia,260,Cell Z/MTS +645,1605,002,47,zm,Zambia,260,MTN/Telecel +645,1605,001,31,zm,Zambia,260,Zain/Celtel +648,1608,004,79,zw,Zimbabwe,263,Econet +648,1608,001,31,zw,Zimbabwe,263,Net One +648,1608,003,63,zw,Zimbabwe,263,Telecel From 418819d0a618d529d27196f7e194284d36a60983 Mon Sep 17 00:00:00 2001 From: mgp25 Date: Thu, 20 Nov 2014 22:37:34 +0100 Subject: [PATCH 122/436] Detects mnc value from specified carrier name --- src/whatsprot.class.php | 40 ++++++++++++++++++++++++++++++++++++---- 1 file changed, 36 insertions(+), 4 deletions(-) diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index c499c5fd..7b4839f9 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -333,7 +333,7 @@ public function codeRegister($code) * * @throws Exception */ - public function codeRequest($method = 'sms', $countryCode = null, $langCode = null) + public function codeRequest($method = 'sms', $carrier = null, $countryCode = null, $langCode = null) { if (!$phone = $this->dissectPhone()) { throw new Exception('The provided phone number is not valid.'); @@ -353,6 +353,11 @@ public function codeRequest($method = 'sms', $countryCode = null, $langCode = nu $langCode = 'en'; } + if($carrier != null) + $mnc = $this->detectMnc($langCode, $carrier); + else + $mnc = $phone['mnc']; + // Build the token. $token = generateRequestToken($phone['country'], $phone['phone']); @@ -365,9 +370,9 @@ public function codeRequest($method = 'sms', $countryCode = null, $langCode = nu 'lg' => $langCode, 'lc' => $countryCode, 'mcc' => $phone['mcc'], - 'mnc' => $phone['mnc'], + 'mnc' => $mnc, 'sim_mcc' => $phone['mcc'], - 'sim_mnc' => $phone['mnc'], + 'sim_mnc' => $mnc, 'method' => $method, //'reason' => "self-send-jailbroken", 'token' => urlencode($token), @@ -2118,6 +2123,33 @@ protected function dissectPhone() return false; } + /** + * Detects mnc from specified carrier + * + * @param $lc LangCode + * @param $carrierName Name of the carrier + * + * Returns mnc value + */ + protected function detectMnc ($lc, $carrierName) { + $fp = fopen(__DIR__ . DIRECTORY_SEPARATOR . 'networkinfo.csv', 'r'); + $mnc = null; + + while ($data = fgetcsv($fp, 0, ',')) { + if (($data[4] === $lc) && ($data[7] === $carrierName)) { + $mnc = $data[2]; + break; + } + } + + if($mnc == null) + $mnc = '000'; + + fclose($fp); + + return $mnc; + } + /** * Send the nodes to the Whatsapp server to log in. * @@ -2201,7 +2233,7 @@ protected function buildIdentity($identity) else { $id = fopen($identity.".dat", "w"); - $bytes = "%".implode("%", str_split(strtoupper(bin2hex(openssl_random_pseudo_bytes(16))), 2)); + $bytes = "%".implode("%", str_split(strtolower(bin2hex(openssl_random_pseudo_bytes(16))), 2)); fwrite($id, $bytes); fclose($id); From f783b41aaade9e308bc6c0ba66653dca73ccaeca Mon Sep 17 00:00:00 2001 From: mgp25 Date: Fri, 21 Nov 2014 11:59:28 +0100 Subject: [PATCH 123/436] little fix codeRequest --- src/whatsprot.class.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index 7b4839f9..28d20167 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -350,11 +350,10 @@ public function codeRequest($method = 'sms', $carrier = null, $countryCode = nul } if ($langCode == null) { $langCode = 'en'; - $langCode = 'en'; } if($carrier != null) - $mnc = $this->detectMnc($langCode, $carrier); + $mnc = $this->detectMnc(strtolower($countryCode), $carrier); else $mnc = $phone['mnc']; From b81b3a0aef4c95a8d7a7b2da0634cb5c59e4d168 Mon Sep 17 00:00:00 2001 From: mgp25 Date: Fri, 21 Nov 2014 12:19:06 +0100 Subject: [PATCH 124/436] New carriers added and possibility to choose --- src/networkinfo.csv | 942 ++++++++++++++++++++++---------------------- 1 file changed, 474 insertions(+), 468 deletions(-) diff --git a/src/networkinfo.csv b/src/networkinfo.csv index 9a46f4b8..75072977 100644 --- a/src/networkinfo.csv +++ b/src/networkinfo.csv @@ -1,8 +1,8 @@ 289,649,088,2191,ab,Abkhazia,7,A-Mobile -289,649,068,1679,ab,Abkhazia,7,A-Mobile +289,649,068,1679,ab,Abkhazia,7,A-Mobile2 289,649,067,1663,ab,Abkhazia,7,Aquafon 412,1042,088,2191,af,Afghanistan,93,Afghan Telecom Corp. (AT) -412,1042,080,2063,af,Afghanistan,93,Afghan Telecom Corp. (AT) +412,1042,080,2063,af,Afghanistan,93,Afghan Telecom Corp. (AT)2 412,1042,001,31,af,Afghanistan,93,Afghan Wireless/AWCC 412,1042,040,1039,af,Afghanistan,93,Areeba 412,1042,050,1295,af,Afghanistan,93,Etisalat @@ -24,8 +24,8 @@ 344,836,920,2336,ag,Antigua and Barbuda,1268,C & W 344,836,930,2352,ag,Antigua and Barbuda,1268,Cing. Wirel./DigiCel 722,1826,310,784,ar,Argentina Republic,54,Claro/ CTI/AMX -722,1826,330,816,ar,Argentina Republic,54,Claro/ CTI/AMX -722,1826,320,800,ar,Argentina Republic,54,Claro/ CTI/AMX +722,1826,330,816,ar,Argentina Republic,54,Claro/ CTI/AMX2 +722,1826,320,800,ar,Argentina Republic,54,Claro/ CTI/AMX3 722,1826,010,16,ar,Argentina Republic,54,Compania De Radiocomunicaciones Moviles SA 722,1826,070,112,ar,Argentina Republic,54,Movistar/Telefonica 722,1826,020,32,ar,Argentina Republic,54,Nextel @@ -38,7 +38,7 @@ 363,867,001,31,aw,Aruba,297,Setar GSM 505,1285,014,335,au,Australia,61,AAPT Ltd. 505,1285,024,591,au,Australia,61,Advanced Comm Tech Pty. -505,1285,009,159,au,Australia,61,Airnet Commercial Australia Ltd.. +505,1285,009,159,au,Australia,61,Airnet Commercial Australia Ltd. 505,1285,004,79,au,Australia,61,Department of Defense 505,1285,026,623,au,Australia,61,Dialogue Communications Pty Ltd 505,1285,012,303,au,Australia,61,H3G Ltd. @@ -46,47 +46,47 @@ 505,1285,088,2191,au,Australia,61,Localstar Holding Pty. Ltd 505,1285,019,415,au,Australia,61,Lycamobile Pty Ltd 505,1285,008,143,au,Australia,61,Railcorp/Vodafone -505,1285,099,2463,au,Australia,61,Railcorp/Vodafone -505,1285,013,319,au,Australia,61,Railcorp/Vodafone +505,1285,099,2463,au,Australia,61,Railcorp/Vodafone2 +505,1285,013,319,au,Australia,61,Railcorp/Vodafone3 505,1285,090,2319,au,Australia,61,Singtel Optus -505,1285,002,47,au,Australia,61,Singtel Optus +505,1285,002,47,au,Australia,61,Singtel Optus2 505,1285,001,31,au,Australia,61,Telstra Corp. Ltd. -505,1285,011,287,au,Australia,61,Telstra Corp. Ltd. -505,1285,071,1823,au,Australia,61,Telstra Corp. Ltd. -505,1285,072,1839,au,Australia,61,Telstra Corp. Ltd. +505,1285,011,287,au,Australia,61,Telstra Corp. Ltd.2 +505,1285,071,1823,au,Australia,61,Telstra Corp. Ltd.3 +505,1285,072,1839,au,Australia,61,Telstra Corp. Ltd.4 505,1285,005,95,au,Australia,61,The Ozitel Network Pty. 505,1285,016,367,au,Australia,61,Victorian Rail Track Corp. (VicTrack) 505,1285,007,127,au,Australia,61,Vodafone -505,1285,003,63,au,Australia,61,Vodafone +505,1285,003,63,au,Australia,61,Vodafone2 232,562,002,47,at,Austria,43,A1 MobilKom -232,562,011,287,at,Austria,43,A1 MobilKom -232,562,009,159,at,Austria,43,A1 MobilKom -232,562,001,31,at,Austria,43,A1 MobilKom +232,562,011,287,at,Austria,43,A1 MobilKom2 +232,562,009,159,at,Austria,43,A1 MobilKom3 +232,562,001,31,at,Austria,43,A1 MobilKom4 232,562,015,351,at,Austria,43,T-Mobile/Telering 232,562,000,15,at,Austria,43,Fix Line 232,562,010,271,at,Austria,43,H3G -232,562,014,335,at,Austria,43,H3G +232,562,014,335,at,Austria,43,H3G2 232,562,012,303,at,Austria,43,Orange/One Connect -232,562,006,111,at,Austria,43,Orange/One Connect +232,562,006,111,at,Austria,43,Orange/One Connect2 232,562,005,95,at,Austria,43,Orange/One Connect 232,562,004,79,at,Austria,43,T-Mobile/Telering -232,562,003,63,at,Austria,43,T-Mobile/Telering -232,562,007,127,at,Austria,43,T-Mobile/Telering +232,562,003,63,at,Austria,43,T-Mobile/Telering2 +232,562,007,127,at,Austria,43,T-Mobile/Telering3 232,562,008,143,at,Austria,43,Telefonica 400,1024,001,31,az,Azerbaijan,994,Azercell Telekom B.M. 400,1024,004,79,az,Azerbaijan,994,Azerfon. 400,1024,003,63,az,Azerbaijan,994,Caspian American Telecommunications LLC (CATEL) 400,1024,002,47,az,Azerbaijan,994,J.V. Bakcell GSM 2000 364,868,030,783,bs,Bahamas,1242,Bahamas Telco. Comp. -364,868,390,912,bs,Bahamas,1242,Bahamas Telco. Comp. -364,868,039,927,bs,Bahamas,1242,Bahamas Telco. Comp. +364,868,390,912,bs,Bahamas,1242,Bahamas Telco. Comp.2 +364,868,039,927,bs,Bahamas,1242,Bahamas Telco. Comp.3 364,868,003,3,bs,Bahamas,1242,Smart Communications 426,1062,001,31,bh,Bahrain,973,Batelco 426,1062,002,47,bh,Bahrain,973,MTC Vodafone 426,1062,004,79,bh,Bahrain,973,VIVA 470,1136,002,47,bd,Bangladesh,880,Robi/Aktel 470,1136,005,95,bd,Bangladesh,880,Citycell -470,1136,006,111,bd,Bangladesh,880,Citycell +470,1136,006,111,bd,Bangladesh,880,Citycell2 470,1136,001,31,bd,Bangladesh,880,GrameenPhone 470,1136,003,63,bd,Bangladesh,880,Orascom 470,1136,004,79,bd,Bangladesh,880,TeleTalk @@ -94,7 +94,7 @@ 342,834,600,1536,bb,Barbados,1246,C & W BET Ltd. 342,834,810,2064,bb,Barbados,1246,Cingular Wireless 342,834,750,1872,bb,Barbados,1246,Digicel -342,834,050,80,bb,Barbados,1246,Digicel +342,834,050,80,bb,Barbados,1246,Digicel2 342,834,820,2080,bb,Barbados,1246,Sunbeach 257,599,003,63,by,Belarus,375,BelCel JV 257,599,004,79,by,Belarus,375,BeST @@ -131,30 +131,30 @@ 652,1618,001,31,bw,Botswana,267,Mascom Wireless (Pty) Ltd. 652,1618,002,47,bw,Botswana,267,Orange 724,1828,012,303,br,Brazil,55,Claro/Albra/America Movil -724,1828,038,911,br,Brazil,55,Claro/Albra/America Movil -724,1828,005,95,br,Brazil,55,Claro/Albra/America Movil +724,1828,038,911,br,Brazil,55,Claro/Albra/America Movil2 +724,1828,005,95,br,Brazil,55,Claro/Albra/America Movil3 724,1828,001,1,br,Brazil,55,Vivo S.A./Telemig 724,1828,033,831,br,Brazil,55,CTBC Celular SA (CTBC) -724,1828,032,815,br,Brazil,55,CTBC Celular SA (CTBC) -724,1828,034,847,br,Brazil,55,CTBC Celular SA (CTBC) +724,1828,032,815,br,Brazil,55,CTBC Celular SA (CTBC)2 +724,1828,034,847,br,Brazil,55,CTBC Celular SA (CTBC)3 724,1828,008,8,br,Brazil,55,TIM 724,1828,000,15,br,Brazil,55,Nextel (Telet) -724,1828,039,927,br,Brazil,55,Nextel (Telet) +724,1828,039,927,br,Brazil,55,Nextel (Telet)2 724,1828,030,783,br,Brazil,55,Oi (TNL PCS / Oi) -724,1828,031,799,br,Brazil,55,Oi (TNL PCS / Oi) +724,1828,031,799,br,Brazil,55,Oi (TNL PCS / Oi)2 724,1828,024,591,br,Brazil,55,Amazonia Celular S/A 724,1828,016,367,br,Brazil,55,Brazil Telcom 724,1828,015,351,br,Brazil,55,Sercontel Cel 724,1828,07,7,br,Brazil,55,CTBC/Triangulo 724,1828,019,415,br,Brazil,55,Vivo S.A./Telemig 724,1828,003,63,br,Brazil,55,TIM -724,1828,002,47,br,Brazil,55,TIM -724,1828,004,79,br,Brazil,55,TIM +724,1828,002,47,br,Brazil,55,TIM2 +724,1828,004,79,br,Brazil,55,TIM3 724,1828,037,895,br,Brazil,55,Unicel do Brasil Telecomunicacoes Ltda 724,1828,006,111,br,Brazil,55,Vivo S.A./Telemig -724,1828,023,575,br,Brazil,55,Vivo S.A./Telemig -724,1828,011,287,br,Brazil,55,Vivo S.A./Telemig -724,1828,010,271,br,Brazil,55,Vivo S.A./Telemig +724,1828,023,575,br,Brazil,55,Vivo S.A./Telemig2 +724,1828,011,287,br,Brazil,55,Vivo S.A./Telemig3 +724,1828,010,271,br,Brazil,55,Vivo S.A./Telemig4 348,840,570,1392,vg,British Virgin Islands,284,Caribbean Cellular 348,840,770,1904,vg,British Virgin Islands,284,Digicel 348,840,170,368,vg,British Virgin Islands,284,LIME @@ -162,7 +162,7 @@ 528,1320,011,287,bn,Brunei Darussalam,673,Datastream (DTSCom) 528,1320,001,31,bn,Brunei Darussalam,673,Telekom Brunei Bhd (TelBru) 284,644,006,111,bg,Bulgaria,359,BTC Mobile EOOD (vivatel) -284,644,003,63,bg,Bulgaria,359,BTC Mobile EOOD (vivatel) +284,644,003,63,bg,Bulgaria,359,BTC Mobile EOOD (vivatel)2 284,644,005,95,bg,Bulgaria,359,Cosmo Mobile EAD/Globul 284,644,001,31,bg,Bulgaria,359,MobilTel AD 613,1555,003,63,bf,Burkina Faso,226,TeleCel @@ -182,17 +182,17 @@ 456,1110,001,31,kh,Cambodia,855,Mobitel/Cam GSM 456,1110,003,63,kh,Cambodia,855,QB/Cambodia Adv. Comms. 456,1110,005,95,kh,Cambodia,855,Smart Mobile -456,1110,006,111,kh,Cambodia,855,Smart Mobile +456,1110,006,111,kh,Cambodia,855,Smart Mobile2 456,1110,009,159,kh,Cambodia,855,Sotelco Ltd (Beeline Cambodia) 624,1572,001,31,cm,Cameroon,237,MTN 624,1572,002,47,cm,Cameroon,237,Orange 302,770,652,1618,ca,Canada,1,BC Tel Mobility 302,770,630,1584,ca,Canada,1,Bell Aliant 302,770,651,1617,ca,Canada,1,Bell Mobility -302,770,610,1552,ca,Canada,1,Bell Mobility +302,770,610,1552,ca,Canada,1,Bell Mobility2 302,770,670,1648,ca,Canada,1,CityWest Mobility 302,770,360,864,ca,Canada,1,Clearnet -302,770,361,865,ca,Canada,1,Clearnet +302,770,361,865,ca,Canada,1,Clearnet2 302,770,380,896,ca,Canada,1,DMTS Mobility 302,770,710,1808,ca,Canada,1,Globalstar Canada 302,770,640,1600,ca,Canada,1,Latitude Wireless @@ -200,17 +200,17 @@ 302,770,320,800,ca,Canada,1,mobilicity 302,770,702,1794,ca,Canada,1,MT&T Mobility 302,770,655,1621,ca,Canada,1,MTS Mobility -302,770,660,1632,ca,Canada,1,MTS Mobility +302,770,660,1632,ca,Canada,1,MTS Mobility2 302,770,701,1793,ca,Canada,1,NB Tel Mobility 302,770,703,1795,ca,Canada,1,New Tel Mobility 302,770,760,1888,ca,Canada,1,Public Mobile 302,770,657,1623,ca,Canada,1,Quebectel Mobility 302,770,720,1824,ca,Canada,1,Rogers AT&T Wireless 302,770,654,1620,ca,Canada,1,Sask Tel Mobility -302,770,680,1664,ca,Canada,1,Sask Tel Mobility +302,770,680,1664,ca,Canada,1,Sask Tel Mobility2 302,770,656,1622,ca,Canada,1,Tbay Mobility 302,770,220,544,ca,Canada,1,Telus Mobility -302,770,653,1619,ca,Canada,1,Telus Mobility +302,770,653,1619,ca,Canada,1,Telus Mobility2 302,770,500,1280,ca,Canada,1,Videotron 302,770,490,1168,ca,Canada,1,WIND 625,1573,001,31,cv,Cape Verde,238,CV Movel @@ -234,22 +234,22 @@ 730,1840,001,1,cl,Chile,56,Entel Telefonia Mov 730,1840,014,335,cl,Chile,56,Netline Telefonica Movil Ltda 730,1840,009,159,cl,Chile,56,Nextel SA -730,1840,005,95,cl,Chile,56,Nextel SA -730,1840,004,79,cl,Chile,56,Nextel SA +730,1840,005,95,cl,Chile,56,Nextel SA2 +730,1840,004,79,cl,Chile,56,Nextel SA3 730,1840,002,47,cl,Chile,56,TELEFONICA -730,1840,007,127,cl,Chile,56,TELEFONICA +730,1840,007,127,cl,Chile,56,TELEFONICA2 730,1840,012,303,cl,Chile,56,Telestar Movil SA 730,1840,000,15,cl,Chile,56,TESAM SA 730,1840,013,319,cl,Chile,56,Tribe Mobile SPA 730,1840,008,143,cl,Chile,56,VTR Banda Ancha SA 460,1120,000,15,cn,China,86,China Mobile GSM -460,1120,007,127,cn,China,86,China Mobile GSM -460,1120,002,47,cn,China,86,China Mobile GSM +460,1120,007,127,cn,China,86,China Mobile GSM2 +460,1120,002,47,cn,China,86,China Mobile GSM3 460,1120,004,79,cn,China,86,China Space Mobile Satellite Telecommunications Co. Ltd (China Spacecom) 460,1120,005,5,cn,China,86,China Telecom -460,1120,003,63,cn,China,86,China Telecom +460,1120,003,63,cn,China,86,China Telecom2 460,1120,006,6,cn,China,86,China Unicom -460,1120,001,31,cn,China,86,China Unicom +460,1120,001,31,cn,China,86,China Unicom2 732,1842,130,304,co,Colombia,57,Avantel SAS 732,1842,102,258,co,Colombia,57,Movistar 732,1842,103,259,co,Colombia,57,TIGO/Colombia Movil @@ -259,7 +259,7 @@ 732,1842,123,291,co,Colombia,57,Movistar 732,1842,111,273,co,Colombia,57,TIGO/Colombia Movil 732,1842,142,322,co,Colombia,57,UNE EPM Telecomunicaciones SA ESP -732,1842,020,32,co,Colombia,57,UNE EPM Telecomunicaciones SA ESP +732,1842,020,32,co,Colombia,57,UNE EPM Telecomunicaciones SA ESP2 732,1842,154,340,co,Colombia,57,Virgin Mobile Colombia SAS 654,1620,001,31,km,Comoros,269,HURI - SNPT 630,1584,086,2159,cd,Congo Dem. Rep.,243,Orange RDC sarl @@ -275,7 +275,7 @@ 548,1352,001,31,ck,Cook Islands,682,Telecom Cook Islands 712,1810,003,63,cr,Costa Rica,506,Claro 712,1810,002,47,cr,Costa Rica,506,ICE -712,1810,001,31,cr,Costa Rica,506,ICE +712,1810,001,31,cr,Costa Rica,506,ICE2 712,1810,004,79,cr,Costa Rica,506,Movistar 219,537,001,31,hr,Croatia,385,T-Mobile/Cronet 219,537,002,47,hr,Croatia,385,Tele2 @@ -302,11 +302,11 @@ 238,568,007,127,dk,Denmark,45, 238,568,004,79,dk,Denmark,45,NextGen Mobile Ltd (CardBoardFish) 238,568,010,271,dk,Denmark,45,TDC Denmark -238,568,001,31,dk,Denmark,45,TDC Denmark +238,568,001,31,dk,Denmark,45,TDC Denmark2 238,568,002,47,dk,Denmark,45,Telenor/Sonofon 238,568,077,1919,dk,Denmark,45,Telenor/Sonofon 238,568,020,527,dk,Denmark,45,Telia -238,568,030,783,dk,Denmark,45,Telia +238,568,030,783,dk,Denmark,45,Telia2 638,1592,001,31,dj,Djibouti,253,Djibouti Telecom SA (Evatis) 366,870,110,272,dm,Dominica,1767,C & W 366,870,020,32,dm,Dominica,1767,Cingular Wireless/Digicel @@ -344,11 +344,11 @@ 244,580,014,335,fi,Finland,358,Alands 244,580,026,623,fi,Finland,358,Compatel Ltd 244,580,013,319,fi,Finland,358,DNA/Finnet -244,580,012,303,fi,Finland,358,DNA/Finnet +244,580,012,303,fi,Finland,358,DNA/Finnet2 244,580,004,79,fi,Finland,358,DNA/Finnet -244,580,003,63,fi,Finland,358,DNA/Finnet +244,580,003,63,fi,Finland,358,DNA/Finnet2 244,580,021,543,fi,Finland,358,Elisa/Saunalahti -244,580,005,95,fi,Finland,358,Elisa/Saunalahti +244,580,005,95,fi,Finland,358,Elisa/Saunalahti2 244,580,082,2095,fi,Finland,358,ID-Mobile 244,580,011,287,fi,Finland,358,Mundio Mobile (Finland) Ltd 244,580,009,159,fi,Finland,358,Nokia Oyj @@ -358,29 +358,29 @@ 208,520,092,2351,fr,France,33,Association Plate-forme Telecom 208,520,028,655,fr,France,33,Astrium 208,520,088,2191,fr,France,33,Bouygues Telecom -208,520,021,543,fr,France,33,Bouygues Telecom -208,520,020,527,fr,France,33,Bouygues Telecom +208,520,021,543,fr,France,33,Bouygues Telecom2 +208,520,020,527,fr,France,33,Bouygues Telecom3 208,520,014,335,fr,France,33,Lliad/FREE Mobile 208,520,005,95,fr,France,33,GlobalStar -208,520,007,127,fr,France,33,GlobalStar -208,520,006,111,fr,France,33,GlobalStar +208,520,007,127,fr,France,33,GlobalStar2 +208,520,006,111,fr,France,33,GlobalStar3 208,520,029,671,fr,France,33,Orange 208,520,016,367,fr,France,33,Lliad/FREE Mobile -208,520,015,351,fr,France,33,Lliad/FREE Mobile +208,520,015,351,fr,France,33,Lliad/FREE Mobile2 208,520,025,607,fr,France,33,Lycamobile SARL 208,520,024,591,fr,France,33,MobiquiThings -208,520,003,63,fr,France,33,MobiquiThings +208,520,003,63,fr,France,33,MobiquiThings2 208,520,031,799,fr,France,33,Mundio Mobile (France) Ltd 208,520,026,623,fr,France,33,NRJ 208,520,089,2207,fr,France,33,Omer/Virgin Mobile -208,520,023,575,fr,France,33,Omer/Virgin Mobile +208,520,023,575,fr,France,33,Omer/Virgin Mobile2 208,520,002,47,fr,France,33,Orange -208,520,001,31,fr,France,33,Orange -208,520,091,2335,fr,France,33,Orange +208,520,001,31,fr,France,33,Orange2 +208,520,091,2335,fr,France,33,Orange3 208,520,013,319,fr,France,33,S.F.R. -208,520,011,287,fr,France,33,S.F.R. -208,520,010,271,fr,France,33,S.F.R. -208,520,009,159,fr,France,33,S.F.R. +208,520,011,287,fr,France,33,S.F.R.2 +208,520,010,271,fr,France,33,S.F.R.3 +208,520,009,159,fr,France,33,S.F.R.4 208,520,004,79,fr,France,33,SISTEER 208,520,000,15,fr,France,33,Tel/Tel 208,520,022,559,fr,France,33,Transatel SA @@ -389,7 +389,7 @@ 340,832,001,31,gf,French Guiana,594,Orange Caribe 340,832,002,47,gf,French Guiana,594,Outremer Telecom 340,832,011,287,gf,French Guiana,594,TelCell GSM -340,832,003,63,gf,French Guiana,594,TelCell GSM +340,832,003,63,gf,French Guiana,594,TelCell GSM2 547,1351,015,351,pf,French Polynesia,689,Pacific Mobile Telecom (PMT) 547,1351,020,527,pf,French Polynesia,689,Tikiphone 628,1576,004,79,ga,Gabon,241,Azur/Usan S.A. @@ -406,23 +406,23 @@ 282,642,004,79,ge,Georgia,995,MobiTel/Beeline 282,642,000,0,ge,Georgia,995,Silknet 262,610,017,383,de,Germany,49,E-Plus -262,610,003,63,de,Germany,49,E-Plus -262,610,005,95,de,Germany,49,E-Plus -262,610,077,1919,de,Germany,49,E-Plus +262,610,003,63,de,Germany,49,E-Plus2 +262,610,005,95,de,Germany,49,E-Plus3 +262,610,077,1919,de,Germany,49,E-Plus4 262,610,014,335,de,Germany,49,Group 3G UMTS 262,610,043,1087,de,Germany,49,Lycamobile 262,610,013,319,de,Germany,49,Mobilcom 262,610,007,127,de,Germany,49,O2 -262,610,011,287,de,Germany,49,O2 -262,610,008,143,de,Germany,49,O2 -262,610,010,271,de,Germany,49,O2 -262,610,012,303,de,Germany,49,O2 +262,610,011,287,de,Germany,49,O2-2 +262,610,008,143,de,Germany,49,O2-3 +262,610,010,271,de,Germany,49,O2-4 +262,610,012,303,de,Germany,49,O2-5 262,610,006,111,de,Germany,49,Telekom/T-mobile -262,610,001,31,de,Germany,49,Telekom/T-mobile +262,610,001,31,de,Germany,49,Telekom/T-mobile2 262,610,016,367,de,Germany,49,Telogic/ViStream 262,610,004,79,de,Germany,49,Vodafone D2 -262,610,002,47,de,Germany,49,Vodafone D2 -262,610,009,159,de,Germany,49,Vodafone D2 +262,610,002,47,de,Germany,49,Vodafone D2-2 +262,610,009,159,de,Germany,49,Vodafone D2-3 620,1568,004,79,gh,Ghana,233,Expresso Ghana Ltd 620,1568,007,127,gh,Ghana,233,GloMobile 620,1568,003,63,gh,Ghana,233,Milicom/Tigo @@ -434,25 +434,25 @@ 266,614,001,31,gi,Gibraltar,350,Gibtel GSM 202,514,007,127,gr,Greece,30,AMD Telecom SA 202,514,002,47,gr,Greece,30,Cosmote -202,514,001,31,gr,Greece,30,Cosmote +202,514,001,31,gr,Greece,30,Cosmote2 202,514,004,79,gr,Greece,30,Organismos Sidirodromon Ellados (OSE) 202,514,003,63,gr,Greece,30,OTE Hellenic Telecommunications Organization SA 202,514,010,271,gr,Greece,30,Tim/Wind -202,514,009,159,gr,Greece,30,Tim/Wind +202,514,009,159,gr,Greece,30,Tim/Wind2 202,514,005,95,gr,Greece,30,Vodafone 290,656,001,31,gl,Greenland,299,Tele Greenland 352,850,110,272,gd,Grenada,1473,Cable & Wireless 352,850,030,48,gd,Grenada,1473,Digicel -352,850,050,80,gd,Grenada,1473,Digicel -340,832,008,143,gp,Guadeloupe,590,Dauphin Telecom SU (Guadeloupe Telecom) (Guadeloupe -340,832,020,527,gp,Guadeloupe,590,Digicel Antilles Francaises Guyane SA (Guadeloupe +352,850,050,80,gd,Grenada,1473,Digicel2 +340,832,008,143,gp,Guadeloupe,590,Dauphin Telecom SU (Guadeloupe Telecom) (Guadeloupe) +340,832,020,527,gp,Guadeloupe,590,Digicel Antilles Francaises Guyane SA (Guadeloupe) 340,832,001,31,gp,Guadeloupe,590,Orange Caribe -340,832,002,47,gp,Guadeloupe,590,Outremer Telecom Guadeloupe (only) (Guadeloupe -340,832,010,271,gp,Guadeloupe,590,United Telecommunications Services Caraibe SARL (UTS Caraibe Guadeloupe Telephone Mobile) (Guadeloupe -340,832,003,63,gp,Guadeloupe,590,United Telecommunications Services Caraibe SARL (UTS Caraibe Guadeloupe Telephone Mobile) (Guadeloupe +340,832,002,47,gp,Guadeloupe,590,Outremer Telecom Guadeloupe (only) (Guadeloupe) +340,832,010,271,gp,Guadeloupe,590,United Telecommunications Services Caraibe SARL (UTS Caraibe Guadeloupe Telephone Mobile) (Guadeloupe) +340,832,003,63,gp,Guadeloupe,590,United Telecommunications Services Caraibe SARL (UTS Caraibe Guadeloupe Telephone Mobile) (Guadeloupe)2 310,784,480,1152,gu,Guam,1671,Choice Phone LLC 310,784,370,880,gu,Guam,1671,Docomo -310,784,470,1136,gu,Guam,1671,Docomo +310,784,470,1136,gu,Guam,1671,Docomo2 310,784,140,320,gu,Guam,1671,GTA Wireless 310,784,033,51,gu,Guam,1671,Guam Teleph. Auth. 310,784,032,50,gu,Guam,1671,IT&E OverSeas @@ -466,7 +466,7 @@ 611,1553,001,31,gn,Guinea,224,Orange/Spacetel 611,1553,002,47,gn,Guinea,224,SotelGui 632,1586,000,0,gw,Guinea-Bissau,245,GuineTel -632,1586,001,31,gw,Guinea-Bissau,245,GuineTel +632,1586,001,31,gw,Guinea-Bissau,245,GuineTel2 632,1586,003,63,gw,Guinea-Bissau,245,Orange 632,1586,002,47,gw,Guinea-Bissau,245,SpaceTel 738,1848,002,47,gy,Guyana,592,Cellink Plus @@ -479,29 +479,29 @@ 708,1800,001,1,hn,Honduras,504,SERCOM/CLARO 708,1800,002,2,hn,Honduras,504,Telefonica/CELTEL 454,1108,013,319,hk,Hongkong China,852,China Mobile/Peoples -454,1108,012,303,hk,Hongkong China,852,China Mobile/Peoples +454,1108,012,303,hk,Hongkong China,852,China Mobile/Peoples2 454,1108,009,159,hk,Hongkong China,852,China Motion 454,1108,007,127,hk,Hongkong China,852,China Unicom Ltd 454,1108,011,287,hk,Hongkong China,852,China-HongKong Telecom Ltd (CHKTL) 454,1108,001,31,hk,Hongkong China,852,Citic Telecom Ltd. 454,1108,018,399,hk,Hongkong China,852,CSL Ltd. -454,1108,002,47,hk,Hongkong China,852,CSL Ltd. -454,1108,000,15,hk,Hongkong China,852,CSL Ltd. +454,1108,002,47,hk,Hongkong China,852,CSL Ltd.2 +454,1108,000,15,hk,Hongkong China,852,CSL Ltd.3 454,1108,010,271,hk,Hongkong China,852,CSL/New World PCS Ltd. 454,1108,014,335,hk,Hongkong China,852,H3G/Hutchinson -454,1108,005,95,hk,Hongkong China,852,H3G/Hutchinson -454,1108,004,79,hk,Hongkong China,852,H3G/Hutchinson -454,1108,003,63,hk,Hongkong China,852,H3G/Hutchinson +454,1108,005,95,hk,Hongkong China,852,H3G/Hutchinson2 +454,1108,004,79,hk,Hongkong China,852,H3G/Hutchinson3 +454,1108,003,63,hk,Hongkong China,852,H3G/Hutchinson4 454,1108,016,367,hk,Hongkong China,852,HKT/PCCW -454,1108,019,415,hk,Hongkong China,852,HKT/PCCW -454,1108,020,527,hk,Hongkong China,852,HKT/PCCW -454,1108,029,671,hk,Hongkong China,852,HKT/PCCW +454,1108,019,415,hk,Hongkong China,852,HKT/PCCW2 +454,1108,020,527,hk,Hongkong China,852,HKT/PCCW3 +454,1108,029,671,hk,Hongkong China,852,HKT/PCCW4 454,1108,047,1151,hk,Hongkong China,852,shared by private TETRA systems -454,1108,040,1039,hk,Hongkong China,852,shared by private TETRA systems +454,1108,040,1039,hk,Hongkong China,852,shared by private TETRA systems2 454,1108,008,143,hk,Hongkong China,852,Trident Telecom Ventures Ltd. 454,1108,017,383,hk,Hongkong China,852,Vodafone/SmarTone -454,1108,015,351,hk,Hongkong China,852,Vodafone/SmarTone -454,1108,006,111,hk,Hongkong China,852,Vodafone/SmarTone +454,1108,015,351,hk,Hongkong China,852,Vodafone/SmarTone2 +454,1108,006,111,hk,Hongkong China,852,Vodafone/SmarTone3 216,534,001,31,hu,Hungary,36,Pannon/Telenor 216,534,030,783,hu,Hungary,36,T-mobile/Magyar 216,534,071,1823,hu,Hungary,36,UPC Magyarorszag Kft. @@ -509,80 +509,86 @@ 274,628,009,159,is,Iceland,354,Amitelo 274,628,007,127,is,Iceland,354,IceCell 274,628,008,143,is,Iceland,354,Landssiminn -274,628,001,31,is,Iceland,354,Landssiminn +274,628,001,31,is,Iceland,354,Landssiminn2 274,628,011,287,is,Iceland,354,NOVA 274,628,004,79,is,Iceland,354,VIKING/IMC 274,628,003,63,is,Iceland,354,Vodafone/Tal hf -274,628,005,95,is,Iceland,354,Vodafone/Tal hf -274,628,002,47,is,Iceland,354,Vodafone/Tal hf +274,628,005,95,is,Iceland,354,Vodafone/Tal hf2 +274,628,002,47,is,Iceland,354,Vodafone/Tal hf3 404,1028,029,671,in,India,91,Aircel -404,1028,028,655,in,India,91,Aircel -404,1028,025,607,in,India,91,Aircel -404,1028,017,383,in,India,91,Aircel -404,1028,042,1071,in,India,91,Aircel -404,1028,033,831,in,India,91,Aircel +404,1028,028,655,in,India,91,Aircel2 +404,1028,025,607,in,India,91,Aircel3 +404,1028,017,383,in,India,91,Aircel4 +404,1028,042,1071,in,India,91,Aircel5 +404,1028,033,831,in,India,91,Aircel6 404,1028,001,1,in,India,91,Aircel Digilink India -404,1028,015,351,in,India,91,Aircel Digilink India -404,1028,060,1551,in,India,91,Aircel Digilink India -405,1029,055,1375,in,India,91,AirTel -405,1029,053,1343,in,India,91,AirTel -405,1029,051,1311,in,India,91,AirTel +404,1028,015,351,in,India,91,Aircel Digilink India-2 +404,1028,060,1551,in,India,91,Aircel Digilink India-3 +404,1028,049,000,in,India,91,AirTel +405,1029,055,1375,in,India,91,AirTel2 +405,1029,054,1375,in,India,91,AirTel3 +405,1029,053,1343,in,India,91,AirTel4 +405,1029,051,1311,in,India,91,AirTel5 405,1029,056,1391,in,India,91,Airtel (Bharati Mobile) - Assam 404,1028,086,2159,in,India,91,Barakhamba Sales & Serv. -404,1028,013,319,in,India,91,Barakhamba Sales & Serv. +404,1028,013,319,in,India,91,Vodafone +404,1028,011,000,in,India,91,Vodafone2 404,1028,058,1423,in,India,91,BSNL -404,1028,081,2079,in,India,91,BSNL -404,1028,074,1871,in,India,91,BSNL -404,1028,038,911,in,India,91,BSNL -404,1028,057,1407,in,India,91,BSNL -404,1028,080,2063,in,India,91,BSNL -404,1028,073,1855,in,India,91,BSNL -404,1028,034,847,in,India,91,BSNL -404,1028,066,1647,in,India,91,BSNL -404,1028,055,1375,in,India,91,BSNL -404,1028,072,1839,in,India,91,BSNL -404,1028,077,1919,in,India,91,BSNL -404,1028,064,1615,in,India,91,BSNL -404,1028,054,1359,in,India,91,BSNL -404,1028,071,1823,in,India,91,BSNL -404,1028,076,1903,in,India,91,BSNL -404,1028,053,1343,in,India,91,BSNL -404,1028,062,1583,in,India,91,BSNL -404,1028,059,1439,in,India,91,BSNL -404,1028,075,1887,in,India,91,BSNL -404,1028,051,1311,in,India,91,BSNL +404,1028,081,2079,in,India,91,BSNL2 +404,1028,074,1871,in,India,91,BSNL3 +404,1028,038,911,in,India,91,BSNL4 +404,1028,057,1407,in,India,91,BSNL5 +404,1028,080,2063,in,India,91,BSNL6 +404,1028,073,1855,in,India,91,BSNL7 +404,1028,034,847,in,India,91,BSNL8 +404,1028,066,1647,in,India,91,BSNL9 +404,1028,055,1375,in,India,91,BSNL10 +404,1028,072,1839,in,India,91,BSNL11 +404,1028,077,1919,in,India,91,BSNL12 +404,1028,064,1615,in,India,91,BSNL13 +404,1028,054,1359,in,India,91,BSNL14 +404,1028,071,1823,in,India,91,BSNL15 +404,1028,076,1903,in,India,91,BSNL16 +404,1028,053,1343,in,India,91,BSNL17 +404,1028,062,1583,in,India,91,BSNL18 +404,1028,059,1439,in,India,91,BSNL19 +404,1028,075,1887,in,India,91,BSNL20 +404,1028,051,1311,in,India,91,BSNL21 +405,1028,001,000,in,INDIA,91,Reliance +405,1028,025,000,in,India,91,TATA DOCOMO +405,1028,036,000,in,India,91,TATA DOCOMO2 405,1029,010,271,in,India,91,Bharti Airtel Limited (Delhi) 404,1028,079,1951,in,India,91,CellOne A&N 404,1028,089,2207,in,India,91,Escorts Telecom Ltd. -404,1028,088,2191,in,India,91,Escorts Telecom Ltd. -404,1028,087,2175,in,India,91,Escorts Telecom Ltd. -404,1028,082,2095,in,India,91,Escorts Telecom Ltd. +404,1028,088,2191,in,India,91,Escorts Telecom Ltd.2 +404,1028,087,2175,in,India,91,Escorts Telecom Ltd.3 +404,1028,082,2095,in,India,91,Escorts Telecom Ltd.4 404,1028,012,303,in,India,91,Escotel Mobile Communications -404,1028,019,415,in,India,91,Escotel Mobile Communications -404,1028,056,1391,in,India,91,Escotel Mobile Communications +404,1028,019,415,in,India,91,Escotel Mobile Communications2 +404,1028,056,1391,in,India,91,Escotel Mobile Communications3 405,1029,005,5,in,India,91,Fascel Limited 404,1028,005,5,in,India,91,Fascel 404,1028,070,1807,in,India,91,Hexacom India -404,1028,016,367,in,India,91,Hexcom India +404,1028,016,367,in,India,91,Hexcom India2 404,1028,004,4,in,India,91,Idea Cellular Ltd. 404,1028,024,591,in,India,91,Idea Cellular Ltd. -404,1028,022,559,in,India,91,Idea Cellular Ltd. -404,1028,078,1935,in,India,91,Idea Cellular Ltd. -404,1028,007,7,in,India,91,Idea Cellular Ltd. +404,1028,022,559,in,India,91,Idea Cellular Ltd.2 +404,1028,078,1935,in,India,91,Idea Cellular Ltd.3 +404,1028,007,7,in,India,91,Idea Cellular Ltd.4 404,1028,069,1695,in,India,91,Mahanagar Telephone Nigam -404,1028,068,1679,in,India,91,Mahanagar Telephone Nigam +404,1028,068,1679,in,India,91,Mahanagar Telephone Nigam2 404,1028,083,2111,in,India,91,Reliable Internet Services 405,1029,009,9,in,India,91,RELIANCE TELECOM 404,1028,036,879,in,India,91,Reliance Telecom Private -404,1028,052,1327,in,India,91,Reliance Telecom Private -404,1028,050,1295,in,India,91,Reliance Telecom Private -404,1028,067,1663,in,India,91,Reliance Telecom Private -404,1028,018,399,in,India,91,Reliance Telecom Private -404,1028,085,2143,in,India,91,Reliance Telecom Private -404,1028,009,9,in,India,91,Reliance Telecom Private +404,1028,052,1327,in,India,91,Reliance Telecom Private2 +404,1028,050,1295,in,India,91,Reliance Telecom Private3 +404,1028,067,1663,in,India,91,Reliance Telecom Private4 +404,1028,018,399,in,India,91,Reliance Telecom Private5 +404,1028,085,2143,in,India,91,Reliance Telecom Private6 +404,1028,009,9,in,India,91,Reliance Telecom Private7 404,1028,041,1055,in,India,91,RPG Cellular 404,1028,014,335,in,India,91,Spice -404,1028,044,1103,in,India,91,Spice +404,1028,044,1103,in,India,91,Spice2 404,1028,011,287,in,India,91,Sterling Cellular Ltd. 404,1028,030,783,in,India,91,Usha Martin Telecom 510,1296,008,143,id,Indonesia,62,Axis/Natrindo @@ -590,10 +596,10 @@ 510,1296,021,543,id,Indonesia,62,Indosat/Satelindo/M3 510,1296,001,31,id,Indonesia,62,Indosat/Satelindo/M3 510,1296,000,0,id,Indonesia,62,PT Pasifik Satelit Nusantara (PSN) -510,1296,000,15,id,Indonesia,62,PT Pasifik Satelit Nusantara (PSN) +510,1296,000,15,id,Indonesia,62,PT Pasifik Satelit Nusantara (PSN)2 510,1296,027,639,id,Indonesia,62,PT Sampoerna Telekomunikasi Indonesia (STI) 510,1296,009,159,id,Indonesia,62,PT Smartfren Telecom Tbk -510,1296,028,655,id,Indonesia,62,PT Smartfren Telecom Tbk +510,1296,028,655,id,Indonesia,62,PT Smartfren Telecom Tbk2 510,1296,011,287,id,Indonesia,62,PT. Excelcom 510,1296,010,271,id,Indonesia,62,Telkomsel 901,2305,013,319,n/a,International Networks,882,Antarctica @@ -606,7 +612,7 @@ 418,1048,005,95,iq,Iraq,964,Asia Cell 418,1048,092,2351,iq,Iraq,964,Itisaluna and Kalemat 418,1048,082,2095,iq,Iraq,964,Korek -418,1048,040,1039,iq,Iraq,964,Korek +418,1048,040,1039,iq,Iraq,964,Korek2 418,1048,045,1119,iq,Iraq,964,Mobitel (Iraq-Kurdistan) and Moutiny 418,1048,030,783,iq,Iraq,964,Orascom Telecom 418,1048,020,527,iq,Iraq,964,ZAIN/Atheer @@ -625,25 +631,25 @@ 425,1061,008,143,il,Israel,972,Golan Telekom 425,1061,015,351,il,Israel,972,Home Cellular Ltd 425,1061,077,1919,il,Israel,972,Hot Mobile/Mirs -425,1061,007,127,il,Israel,972,Hot Mobile/Mirs +425,1061,007,127,il,Israel,972,Hot Mobile/Mirs2 425,1061,001,31,il,Israel,972,Orange/Partner Co. Ltd. 425,1061,003,63,il,Israel,972,Pelephone 425,1061,016,367,il,Israel,972,Rami Levy Hashikma Marketing Communications Ltd 222,546,034,847,it,Italy,39,BT Italia SpA 222,546,002,47,it,Italy,39,Elsacom 222,546,099,2463,it,Italy,39,Hi3G -222,546,033,831,it,Italy,39,Hi3G +222,546,033,831,it,Italy,39,Hi3G-2 222,546,077,1919,it,Italy,39,IPSE 2000 222,546,035,863,it,Italy,39,Lycamobile Srl 222,546,007,127,it,Italy,39,Noverca Italia Srl 222,546,030,783,it,Italy,39,RFI Rete Ferroviaria Italiana SpA 222,546,048,1167,it,Italy,39,Telecom Italia Mobile SpA -222,546,043,1087,it,Italy,39,Telecom Italia Mobile SpA +222,546,043,1087,it,Italy,39,Telecom Italia Mobile SpA2 222,546,001,31,it,Italy,39,TIM 222,546,010,271,it,Italy,39,Vodafone 222,546,006,111,it,Italy,39,Vodafone -222,546,044,1103,it,Italy,39,WIND (Blu) - -222,546,088,2191,it,Italy,39,WIND (Blu) - +222,546,044,1103,it,Italy,39,WIND (Blu) +222,546,088,2191,it,Italy,39,WIND (Blu)2 612,1554,007,127,ci,Ivory Coast,225,Aircomm SA 612,1554,002,47,ci,Ivory Coast,225,Atlantik Tel./Moov 612,1554,004,79,ci,Ivory Coast,225,Comium @@ -653,124 +659,124 @@ 612,1554,006,111,ci,Ivory Coast,225,OriCell 612,1554,000,0,ci,Ivory Coast,225,Warid 338,824,110,272,jm,Jamaica,1876,Cable & Wireless -338,824,020,32,jm,Jamaica,1876,Cable & Wireless -338,824,180,384,jm,Jamaica,1876,Cable & Wireless +338,824,020,32,jm,Jamaica,1876,Cable & Wireless-2 +338,824,180,384,jm,Jamaica,1876,Cable & Wireless-3 338,824,050,80,jm,Jamaica,1876,DIGICEL/Mossel 440,1088,000,0,jp,Japan,81,eMobile 440,1088,074,1871,jp,Japan,81,KDDI Corporation -440,1088,070,1807,jp,Japan,81,KDDI Corporation -440,1088,089,2207,jp,Japan,81,KDDI Corporation -440,1088,051,1311,jp,Japan,81,KDDI Corporation -440,1088,075,1887,jp,Japan,81,KDDI Corporation -440,1088,056,1391,jp,Japan,81,KDDI Corporation -441,1089,070,1807,jp,Japan,81,KDDI Corporation -440,1088,052,1327,jp,Japan,81,KDDI Corporation -440,1088,076,1903,jp,Japan,81,KDDI Corporation -440,1088,071,1823,jp,Japan,81,KDDI Corporation -440,1088,053,1343,jp,Japan,81,KDDI Corporation -440,1088,077,1919,jp,Japan,81,KDDI Corporation -440,1088,008,143,jp,Japan,81,KDDI Corporation -440,1088,072,1839,jp,Japan,81,KDDI Corporation -440,1088,054,1359,jp,Japan,81,KDDI Corporation -440,1088,079,1951,jp,Japan,81,KDDI Corporation -440,1088,007,127,jp,Japan,81,KDDI Corporation -440,1088,073,1855,jp,Japan,81,KDDI Corporation -440,1088,055,1375,jp,Japan,81,KDDI Corporation -440,1088,088,2191,jp,Japan,81,KDDI Corporation -440,1088,050,1295,jp,Japan,81,KDDI Corporation +440,1088,070,1807,jp,Japan,81,KDDI Corporation2 +440,1088,089,2207,jp,Japan,81,KDDI Corporation3 +440,1088,051,1311,jp,Japan,81,KDDI Corporation4 +440,1088,075,1887,jp,Japan,81,KDDI Corporation5 +440,1088,056,1391,jp,Japan,81,KDDI Corporation6 +441,1089,070,1807,jp,Japan,81,KDDI Corporation7 +440,1088,052,1327,jp,Japan,81,KDDI Corporation8 +440,1088,076,1903,jp,Japan,81,KDDI Corporation9 +440,1088,071,1823,jp,Japan,81,KDDI Corporation10 +440,1088,053,1343,jp,Japan,81,KDDI Corporation11 +440,1088,077,1919,jp,Japan,81,KDDI Corporation12 +440,1088,008,143,jp,Japan,81,KDDI Corporation13 +440,1088,072,1839,jp,Japan,81,KDDI Corporation14 +440,1088,054,1359,jp,Japan,81,KDDI Corporation15 +440,1088,079,1951,jp,Japan,81,KDDI Corporation16 +440,1088,007,127,jp,Japan,81,KDDI Corporation17 +440,1088,073,1855,jp,Japan,81,KDDI Corporation18 +440,1088,055,1375,jp,Japan,81,KDDI Corporation19 +440,1088,088,2191,jp,Japan,81,KDDI Corporation20 +440,1088,050,1295,jp,Japan,81,KDDI Corporation21 440,1088,021,543,jp,Japan,81,NTT Docomo -441,1089,044,1103,jp,Japan,81,NTT Docomo -440,1088,013,319,jp,Japan,81,NTT Docomo -440,1088,023,575,jp,Japan,81,NTT Docomo -440,1088,016,367,jp,Japan,81,NTT Docomo -441,1089,099,2463,jp,Japan,81,NTT Docomo -440,1088,034,847,jp,Japan,81,NTT Docomo -440,1088,069,1695,jp,Japan,81,NTT Docomo -440,1088,064,1615,jp,Japan,81,NTT Docomo -440,1088,037,895,jp,Japan,81,NTT Docomo -440,1088,025,607,jp,Japan,81,NTT Docomo -440,1088,022,559,jp,Japan,81,NTT Docomo -441,1089,043,1087,jp,Japan,81,NTT Docomo -440,1088,027,639,jp,Japan,81,NTT Docomo -440,1088,002,47,jp,Japan,81,NTT Docomo -440,1088,017,383,jp,Japan,81,NTT Docomo -440,1088,031,799,jp,Japan,81,NTT Docomo -440,1088,087,2175,jp,Japan,81,NTT Docomo -440,1088,065,1631,jp,Japan,81,NTT Docomo -440,1088,036,879,jp,Japan,81,NTT Docomo -441,1089,092,2351,jp,Japan,81,NTT Docomo -440,1088,012,303,jp,Japan,81,NTT Docomo -440,1088,058,1423,jp,Japan,81,NTT Docomo -440,1088,028,655,jp,Japan,81,NTT Docomo -440,1088,003,63,jp,Japan,81,NTT Docomo -440,1088,018,399,jp,Japan,81,NTT Docomo -441,1089,091,2335,jp,Japan,81,NTT Docomo -440,1088,032,815,jp,Japan,81,NTT Docomo -440,1088,061,1567,jp,Japan,81,NTT Docomo -440,1088,066,1647,jp,Japan,81,NTT Docomo -440,1088,035,863,jp,Japan,81,NTT Docomo -441,1089,093,2367,jp,Japan,81,NTT Docomo -441,1089,040,1039,jp,Japan,81,NTT Docomo -440,1088,049,1183,jp,Japan,81,NTT Docomo -440,1088,029,671,jp,Japan,81,NTT Docomo -440,1088,009,159,jp,Japan,81,NTT Docomo -440,1088,019,415,jp,Japan,81,NTT Docomo -441,1089,090,2319,jp,Japan,81,NTT Docomo -440,1088,033,831,jp,Japan,81,NTT Docomo -440,1088,060,1551,jp,Japan,81,NTT Docomo -440,1088,014,335,jp,Japan,81,NTT Docomo -441,1089,094,2383,jp,Japan,81,NTT Docomo -441,1089,041,1055,jp,Japan,81,NTT Docomo -440,1088,067,1663,jp,Japan,81,NTT Docomo -440,1088,062,1583,jp,Japan,81,NTT Docomo -440,1088,001,31,jp,Japan,81,NTT Docomo -440,1088,039,927,jp,Japan,81,NTT Docomo -440,1088,030,783,jp,Japan,81,NTT Docomo -440,1088,010,271,jp,Japan,81,NTT Docomo -440,1088,020,527,jp,Japan,81,NTT Docomo -441,1089,045,1119,jp,Japan,81,NTT Docomo -440,1088,024,591,jp,Japan,81,NTT Docomo -440,1088,015,351,jp,Japan,81,NTT Docomo -441,1089,098,2447,jp,Japan,81,NTT Docomo -441,1089,042,1071,jp,Japan,81,NTT Docomo -440,1088,068,1679,jp,Japan,81,NTT Docomo -440,1088,063,1599,jp,Japan,81,NTT Docomo -440,1088,038,911,jp,Japan,81,NTT Docomo -440,1088,026,623,jp,Japan,81,NTT Docomo -440,1088,011,287,jp,Japan,81,NTT Docomo -440,1088,099,2463,jp,Japan,81,NTT Docomo +441,1089,044,1103,jp,Japan,81,NTT Docomo2 +440,1088,013,319,jp,Japan,81,NTT Docomo3 +440,1088,023,575,jp,Japan,81,NTT Docomo4 +440,1088,016,367,jp,Japan,81,NTT Docomo5 +441,1089,099,2463,jp,Japan,81,NTT Docomo6 +440,1088,034,847,jp,Japan,81,NTT Docomo7 +440,1088,069,1695,jp,Japan,81,NTT Docomo8 +440,1088,064,1615,jp,Japan,81,NTT Docomo9 +440,1088,037,895,jp,Japan,81,NTT Docomo10 +440,1088,025,607,jp,Japan,81,NTT Docomo11 +440,1088,022,559,jp,Japan,81,NTT Docomo12 +441,1089,043,1087,jp,Japan,81,NTT Docomo13 +440,1088,027,639,jp,Japan,81,NTT Docomo14 +440,1088,002,47,jp,Japan,81,NTT Docomo15 +440,1088,017,383,jp,Japan,81,NTT Docomo16 +440,1088,031,799,jp,Japan,81,NTT Docomo17 +440,1088,087,2175,jp,Japan,81,NTT Docomo18 +440,1088,065,1631,jp,Japan,81,NTT Docomo19 +440,1088,036,879,jp,Japan,81,NTT Docomo20 +441,1089,092,2351,jp,Japan,81,NTT Docomo21 +440,1088,012,303,jp,Japan,81,NTT Docomo22 +440,1088,058,1423,jp,Japan,81,NTT Docomo23 +440,1088,028,655,jp,Japan,81,NTT Docomo24 +440,1088,003,63,jp,Japan,81,NTT Docomo25 +440,1088,018,399,jp,Japan,81,NTT Docomo26 +441,1089,091,2335,jp,Japan,81,NTT Docomo27 +440,1088,032,815,jp,Japan,81,NTT Docomo28 +440,1088,061,1567,jp,Japan,81,NTT Docomo29 +440,1088,066,1647,jp,Japan,81,NTT Docomo30 +440,1088,035,863,jp,Japan,81,NTT Docomo31 +441,1089,093,2367,jp,Japan,81,NTT Docomo32 +441,1089,040,1039,jp,Japan,81,NTT Docomo33 +440,1088,049,1183,jp,Japan,81,NTT Docomo34 +440,1088,029,671,jp,Japan,81,NTT Docomo35 +440,1088,009,159,jp,Japan,81,NTT Docomo36 +440,1088,019,415,jp,Japan,81,NTT Docomo37 +441,1089,090,2319,jp,Japan,81,NTT Docomo38 +440,1088,033,831,jp,Japan,81,NTT Docomo39 +440,1088,060,1551,jp,Japan,81,NTT Docomo40 +440,1088,014,335,jp,Japan,81,NTT Docomo41 +441,1089,094,2383,jp,Japan,81,NTT Docomo42 +441,1089,041,1055,jp,Japan,81,NTT Docomo43 +440,1088,067,1663,jp,Japan,81,NTT Docomo44 +440,1088,062,1583,jp,Japan,81,NTT Docomo45 +440,1088,001,31,jp,Japan,81,NTT Docomo46 +440,1088,039,927,jp,Japan,81,NTT Docomo47 +440,1088,030,783,jp,Japan,81,NTT Docomo48 +440,1088,010,271,jp,Japan,81,NTT Docomo49 +440,1088,020,527,jp,Japan,81,NTT Docomo50 +441,1089,045,1119,jp,Japan,81,NTT Docomo51 +440,1088,024,591,jp,Japan,81,NTT Docomo52 +440,1088,015,351,jp,Japan,81,NTT Docomo53 +441,1089,098,2447,jp,Japan,81,NTT Docomo54 +441,1089,042,1071,jp,Japan,81,NTT Docomo55 +440,1088,068,1679,jp,Japan,81,NTT Docomo56 +440,1088,063,1599,jp,Japan,81,NTT Docomo57 +440,1088,038,911,jp,Japan,81,NTT Docomo58 +440,1088,026,623,jp,Japan,81,NTT Docomo59 +440,1088,011,287,jp,Japan,81,NTT Docomo60 +440,1088,099,2463,jp,Japan,81,NTT Docomo61 440,1088,078,1935,jp,Japan,81,Okinawa Cellular Telephone 440,1088,047,1151,jp,Japan,81,SoftBank Mobile Corp -440,1088,095,2399,jp,Japan,81,SoftBank Mobile Corp -440,1088,041,1055,jp,Japan,81,SoftBank Mobile Corp -441,1089,064,1615,jp,Japan,81,SoftBank Mobile Corp -440,1088,046,1135,jp,Japan,81,SoftBank Mobile Corp -440,1088,097,2431,jp,Japan,81,SoftBank Mobile Corp -440,1088,042,1071,jp,Japan,81,SoftBank Mobile Corp -441,1089,065,1631,jp,Japan,81,SoftBank Mobile Corp -440,1088,090,2319,jp,Japan,81,SoftBank Mobile Corp -440,1088,092,2351,jp,Japan,81,SoftBank Mobile Corp -440,1088,098,2447,jp,Japan,81,SoftBank Mobile Corp -440,1088,043,1087,jp,Japan,81,SoftBank Mobile Corp -440,1088,048,1167,jp,Japan,81,SoftBank Mobile Corp -440,1088,093,2367,jp,Japan,81,SoftBank Mobile Corp -440,1088,006,111,jp,Japan,81,SoftBank Mobile Corp -441,1089,061,1567,jp,Japan,81,SoftBank Mobile Corp -440,1088,044,1103,jp,Japan,81,SoftBank Mobile Corp -440,1088,004,79,jp,Japan,81,SoftBank Mobile Corp -440,1088,094,2383,jp,Japan,81,SoftBank Mobile Corp -441,1089,062,1583,jp,Japan,81,SoftBank Mobile Corp -440,1088,045,1119,jp,Japan,81,SoftBank Mobile Corp -440,1088,040,1039,jp,Japan,81,SoftBank Mobile Corp -440,1088,096,2415,jp,Japan,81,SoftBank Mobile Corp -441,1089,063,1599,jp,Japan,81,SoftBank Mobile Corp +440,1088,095,2399,jp,Japan,81,SoftBank Mobile Corp2 +440,1088,041,1055,jp,Japan,81,SoftBank Mobile Corp3 +441,1089,064,1615,jp,Japan,81,SoftBank Mobile Corp4 +440,1088,046,1135,jp,Japan,81,SoftBank Mobile Corp5 +440,1088,097,2431,jp,Japan,81,SoftBank Mobile Corp6 +440,1088,042,1071,jp,Japan,81,SoftBank Mobile Corp7 +441,1089,065,1631,jp,Japan,81,SoftBank Mobile Corp8 +440,1088,090,2319,jp,Japan,81,SoftBank Mobile Corp9 +440,1088,092,2351,jp,Japan,81,SoftBank Mobile Corp10 +440,1088,098,2447,jp,Japan,81,SoftBank Mobile Corp11 +440,1088,043,1087,jp,Japan,81,SoftBank Mobile Corp12 +440,1088,048,1167,jp,Japan,81,SoftBank Mobile Corp13 +440,1088,093,2367,jp,Japan,81,SoftBank Mobile Corp14 +440,1088,006,111,jp,Japan,81,SoftBank Mobile Corp15 +441,1089,061,1567,jp,Japan,81,SoftBank Mobile Corp16 +440,1088,044,1103,jp,Japan,81,SoftBank Mobile Corp17 +440,1088,004,79,jp,Japan,81,SoftBank Mobile Corp18 +440,1088,094,2383,jp,Japan,81,SoftBank Mobile Corp19 +441,1089,062,1583,jp,Japan,81,SoftBank Mobile Corp20 +440,1088,045,1119,jp,Japan,81,SoftBank Mobile Corp21 +440,1088,040,1039,jp,Japan,81,SoftBank Mobile Corp22 +440,1088,096,2415,jp,Japan,81,SoftBank Mobile Corp23 +441,1089,063,1599,jp,Japan,81,SoftBank Mobile Corp24 440,1088,085,2143,jp,Japan,81,KDDI Corporation -440,1088,083,2111,jp,Japan,81,KDDI Corporation -440,1088,081,2079,jp,Japan,81,KDDI Corporation -440,1088,080,2063,jp,Japan,81,KDDI Corporation -440,1088,086,2159,jp,Japan,81,KDDI Corporation -440,1088,084,2127,jp,Japan,81,KDDI Corporation -440,1088,082,2095,jp,Japan,81,KDDI Corporation +440,1088,083,2111,jp,Japan,81,KDDI Corporation2 +440,1088,081,2079,jp,Japan,81,KDDI Corporation3 +440,1088,080,2063,jp,Japan,81,KDDI Corporation4 +440,1088,086,2159,jp,Japan,81,KDDI Corporation5 +440,1088,084,2127,jp,Japan,81,KDDI Corporation6 +440,1088,082,2095,jp,Japan,81,KDDI Corporation7 416,1046,077,1919,jo,Jordan,962,Orange/Petra 416,1046,003,63,jo,Jordan,962,Umniah Mobile Co. 416,1046,002,2,jo,Jordan,962,Xpress @@ -786,8 +792,8 @@ 545,1349,009,9,ki,Kiribati,686,Kiribati Frigate 467,1127,193,403,kp,Korea N. Dem. People's Rep.,850,Sun Net 450,1104,002,47,kr,Korea S Republic of,82,KT Freetel Co. Ltd. -450,1104,004,79,kr,Korea S Republic of,82,KT Freetel Co. Ltd. -450,1104,008,143,kr,Korea S Republic of,82,KT Freetel Co. Ltd. +450,1104,004,79,kr,Korea S Republic of,82,KT Freetel Co. Ltd.2 +450,1104,008,143,kr,Korea S Republic of,82,KT Freetel Co. Ltd.3 450,1104,006,111,kr,Korea S Republic of,82,LG Telecom 450,1104,003,63,kr,Korea S Republic of,82,SK Telecom 450,1104,005,95,kr,Korea S Republic of,82,SK Telecom Co. Ltd @@ -811,28 +817,28 @@ 247,583,002,47,lv,Latvia,371,Tele2 247,583,003,63,lv,Latvia,371,TRIATEL/Telekom Baltija 415,1045,033,831,lb,Lebanon,961,Cellis -415,1045,032,815,lb,Lebanon,961,Cellis -415,1045,035,863,lb,Lebanon,961,Cellis +415,1045,032,815,lb,Lebanon,961,Cellis2 +415,1045,035,863,lb,Lebanon,961,Cellis3 415,1045,034,847,lb,Lebanon,961,FTML Cellis 415,1045,039,927,lb,Lebanon,961,MIC2/LibanCell -415,1045,038,911,lb,Lebanon,961,MIC2/LibanCell -415,1045,037,895,lb,Lebanon,961,MIC2/LibanCell +415,1045,038,911,lb,Lebanon,961,MIC2/LibanCell2 +415,1045,037,895,lb,Lebanon,961,MIC2/LibanCell3 415,1045,001,31,lb,Lebanon,961,MIC1 (Alfa) -415,1045,003,63,lb,Lebanon,961,MIC2/LibanCell +415,1045,003,63,lb,Lebanon,961,Touch 415,1045,036,879,lb,Lebanon,961,MIC2/LibanCell 651,1617,002,47,ls,Lesotho,266,Econet/Ezi-cel 651,1617,001,31,ls,Lesotho,266,Vodacom Lesotho 618,1560,007,127,lr,Liberia,231,Celcom -618,1560,003,63,lr,Liberia,231,Celcom +618,1560,003,63,lr,Liberia,231,Celcom2 618,1560,004,79,lr,Liberia,231,Comium BVI 618,1560,002,47,lr,Liberia,231,Libercell 618,1560,020,527,lr,Liberia,231,LibTelco 618,1560,001,31,lr,Liberia,231,Lonestar 606,1542,002,47,ly,Libya,218,Al-Madar -606,1542,001,31,ly,Libya,218,Al-Madar +606,1542,001,31,ly,Libya,218,Al-Madar2 606,1542,006,111,ly,Libya,218,Hatef 606,1542,000,15,ly,Libya,218,Libyana -606,1542,003,63,ly,Libya,218,Libyana +606,1542,003,63,ly,Libya,218,Libyana2 295,661,006,111,li,Liechtenstein,423,CUBIC (Liechtenstein 295,661,007,127,li,Liechtenstein,423,First Mobile AG 295,661,005,95,li,Liechtenstein,423,Mobilkom AG @@ -846,14 +852,14 @@ 270,624,001,31,lu,Luxembourg,352,P+T LUXGSM 270,624,099,2463,lu,Luxembourg,352,VOXmobile S.A. 455,1109,004,79,mo,Macao China,853,C.T.M. TELEMOVEL+ -455,1109,001,31,mo,Macao China,853,C.T.M. TELEMOVEL+ +455,1109,001,31,mo,Macao China,853,C.T.M. TELEMOVEL+2 455,1109,002,47,mo,Macao China,853,China Telecom 455,1109,005,95,mo,Macao China,853,Hutchison Telephone (Macau) Company Ltd -455,1109,003,63,mo,Macao China,853,Hutchison Telephone (Macau) Company Ltd +455,1109,003,63,mo,Macao China,853,Hutchison Telephone (Macau) Company Ltd-2 455,1109,006,111,mo,Macao China,853,Smartone Mobile -455,1109,000,15,mo,Macao China,853,Smartone Mobile +455,1109,000,15,mo,Macao China,853,Smartone Mobile-2 294,660,075,1887,mk,Macedonia,389,MTS/Cosmofone -294,660,002,47,mk,Macedonia,389,MTS/Cosmofone +294,660,002,47,mk,Macedonia,389,MTS/Cosmofone2 294,660,001,31,mk,Macedonia,389,T-Mobile/Mobimak 294,660,003,63,mk,Macedonia,389,VIP Mobile 646,1606,001,31,mg,Madagascar,261,MADACOM @@ -865,12 +871,12 @@ 502,1282,001,31,my,Malaysia,60,Art900 502,1282,151,337,my,Malaysia,60,Baraka Telecom Sdn Bhd 502,1282,013,319,my,Malaysia,60,CelCom -502,1282,019,415,my,Malaysia,60,CelCom +502,1282,019,415,my,Malaysia,60,CelCom2 502,1282,016,367,my,Malaysia,60,Digi Telecommunications -502,1282,010,271,my,Malaysia,60,Digi Telecommunications +502,1282,010,271,my,Malaysia,60,Digi Telecommunications-2 502,1282,020,527,my,Malaysia,60,Electcoms Wireless Sdn Bhd 502,1282,012,303,my,Malaysia,60,Maxis -502,1282,017,383,my,Malaysia,60,Maxis +502,1282,017,383,my,Malaysia,60,Maxis2 502,1282,011,287,my,Malaysia,60,MTX Utara 502,1282,153,339,my,Malaysia,60,Packet One Networks (Malaysia) Sdn Bhd 502,1282,155,341,my,Malaysia,60,Samata Communications Sdn Bhd @@ -886,40 +892,40 @@ 278,632,001,31,mt,Malta,356,Vodafone 340,832,002,47,mq,Martinique (French Department of),,Outremer Telecom Martinique (only) (Martinique 340,832,012,303,mq,Martinique (French Department of),,United Telecommunications Services Caraibe SARL (UTS Caraibe Martinique Telephone Mobile) (Martinique -340,832,003,63,mq,Martinique (French Department of),,United Telecommunications Services Caraibe SARL (UTS Caraibe Martinique Telephone Mobile) (Martinique +340,832,003,63,mq,Martinique (French Department of),,United Telecommunications Services Caraibe SARL (UTS Caraibe Martinique Telephone Mobile) (Martinique-2 609,1545,002,47,mr,Mauritania,222,Chinguitel SA 609,1545,001,31,mr,Mauritania,222,Mattel 609,1545,010,271,mr,Mauritania,222,Mauritel 617,1559,010,271,mu,Mauritius,230,Emtel Ltd 617,1559,002,47,mu,Mauritius,230,Mahanagar Telephone -617,1559,003,63,mu,Mauritius,230,Mahanagar Telephone +617,1559,003,63,mu,Mauritius,230,Mahanagar Telephone2 617,1559,001,31,mu,Mauritius,230,Orange/Cellplus 334,820,000,15,mx,Mexico,52,Axtel 334,820,050,1295,mx,Mexico,52,IUSACell/UneFon 334,820,050,80,mx,Mexico,52,IUSACell/UneFon -334,820,040,64,mx,Mexico,52,IUSACell/UneFon -334,820,004,79,mx,Mexico,52,IUSACell/UneFon +334,820,040,64,mx,Mexico,52,IUSACell/UneFon2 +334,820,004,79,mx,Mexico,52,IUSACell/UneFon3 334,820,003,63,mx,Mexico,52,Movistar/Pegaso -334,820,030,48,mx,Mexico,52,Movistar/Pegaso +334,820,030,48,mx,Mexico,52,Movistar/Pegaso2 334,820,001,31,mx,Mexico,52,NEXTEL -334,820,090,144,mx,Mexico,52,NEXTEL -334,820,010,16,mx,Mexico,52,NEXTEL +334,820,090,144,mx,Mexico,52,NEXTEL2 +334,820,010,16,mx,Mexico,52,NEXTEL3 334,820,080,128,mx,Mexico,52,Operadora Unefon SA de CV -334,820,070,112,mx,Mexico,52,Operadora Unefon SA de CV +334,820,070,112,mx,Mexico,52,Operadora Unefon SA de CV2 334,820,060,96,mx,Mexico,52,SAI PCS -334,820,000,15,mx,Mexico,52,SAI PCS +334,820,000,15,mx,Mexico,52,SAI PCS-2 334,820,002,47,mx,Mexico,52,TelCel/America Movil -334,820,020,32,mx,Mexico,52,TelCel/America Movil +334,820,020,32,mx,Mexico,52,TelCel/America Movil-2 550,1360,001,31,fm,Micronesia,691,FSM Telecom 259,601,004,79,md,Moldova,373,Eventis Mobile 259,601,099,2463,md,Moldova,373,IDC/Unite -259,601,005,95,md,Moldova,373,IDC/Unite -259,601,003,63,md,Moldova,373,IDC/Unite +259,601,005,95,md,Moldova,373,IDC/Unite2 +259,601,003,63,md,Moldova,373,IDC/Unite3 259,601,002,47,md,Moldova,373,Moldcell 259,601,001,31,md,Moldova,373,Orange/Voxtel 212,530,001,31,mc,Monaco,377,Dardafone LLC 212,530,010,271,mc,Monaco,377,Monaco Telecom -212,530,001,31,mc,Monaco,377,Monaco Telecom +212,530,001,31,mc,Monaco,377,Monaco Telecom2 212,530,001,31,mc,Monaco,377,Post and Telecommunications of Kosovo JSC (PTK) 428,1064,098,2447,mn,Mongolia,976,G-Mobile Corporation Ltd 428,1064,099,2463,mn,Mongolia,976,Mobicom @@ -946,8 +952,8 @@ 204,516,005,95,nl,Netherlands,31,Elephant Talk Communications Premium Rate Services Netherlands BV 204,516,017,383,nl,Netherlands,31,Intercity Mobile Communications BV 204,516,010,271,nl,Netherlands,31,KPN Telecom B.V. -204,516,008,143,nl,Netherlands,31,KPN Telecom B.V. -204,516,069,1695,nl,Netherlands,31,KPN Telecom B.V. +204,516,008,143,nl,Netherlands,31,KPN Telecom B.V.2 +204,516,069,1695,nl,Netherlands,31,KPN Telecom B.V.3 204,516,012,303,nl,Netherlands,31,KPN/Telfort 204,516,028,655,nl,Netherlands,31,Lancelot BV 204,516,009,159,nl,Netherlands,31,Lycamobile Ltd @@ -955,7 +961,7 @@ 204,516,021,543,nl,Netherlands,31,NS Railinfrabeheer B.V. 204,516,024,591,nl,Netherlands,31,Private Mobility Nederland BV 204,516,098,2447,nl,Netherlands,31,T-Mobile B.V. -204,516,016,367,nl,Netherlands,31,T-Mobile B.V. +204,516,016,367,nl,Netherlands,31,T-Mobile B.V.2 204,516,020,527,nl,Netherlands,31,Orange/T-mobile 204,516,002,47,nl,Netherlands,31,Tele2 204,516,007,127,nl,Netherlands,31,Teleena Holding BV @@ -982,7 +988,7 @@ 710,1808,073,1855,ni,Nicaragua,505,Claro 614,1556,003,63,ne,Niger,227,Etisalat/TeleCel 614,1556,004,79,ne,Niger,227,Orange/Sahelc. -614,1556,001,31,ne,Niger,227,Orange/Sahelc. +614,1556,001,31,ne,Niger,227,Orange/Sahelc.2 614,1556,002,47,ne,Niger,227,Zain/CelTel 621,1569,020,527,ng,Nigeria,234,Airtel/ZAIN/Econet 621,1569,060,1551,ng,Nigeria,234,ETISALAT @@ -991,20 +997,20 @@ 621,1569,030,783,ng,Nigeria,234,MTN 621,1569,099,2463,ng,Nigeria,234,Starcomms 621,1569,025,607,ng,Nigeria,234,Visafone -621,1569,001,31,ng,Nigeria,234,Visafone +621,1569,001,31,ng,Nigeria,234,Visafone2 555,1365,001,31,nu,Niue,,Niue Telecom 242,578,009,159,no,Norway,47,Com4 AS 242,578,020,527,no,Norway,47,Jernbaneverket (GSM-R) -242,578,021,543,no,Norway,47,Jernbaneverket (GSM-R) +242,578,021,543,no,Norway,47,Jernbaneverket (GSM-R)-2 242,578,023,575,no,Norway,47,Lycamobile Ltd 242,578,002,47,no,Norway,47,Netcom 242,578,022,559,no,Norway,47,Network Norway AS -242,578,005,95,no,Norway,47,Network Norway AS +242,578,005,95,no,Norway,47,Network Norway AS-2 242,578,006,6,no,Norway,47,ICE Nordisk Mobiltelefon AS 242,578,008,143,no,Norway,47,TDC Mobil A/S 242,578,004,79,no,Norway,47,Tele2 242,578,012,303,no,Norway,47,Telenor -242,578,001,31,no,Norway,47,Telenor +242,578,001,31,no,Norway,47,Telenor2 242,578,003,63,no,Norway,47,Teletopia 242,578,007,127,no,Norway,47,Ventelo AS 422,1058,003,63,om,Oman,968,Nawras @@ -1023,7 +1029,7 @@ 714,1812,003,63,pa,Panama,507,Claro 714,1812,004,79,pa,Panama,507,Digicel 714,1812,020,32,pa,Panama,507,Movistar -714,1812,002,47,pa,Panama,507,Movistar +714,1812,002,47,pa,Panama,507,Movistar2 537,1335,003,63,pg,Papua New Guinea,675,Digicel 537,1335,002,47,pg,Papua New Guinea,675,GreenCom PNG Ltd 537,1335,001,31,pg,Papua New Guinea,675,Pacific Mobile @@ -1033,14 +1039,14 @@ 744,1860,005,5,py,Paraguay,595,TIM/Nucleo/Personal 744,1860,004,79,py,Paraguay,595,Tigo/Telecel 716,1814,020,527,pe,Peru,51,Claro /Amer.Mov./TIM -716,1814,010,271,pe,Peru,51,Claro /Amer.Mov./TIM +716,1814,010,271,pe,Peru,51,Claro /Amer.Mov./TIM-2 716,1814,002,47,pe,Peru,51,GlobalStar -716,1814,001,31,pe,Peru,51,GlobalStar +716,1814,001,31,pe,Peru,51,GlobalStar2 716,1814,006,111,pe,Peru,51,Movistar 716,1814,007,127,pe,Peru,51,Nextel 515,1301,000,15,ph,Philippines,63,Fix Line 515,1301,001,31,ph,Philippines,63,Globe Telecom -515,1301,002,47,ph,Philippines,63,Globe Telecom +515,1301,002,47,ph,Philippines,63,Globe Telecom2 515,1301,088,2191,ph,Philippines,63,Next Mobile 515,1301,018,399,ph,Philippines,63,RED Mobile/Cure 515,1301,003,63,ph,Philippines,63,Smart @@ -1056,21 +1062,21 @@ 260,608,007,127,pl,Poland,48,Play/P4 260,608,011,287,pl,Poland,48,NORDISK Polska 260,608,005,95,pl,Poland,48,Orange/IDEA/Centertel -260,608,003,63,pl,Poland,48,Orange/IDEA/Centertel +260,608,003,63,pl,Poland,48,Orange/IDEA/Centertel2 260,608,035,863,pl,Poland,48,PKP Polskie Linie Kolejowe S.A. 260,608,098,2447,pl,Poland,48,Play/P4 -260,608,006,111,pl,Poland,48,Play/P4 +260,608,006,111,pl,Poland,48,Play/P4-2 260,608,001,31,pl,Poland,48,Polkomtel/Plus 260,608,010,271,pl,Poland,48,Sferia -260,608,014,335,pl,Poland,48,Sferia -260,608,013,319,pl,Poland,48,Sferia +260,608,014,335,pl,Poland,48,Sferia2 +260,608,013,319,pl,Poland,48,Sferia3 260,608,034,847,pl,Poland,48,T-Mobile/ERA -260,608,002,47,pl,Poland,48,T-Mobile/ERA +260,608,002,47,pl,Poland,48,T-Mobile/ERA-2 260,608,015,351,pl,Poland,48,Tele2 260,608,004,79,pl,Poland,48,Tele2 268,616,004,79,pt,Portugal,351,CTT - Correios de Portugal SA 268,616,003,63,pt,Portugal,351,Optimus -268,616,007,127,pt,Portugal,351,Optimus +268,616,007,127,pt,Portugal,351,Optimus2 268,616,006,111,pt,Portugal,351,TMN 268,616,001,31,pt,Portugal,351,Vodafone 330,816,011,287,pr,Puerto Rico,,Puerto Rico Telephone Company Inc. (PRTC) @@ -1086,7 +1092,7 @@ 226,550,002,47,ro,Romania,40,Romtelecom SA 226,550,006,111,ro,Romania,40,Telemobil/Zapp 226,550,001,31,ro,Romania,40,Vodafone -226,550,004,79,ro,Romania,40,Telemobil/Zapp +226,550,004,79,ro,Romania,40,Telemobil/Zapp-2 250,592,012,303,ru,Russian Federation,79,Baykal Westcom 250,592,028,655,ru,Russian Federation,79,Bee Line GSM 250,592,010,271,ru,Russian Federation,79,DTC/Don Telecom @@ -1107,12 +1113,12 @@ 250,592,020,527,ru,Russian Federation,79,Tele2/ECC/Volgogr. 250,592,093,2367,ru,Russian Federation,79,Telecom XXL 250,592,039,927,ru,Russian Federation,79,U-Tel/Ermak RMS -250,592,017,383,ru,Russian Federation,79,U-Tel/Ermak RMS +250,592,017,383,ru,Russian Federation,79,U-Tel/Ermak RMS-2 250,592,039,927,ru,Russian Federation,79,UralTel -250,592,017,383,ru,Russian Federation,79,UralTel +250,592,017,383,ru,Russian Federation,79,UralTel2 250,592,005,95,ru,Russian Federation,79,Yenisey Telecom 250,592,015,351,ru,Russian Federation,79,ZAO SMARTS -250,592,007,127,ru,Russian Federation,79,ZAO SMARTS +250,592,007,127,ru,Russian Federation,79,ZAO SMARTS-2 635,1589,014,335,rw,Rwanda,250,Airtel Rwanda Ltd 635,1589,010,271,rw,Rwanda,250,MTN/Rwandacell 635,1589,013,319,rw,Rwanda,250,TIGO @@ -1139,13 +1145,13 @@ 608,1544,002,47,sn,Senegal,221,Sentel GSM 220,544,003,63,rs,Serbia,381,MTS/Telekom Srbija 220,544,002,47,rs,Serbia,381,Telenor/Mobtel -220,544,001,1,rs,Serbia,381,Telenor/Mobtel +220,544,001,1,rs,Serbia,381,Telenor/Mobtel2 220,544,005,95,rs,Serbia,381,VIP Mobile 633,1587,010,271,sc,Seychelles,248,Airtel 633,1587,001,31,sc,Seychelles,248,C&W 633,1587,002,47,sc,Seychelles,248,Smartcom 619,1561,003,3,sl,Sierra Leone,232,Africel -619,1561,005,5,sl,Sierra Leone,232,Africel +619,1561,005,5,sl,Sierra Leone,232,Africel2 619,1561,001,1,sl,Sierra Leone,232,Zain/Celtel 619,1561,004,4,sl,Sierra Leone,232,Comium 619,1561,002,2,sl,Sierra Leone,232,Tigo/Millicom @@ -1153,18 +1159,18 @@ 525,1317,012,303,sg,Singapore,65,GRID Communications Pte Ltd 525,1317,003,63,sg,Singapore,65,MobileOne Ltd 525,1317,001,31,sg,Singapore,65,Singtel -525,1317,007,127,sg,Singapore,65,Singtel -525,1317,002,47,sg,Singapore,65,Singtel +525,1317,007,127,sg,Singapore,65,Singtel2 +525,1317,002,47,sg,Singapore,65,Singtel3 525,1317,006,111,sg,Singapore,65,Starhub -525,1317,005,95,sg,Singapore,65,Starhub +525,1317,005,95,sg,Singapore,65,Starhub2 362,866,051,1311,sx,Sint Maarten (Dutch part),,TelCell NV (Sint Maarten 362,866,091,2335,sx,Sint Maarten (Dutch part),,UTS St. Maarten (Sint Maarten 231,561,006,111,sk,Slovakia,421,O2 231,561,001,31,sk,Slovakia,421,Orange -231,561,005,95,sk,Slovakia,421,Orange +231,561,005,95,sk,Slovakia,421,Orange2 231,561,015,351,sk,Slovakia,421,Orange 231,561,002,47,sk,Slovakia,421,T-Mobile -231,561,004,79,sk,Slovakia,421,T-Mobile +231,561,004,79,sk,Slovakia,421,T-Mobile3 231,561,099,2463,sk,Slovakia,421,Zeleznice Slovenskej republiky (ZSR) 293,659,041,1055,si,Slovenia,386,Dukagjini Telecommunications Sh.P.K. 293,659,041,1055,si,Slovenia,386,Ipko Telecommunications d. o. o. @@ -1175,11 +1181,11 @@ 293,659,070,1807,si,Slovenia,386,TusMobil/VEGA 540,1344,002,47,sb,Solomon Islands,677,bemobile 540,1344,010,271,sb,Solomon Islands,677,BREEZE -540,1344,001,31,sb,Solomon Islands,677,BREEZE +540,1344,001,31,sb,Solomon Islands,677,BREEZE2 637,1591,030,783,so,Somalia,252,Golis 637,1591,019,415,so,Somalia,252,HorTel 637,1591,060,1551,so,Somalia,252,Nationlink -637,1591,010,271,so,Somalia,252,Nationlink +637,1591,010,271,so,Somalia,252,Nationlink2 637,1591,004,4,so,Somalia,252,Somafone 637,1591,082,2095,so,Somalia,252,Telcom Mobile Somalia 637,1591,001,31,so,Somalia,252,Telesom @@ -1187,7 +1193,7 @@ 655,1621,021,543,za,South Africa,27,Cape Town Metropolitan 655,1621,007,127,za,South Africa,27,Cell C 655,1621,012,303,za,South Africa,27,MTN -655,1621,010,271,za,South Africa,27,MTN +655,1621,010,271,za,South Africa,27,MTN2 655,1621,006,111,za,South Africa,27,Sentech 655,1621,001,31,za,South Africa,27,Vodacom 655,1621,019,415,za,South Africa,27,Wireless Business Solutions (Pty) Ltd @@ -1196,7 +1202,7 @@ 659,1625,004,79,ss,South Sudan (Republic of),,Network of The World Ltd (NOW) (South Sudan 659,1625,006,111,ss,South Sudan (Republic of),,Zain South Sudan (South Sudan 214,532,023,575,es,Spain,34,Lycamobile SL -214,532,022,559,es,Spain,34,Movistar +214,532,022,559,es,Spain,34,Movistar2 214,532,015,351,es,Spain,34,BT Espana Compania de Servicios Globales de Telecomunicaciones SAU 214,532,018,399,es,Spain,34,Cableuropa SAU (ONO) 214,532,008,143,es,Spain,34,Euskaltel SA @@ -1204,11 +1210,11 @@ 214,532,021,543,es,Spain,34,Jazz Telecom SAU 214,532,026,623,es,Spain,34,Lleida 214,532,025,607,es,Spain,34,Lycamobile SL -214,532,007,127,es,Spain,34,Movistar2 -214,532,005,95,es,Spain,34,Movistar -214,532,009,159,es,Spain,34,Orange -214,532,003,63,es,Spain,34,Orange2 -214,532,011,287,es,Spain,34,Orange +214,532,007,127,es,Spain,34,Movistar +214,532,005,95,es,Spain,34,Movistar (resellers) +214,532,009,159,es,Spain,34,Orange (resellers) +214,532,003,63,es,Spain,34,Orange +214,532,011,287,es,Spain,34,Orange2 214,532,017,383,es,Spain,34,R Cable y Telecomunicaciones Galicia SA 214,532,019,415,es,Spain,34,Simyo/KPN 214,532,016,367,es,Spain,34,Telecable de Asturias SA @@ -1224,18 +1230,18 @@ 308,776,001,31,pm,St. Pierre & Miquelon,508,Ameris 360,864,110,272,vc,St. Vincent & Gren.,1784,C & W 360,864,010,271,vc,St. Vincent & Gren.,1784,Cingular -360,864,100,256,vc,St. Vincent & Gren.,1784,Cingular +360,864,100,256,vc,St. Vincent & Gren.,1784,Cingular-2 360,864,050,80,vc,St. Vincent & Gren.,1784,Digicel 360,864,070,1807,vc,St. Vincent & Gren.,1784,Digicel 634,1588,000,15,sd,Sudan,249,Canar Telecom 634,1588,022,559,sd,Sudan,249,MTN 634,1588,002,47,sd,Sudan,249,MTN 634,1588,015,351,sd,Sudan,249,Sudani One -634,1588,007,127,sd,Sudan,249,Sudani One +634,1588,007,127,sd,Sudan,249,Sudani One-2 634,1588,005,95,sd,Sudan,249,Vivacell 634,1588,008,143,sd,Sudan,249,Vivacell 634,1588,001,31,sd,Sudan,249,ZAIN/Mobitel -634,1588,006,111,sd,Sudan,249,ZAIN/Mobitel +634,1588,006,111,sd,Sudan,249,ZAIN/Mobitel-2 746,1862,003,63,sr,Suriname,597,Digicel 746,1862,002,47,sr,Suriname,597,Telecommunicatiebedrijf Suriname (TELESUR) 746,1862,001,1,sr,Suriname,597,Telesur @@ -1243,7 +1249,7 @@ 653,1619,010,271,sz,Swaziland,268,Swazi MTN 653,1619,001,31,sz,Swaziland,268,SwaziTelecom 240,576,035,863,se,Sweden,46,42 Telecom AB -240,576,016,367,se,Sweden,46,42 Telecom AB +240,576,016,367,se,Sweden,46,42 Telecom AB-2 240,576,026,623,se,Sweden,46,Beepsend 240,576,000,15,se,Sweden,46,Compatel 240,576,028,655,se,Sweden,46,CoolTEL Aps @@ -1253,7 +1259,7 @@ 240,576,018,399,se,Sweden,46,Generic Mobile Systems Sweden AB 240,576,017,383,se,Sweden,46,Gotalandsnatet AB 240,576,002,47,se,Sweden,46,H3G Access AB -240,576,004,79,se,Sweden,46,H3G Access AB +240,576,004,79,se,Sweden,46,H3G Access AB-2 240,576,036,879,se,Sweden,46,ID Mobile 240,576,023,575,se,Sweden,46,Infobip Ltd. 240,576,011,287,se,Sweden,46,Lindholmen Science Park AB @@ -1264,14 +1270,14 @@ 240,576,014,335,se,Sweden,46,TDC Sverige AB 240,576,007,127,se,Sweden,46,Tele2 Sverige AB 240,576,005,95,se,Sweden,46,Tele2 Sverige AB -240,576,024,591,se,Sweden,46,Tele2 Sverige AB +240,576,024,591,se,Sweden,46,Tele2 Sverige AB-2 240,576,024,591,se,Sweden,46,Telenor (Vodafone) -240,576,008,143,se,Sweden,46,Telenor (Vodafone) -240,576,004,79,se,Sweden,46,Telenor (Vodafone) -240,576,006,111,se,Sweden,46,Telenor (Vodafone) +240,576,008,143,se,Sweden,46,Telenor (Vodafone)-2 +240,576,004,79,se,Sweden,46,Telenor (Vodafone)-3 +240,576,006,111,se,Sweden,46,Telenor (Vodafone)-4 240,576,009,159,se,Sweden,46,Telenor Mobile Sverige AS 240,576,005,95,se,Sweden,46,Telia Mobile -240,576,001,31,se,Sweden,46,Telia Mobile +240,576,001,31,se,Sweden,46,Telia Mobile-2 240,576,000,15,se,Sweden,46,EUTel 240,576,008,143,se,Sweden,46,Timepiece Servicos De Consultoria LDA (Universal Telecom) 240,576,013,319,se,Sweden,46,Ventelo Sverige AB @@ -1285,22 +1291,22 @@ 228,552,052,1327,ch,Switzerland,41,Mundio Mobile AG 228,552,003,63,ch,Switzerland,41,Orange 228,552,001,31,ch,Switzerland,41,Swisscom -228,552,012,303,ch,Switzerland,41,TDC Sunrise -228,552,002,47,ch,Switzerland,41,TDC Sunrise -228,552,008,143,ch,Switzerland,41,TDC Sunrise +228,552,012,303,ch,Switzerland,41,TDC Sunrise2 +228,552,002,47,ch,Switzerland,41,TDC Sunrise3 +228,552,008,143,ch,Switzerland,41,TDC Sunrise4 228,552,053,1343,ch,Switzerland,41,upc cablecom GmbH 417,1047,002,47,sy,Syrian Arab Republic,963,MTN/Spacetel 417,1047,009,159,sy,Syrian Arab Republic,963,Syriatel Holdings -417,1047,001,31,sy,Syrian Arab Republic,963,Syriatel Holdings +417,1047,001,31,sy,Syrian Arab Republic,963,Syriatel Holdings2 466,1126,068,1679,tw,Taiwan,886,ACeS Taiwan - ACeS Taiwan Telecommunications Co Ltd 466,1126,005,95,tw,Taiwan,886,Asia Pacific Telecom Co. Ltd (APT) 466,1126,011,287,tw,Taiwan,886,Chunghwa Telecom LDM -466,1126,092,2351,tw,Taiwan,886,Chunghwa Telecom LDM +466,1126,092,2351,tw,Taiwan,886,Chunghwa Telecom LDM-2 466,1126,002,47,tw,Taiwan,886,Far EasTone -466,1126,001,31,tw,Taiwan,886,Far EasTone -466,1126,007,127,tw,Taiwan,886,Far EasTone -466,1126,006,111,tw,Taiwan,886,Far EasTone -466,1126,003,63,tw,Taiwan,886,Far EasTone +466,1126,001,31,tw,Taiwan,886,Far EasTone2 +466,1126,007,127,tw,Taiwan,886,Far EasTone3 +466,1126,006,111,tw,Taiwan,886,Far EasTone4 +466,1126,003,63,tw,Taiwan,886,Far EasTone6 466,1126,010,271,tw,Taiwan,886,Global Mobile Corp. 466,1126,056,1391,tw,Taiwan,886,International Telecom Co. Ltd (FITEL) 466,1126,088,2191,tw,Taiwan,886,KG Telecom @@ -1338,7 +1344,7 @@ 514,1300,001,31,tl,Timor-Leste,670,Telin/ Telkomcel 514,1300,002,47,tl,Timor-Leste,670,Timor Telecom 615,1557,002,2,tg,Togo,228,Telecel/MOOV -615,1557,003,63,tg,Togo,228,Telecel/MOOV +615,1557,003,63,tg,Togo,228,Telecel/MOOV-2 615,1557,001,31,tg,Togo,228,Togo Telecom/TogoCELL 539,1337,043,1087,to,Tonga,676,Shoreline Communication 539,1337,001,1,to,Tonga,676,Tonga Communications @@ -1349,7 +1355,7 @@ 605,1541,003,63,tn,Tunisia,216,Orascom Telecom 605,1541,002,47,tn,Tunisia,216,Tunisie Telecom 286,646,004,79,tr,Turkey,90,AVEA/Aria -286,646,003,63,tr,Turkey,90,AVEA/Aria +286,646,003,63,tr,Turkey,90,AVEA/Aria-2 286,646,001,31,tr,Turkey,90,Turkcell 286,646,002,47,tr,Turkey,90,Vodafone-Telsim 438,1080,001,31,tm,Turkmenistan,993,Barash Communication @@ -1372,7 +1378,7 @@ 255,597,039,927,ua,Ukraine,380,Golden Telecom 255,597,004,79,ua,Ukraine,380,Intertelecom Ltd (IT) 255,597,067,1663,ua,Ukraine,380,KyivStar -255,597,003,63,ua,Ukraine,380,KyivStar +255,597,003,63,ua,Ukraine,380,KyivStar2 255,597,021,543,ua,Ukraine,380,Telesystems Of Ukraine CJSC (TSU) 255,597,007,127,ua,Ukraine,380,TriMob LLC 255,597,050,1295,ua,Ukraine,380,UMC/MTS @@ -1381,13 +1387,13 @@ 255,597,068,1679,ua,Ukraine,380,Beeline 424,1060,003,63,ae,United Arab Emirates,971,DU 431,1073,002,47,ae,United Arab Emirates,971,Etisalat -430,1072,002,47,ae,United Arab Emirates,971,Etisalat -424,1060,002,47,ae,United Arab Emirates,971,Etisalat +430,1072,002,47,ae,United Arab Emirates,971,Etisalat-2 +424,1060,002,47,ae,United Arab Emirates,971,Etisalat-3 234,564,003,63,gb,United Kingdom,44,Airtel/Vodafone 234,564,076,1903,gb,United Kingdom,44,BT Group -234,564,077,1919,gb,United Kingdom,44,BT Group +234,564,077,1919,gb,United Kingdom,44,BT Group2 234,564,007,127,gb,United Kingdom,44,Cable and Wireless -234,564,092,2351,gb,United Kingdom,44,Cable and Wireless +234,564,092,2351,gb,United Kingdom,44,Cable and Wireless-2 234,564,036,879,gb,United Kingdom,44,Calbe and Wireless Isle of Man 234,564,018,399,gb,United Kingdom,44,Cloud9/wire9 Tel. 235,565,002,47,gb,United Kingdom,44,Everyth. Ev.wh. @@ -1395,7 +1401,7 @@ 234,564,055,1375,gb,United Kingdom,44,Guernsey Telecoms 234,564,014,335,gb,United Kingdom,44,HaySystems 234,564,094,2383,gb,United Kingdom,44,Hutchinson 3G -234,564,020,527,gb,United Kingdom,44,Hutchinson 3G +234,564,020,527,gb,United Kingdom,44,Hutchinson 3G-2 234,564,075,1887,gb,United Kingdom,44,Inquam Telecom Ltd 234,564,050,1295,gb,United Kingdom,44,Jersey Telecom 234,564,035,863,gb,United Kingdom,44,JSC Ingenicum @@ -1409,15 +1415,15 @@ 234,564,008,143,gb,United Kingdom,44,OnePhone 234,564,016,367,gb,United Kingdom,44,Opal Telecom 234,564,034,847,gb,United Kingdom,44,Everyth. Ev.wh./Orange -234,564,033,831,gb,United Kingdom,44,Everyth. Ev.wh./Orange +234,564,033,831,gb,United Kingdom,44,Everyth. Ev.wh./Orange-2 234,564,019,415,gb,United Kingdom,44,PMN/Teleware 234,564,012,303,gb,United Kingdom,44,Railtrack Plc 234,564,022,559,gb,United Kingdom,44,Routotelecom 234,564,024,591,gb,United Kingdom,44,Stour Marine 234,564,037,895,gb,United Kingdom,44,Synectiv Ltd. 234,564,031,799,gb,United Kingdom,44,Everyth. Ev.wh./T-Mobile -234,564,030,783,gb,United Kingdom,44,Everyth. Ev.wh./T-Mobile -234,564,032,815,gb,United Kingdom,44,Everyth. Ev.wh./T-Mobile +234,564,030,783,gb,United Kingdom,44,Everyth. Ev.wh./T-Mobile-2 +234,564,032,815,gb,United Kingdom,44,Everyth. Ev.wh./T-Mobile-3 234,564,027,639,gb,United Kingdom,44,Vodafone 234,564,009,159,gb,United Kingdom,44,Tismi 234,564,025,607,gb,United Kingdom,44,Truphone @@ -1437,67 +1443,67 @@ 311,785,030,48,us,United States,1,Americell PA3 LP 310,784,710,1808,us,United States,1,Arctic Slope Telephone Association Cooperative Inc. 310,784,380,896,us,United States,1,AT&T Wireless Inc. -310,784,170,368,us,United States,1,AT&T Wireless Inc. -310,784,150,336,us,United States,1,AT&T Wireless Inc. -310,784,680,1664,us,United States,1,AT&T Wireless Inc. -310,784,070,112,us,United States,1,AT&T Wireless Inc. -310,784,560,1376,us,United States,1,AT&T Wireless Inc. -310,784,410,1040,us,United States,1,AT&T Wireless Inc. -310,784,980,2432,us,United States,1,AT&T Wireless Inc. +310,784,170,368,us,United States,1,AT&T Wireless Inc.2 +310,784,150,336,us,United States,1,AT&T Wireless Inc.3 +310,784,680,1664,us,United States,1,AT&T Wireless Inc.4 +310,784,070,112,us,United States,1,AT&T Wireless Inc.5 +310,784,560,1376,us,United States,1,AT&T Wireless Inc.6 +310,784,410,1040,us,United States,1,AT&T Wireless Inc.7 +310,784,980,2432,us,United States,1,AT&T Wireless Inc.8 311,785,440,1088,us,United States,1,Bluegrass Wireless LLC -311,785,810,2064,us,United States,1,Bluegrass Wireless LLC -311,785,800,2048,us,United States,1,Bluegrass Wireless LLC +311,785,810,2064,us,United States,1,Bluegrass Wireless LLC-2 +311,785,800,2048,us,United States,1,Bluegrass Wireless LLC-3 310,784,900,2304,us,United States,1,Cable & Communications Corp. 311,785,590,1424,us,United States,1,California RSA No. 3 Limited Partnership 311,785,500,1280,us,United States,1,Cambridge Telephone Company Inc. 310,784,830,2096,us,United States,1,Caprock Cellular Ltd. 311,785,272,626,us,United States,1,Verizon Wireless -311,785,288,648,us,United States,1,Verizon Wireless -311,785,277,631,us,United States,1,Verizon Wireless -311,785,482,1154,us,United States,1,Verizon Wireless -310,784,590,1424,us,United States,1,Verizon Wireless -311,785,282,642,us,United States,1,Verizon Wireless -311,785,487,1159,us,United States,1,Verizon Wireless -311,785,271,625,us,United States,1,Verizon Wireless -311,785,287,647,us,United States,1,Verizon Wireless -311,785,276,630,us,United States,1,Verizon Wireless -311,785,481,1153,us,United States,1,Verizon Wireless -310,784,013,19,us,United States,1,Verizon Wireless -311,785,281,641,us,United States,1,Verizon Wireless -311,785,486,1158,us,United States,1,Verizon Wireless -311,785,270,624,us,United States,1,Verizon Wireless -311,785,286,646,us,United States,1,Verizon Wireless -311,785,275,629,us,United States,1,Verizon Wireless -311,785,480,1152,us,United States,1,Verizon Wireless -310,784,012,18,us,United States,1,Verizon Wireless -311,785,280,640,us,United States,1,Verizon Wireless -311,785,485,1157,us,United States,1,Verizon Wireless -311,785,110,272,us,United States,1,Verizon Wireless -311,785,285,645,us,United States,1,Verizon Wireless -311,785,274,628,us,United States,1,Verizon Wireless -311,785,390,912,us,United States,1,Verizon Wireless -310,784,010,16,us,United States,1,Verizon Wireless -311,785,279,633,us,United States,1,Verizon Wireless -311,785,484,1156,us,United States,1,Verizon Wireless -310,784,910,2320,us,United States,1,Verizon Wireless -311,785,284,644,us,United States,1,Verizon Wireless -311,785,489,1161,us,United States,1,Verizon Wireless -311,785,273,627,us,United States,1,Verizon Wireless -311,785,289,649,us,United States,1,Verizon Wireless -310,784,004,4,us,United States,1,Verizon Wireless -311,785,278,632,us,United States,1,Verizon Wireless -311,785,483,1155,us,United States,1,Verizon Wireless -310,784,890,2192,us,United States,1,Verizon Wireless -311,785,283,643,us,United States,1,Verizon Wireless -311,785,488,1160,us,United States,1,Verizon Wireless +311,785,288,648,us,United States,1,Verizon Wireless2 +311,785,277,631,us,United States,1,Verizon Wireless3 +311,785,482,1154,us,United States,1,Verizon Wireless4 +310,784,590,1424,us,United States,1,Verizon Wireless5 +311,785,282,642,us,United States,1,Verizon Wireless6 +311,785,487,1159,us,United States,1,Verizon Wireless7 +311,785,271,625,us,United States,1,Verizon Wireless8 +311,785,287,647,us,United States,1,Verizon Wireless9 +311,785,276,630,us,United States,1,Verizon Wireless10 +311,785,481,1153,us,United States,1,Verizon Wireless11 +310,784,013,19,us,United States,1,Verizon Wireless12 +311,785,281,641,us,United States,1,Verizon Wireless13 +311,785,486,1158,us,United States,1,Verizon Wireless14 +311,785,270,624,us,United States,1,Verizon Wireless15 +311,785,286,646,us,United States,1,Verizon Wireless16 +311,785,275,629,us,United States,1,Verizon Wireless17 +311,785,480,1152,us,United States,1,Verizon Wireless18 +310,784,012,18,us,United States,1,Verizon Wireless19 +311,785,280,640,us,United States,1,Verizon Wireless20 +311,785,485,1157,us,United States,1,Verizon Wireless21 +311,785,110,272,us,United States,1,Verizon Wireless22 +311,785,285,645,us,United States,1,Verizon Wireless23 +311,785,274,628,us,United States,1,Verizon Wireless24 +311,785,390,912,us,United States,1,Verizon Wireless25 +310,784,010,16,us,United States,1,Verizon Wireless26 +311,785,279,633,us,United States,1,Verizon Wireless27 +311,785,484,1156,us,United States,1,Verizon Wireless28 +310,784,910,2320,us,United States,1,Verizon Wireless29 +311,785,284,644,us,United States,1,Verizon Wireless30 +311,785,489,1161,us,United States,1,Verizon Wireless31 +311,785,273,627,us,United States,1,Verizon Wireless32 +311,785,289,649,us,United States,1,Verizon Wireless33 +310,784,004,4,us,United States,1,Verizon Wireless34 +311,785,278,632,us,United States,1,Verizon Wireless35 +311,785,483,1155,us,United States,1,Verizon Wireless36 +310,784,890,2192,us,United States,1,Verizon Wireless37 +311,785,283,643,us,United States,1,Verizon Wireless38 +311,785,488,1160,us,United States,1,Verizon Wireless39 312,786,280,640,us,United States,1,Cellular Network Partnership LLC -312,786,270,624,us,United States,1,Cellular Network Partnership LLC -310,784,360,864,us,United States,1,Cellular Network Partnership LLC +312,786,270,624,us,United States,1,Cellular Network Partnership LLC-2 +310,784,360,864,us,United States,1,Cellular Network Partnership LLC-3 311,785,190,400,us,United States,1, 310,784,230,560,us,United States,1,Cellular South Licenses Inc. 310,784,030,48,us,United States,1, 311,785,120,288,us,United States,1,Choice Phone LLC -310,784,480,1152,us,United States,1,Choice Phone LLC +310,784,480,1152,us,United States,1,Choice Phone LLC-2 310,784,630,1584,us,United States,1, 310,784,420,1056,us,United States,1,Cincinnati Bell Wireless LLC 310,784,180,384,us,United States,1,Cingular Wireless @@ -1512,18 +1518,18 @@ 310,784,080,128,us,United States,1, 310,784,700,1792,us,United States,1,Cross Valliant Cellular Partnership 311,785,140,320,us,United States,1,Cross Wireless Telephone Co. -312,786,030,48,us,United States,1,Cross Wireless Telephone Co. +312,786,030,48,us,United States,1,Cross Wireless Telephone Co.2 311,785,520,1312,us,United States,1, 311,785,810,2064,us,United States,1,Cumberland Cellular Partnership -311,785,800,2048,us,United States,1,Cumberland Cellular Partnership -311,785,440,1088,us,United States,1,Cumberland Cellular Partnership +311,785,800,2048,us,United States,1,Cumberland Cellular Partnership2 +311,785,440,1088,us,United States,1,Cumberland Cellular Partnership3 312,786,040,64,us,United States,1,Custer Telephone Cooperative Inc. 310,784,016,22,us,United States,1,Denali Spectrum License LLC 310,784,440,1088,us,United States,1,Dobson Cellular Systems 310,784,990,2448,us,United States,1,E.N.M.R. Telephone Coop. 312,786,130,304,us,United States,1,East Kentucky Network LLC -312,786,120,288,us,United States,1,East Kentucky Network LLC -310,784,750,1872,us,United States,1,East Kentucky Network LLC +312,786,120,288,us,United States,1,East Kentucky Network LLC-2 +310,784,750,1872,us,United States,1,East Kentucky Network LLC-3 310,784,009,9,us,United States,1,Edge Wireless LLC 310,784,090,144,us,United States,1,Edge Wireless LLC 310,784,610,1552,us,United States,1,Elkhart TelCo. / Epic Touch Co. @@ -1531,7 +1537,7 @@ 311,785,311,785,us,United States,1,Farmers 311,785,460,1120,us,United States,1,Fisher Wireless Services Inc. 311,785,370,880,us,United States,1,GCI Communication Corp. -310,784,430,1072,us,United States,1,GCI Communication Corp. +310,784,430,1072,us,United States,1,GCI Communication Corp.-2 310,784,920,2336,us,United States,1,Get Mobile Inc. 310,784,970,2416,us,United States,1, 310,784,007,127,us,United States,1,Unknown @@ -1539,18 +1545,18 @@ 311,785,340,832,us,United States,1,Illinois Valley Cellular RSA 2 Partnership 311,785,030,48,us,United States,1, 312,786,170,368,us,United States,1,Iowa RSA No. 2 Limited Partnership -311,785,410,1040,us,United States,1,Iowa RSA No. 2 Limited Partnership +311,785,410,1040,us,United States,1,Iowa RSA No. 2 Limited Partnership2 310,784,770,1904,us,United States,1,Iowa Wireless Services LLC 310,784,650,1616,us,United States,1,Jasper 310,784,870,2160,us,United States,1,Kaplan Telephone Company Inc. 311,785,810,2064,us,United States,1,Kentucky RSA #3 Cellular General Partnership -311,785,800,2048,us,United States,1,Kentucky RSA #3 Cellular General Partnership -311,785,440,1088,us,United States,1,Kentucky RSA #3 Cellular General Partnership -311,785,440,1088,us,United States,1,Kentucky RSA #4 Cellular General Partnership -311,785,810,2064,us,United States,1,Kentucky RSA #4 Cellular General Partnership -311,785,800,2048,us,United States,1,Kentucky RSA #4 Cellular General Partnership +311,785,800,2048,us,United States,1,Kentucky RSA #3 Cellular General Partnership2 +311,785,440,1088,us,United States,1,Kentucky RSA #3 Cellular General Partnership3 +311,785,440,1088,us,United States,1,Kentucky RSA #4 Cellular General Partnership4 +311,785,810,2064,us,United States,1,Kentucky RSA #4 Cellular General Partnership5 +311,785,800,2048,us,United States,1,Kentucky RSA #4 Cellular General Partnership6 312,786,180,384,us,United States,1,Keystone Wireless LLC -310,784,690,1680,us,United States,1,Keystone Wireless LLC +310,784,690,1680,us,United States,1,Keystone Wireless LLC-2 311,785,310,784,us,United States,1,Lamar County Cellular 310,784,016,22,us,United States,1,LCW Wireless Operations LLC 310,784,016,22,us,United States,1,Leap Wireless International Inc. @@ -1563,10 +1569,10 @@ 311,785,390,912,us,United States,1, 310,784,400,1024,us,United States,1,Minnesota South. Wirel. Co. / Hickory 312,786,010,16,us,United States,1,Missouri RSA No 5 Partnership -311,785,920,2336,us,United States,1,Missouri RSA No 5 Partnership -311,785,020,32,us,United States,1,Missouri RSA No 5 Partnership -311,785,010,16,us,United States,1,Missouri RSA No 5 Partnership -312,786,220,544,us,United States,1,Missouri RSA No 5 Partnership +311,785,920,2336,us,United States,1,Missouri RSA No 5 Partnership2 +311,785,020,32,us,United States,1,Missouri RSA No 5 Partnership3 +311,785,010,16,us,United States,1,Missouri RSA No 5 Partnership4 +312,786,220,544,us,United States,1,Missouri RSA No 5 Partnership5 310,784,350,848,us,United States,1,Mohave Cellular LP 310,784,570,1392,us,United States,1,MTPCS LLC 310,784,290,656,us,United States,1,NEP Cellcorp Inc. @@ -1577,7 +1583,7 @@ 311,785,300,768,us,United States,1,Nexus Communications Inc. 310,784,130,304,us,United States,1,North Carolina RSA 3 Cellular Tel. Co. 312,786,230,560,us,United States,1,North Dakota Network Company -311,785,610,1552,us,United States,1,North Dakota Network Company +311,785,610,1552,us,United States,1,North Dakota Network Company2 310,784,450,1104,us,United States,1,Northeast Colorado Cellular Inc. 311,785,710,1808,us,United States,1,Northeast Wireless Networks LLC 310,784,670,1648,us,United States,1,Northstar @@ -1608,49 +1614,49 @@ 316,790,011,17,us,United States,1,Southern Communications Services Inc. 310,784,002,2,us,United States,1,Sprint Spectrum 312,786,190,400,us,United States,1,Sprint Spectrum -311,785,880,2176,us,United States,1,Sprint Spectrum -311,785,870,2160,us,United States,1,Sprint Spectrum -311,785,490,1168,us,United States,1,Sprint Spectrum -310,784,120,288,us,United States,1,Sprint Spectrum -316,790,010,16,us,United States,1,Sprint Spectrum +311,785,880,2176,us,United States,1,Sprint Spectrum2 +311,785,870,2160,us,United States,1,Sprint Spectrum3 +311,785,490,1168,us,United States,1,Sprint Spectrum4 +310,784,120,288,us,United States,1,Sprint Spectrum5 +316,790,010,16,us,United States,1,Sprint Spectrum6 310,784,031,799,us,United States,1,T-Mobile -310,784,220,544,us,United States,1,T-Mobile -310,784,270,624,us,United States,1,T-Mobile -310,784,210,528,us,United States,1,T-Mobile -310,784,260,608,us,United States,1,T-Mobile -310,784,200,512,us,United States,1,T-Mobile -310,784,250,592,us,United States,1,T-Mobile -310,784,160,352,us,United States,1,T-Mobile -310,784,240,576,us,United States,1,T-Mobile -310,784,660,1632,us,United States,1,T-Mobile -310,784,230,560,us,United States,1,T-Mobile -310,784,300,768,us,United States,1,T-Mobile -310,784,280,640,us,United States,1,T-Mobile -310,784,330,816,us,United States,1,T-Mobile -310,784,800,2048,us,United States,1,T-Mobile -310,784,310,784,us,United States,1,T-Mobile +310,784,220,544,us,United States,1,T-Mobile2 +310,784,270,624,us,United States,1,T-Mobile3 +310,784,210,528,us,United States,1,T-Mobile4 +310,784,260,608,us,United States,1,T-Mobile5 +310,784,200,512,us,United States,1,T-Mobile6 +310,784,250,592,us,United States,1,T-Mobile7 +310,784,160,352,us,United States,1,T-Mobile8 +310,784,240,576,us,United States,1,T-Mobile9 +310,784,660,1632,us,United States,1,T-Mobile10 +310,784,230,560,us,United States,1,T-Mobile11 +310,784,300,768,us,United States,1,T-Mobile12 +310,784,280,640,us,United States,1,T-Mobile13 +310,784,330,816,us,United States,1,T-Mobile14 +310,784,800,2048,us,United States,1,T-Mobile15 +310,784,310,784,us,United States,1,T-Mobile16 311,785,740,1856,us,United States,1, 310,784,740,1856,us,United States,1,Telemetrix Inc. 310,784,014,335,us,United States,1,Testing 310,784,950,2384,us,United States,1,Unknown 310,784,860,2144,us,United States,1,Texas RSA 15B2 Limited Partnership 311,785,830,2096,us,United States,1,Thumb Cellular Limited Partnership -311,785,050,80,us,United States,1,Thumb Cellular Limited Partnership +311,785,050,80,us,United States,1,Thumb Cellular Limited Partnership2 310,784,460,1120,us,United States,1,TMP Corporation 310,784,490,1168,us,United States,1,Triton PCS 312,786,290,656,us,United States,1,Uintah Basin Electronics Telecommunications Inc. -311,785,860,2144,us,United States,1,Uintah Basin Electronics Telecommunications Inc. -310,784,960,2400,us,United States,1,Uintah Basin Electronics Telecommunications Inc. +311,785,860,2144,us,United States,1,Uintah Basin Electronics Telecommunications Inc.2 +310,784,960,2400,us,United States,1,Uintah Basin Electronics Telecommunications Inc.3 310,784,020,32,us,United States,1,Union Telephone Co. 311,785,220,544,us,United States,1,United States Cellular Corp. -310,784,730,1840,us,United States,1,United States Cellular Corp. +310,784,730,1840,us,United States,1,United States Cellular Corp.2 311,785,650,1616,us,United States,1,United Wireless Communications Inc. 310,784,038,911,us,United States,1,USA 3650 AT&T 310,784,520,1312,us,United States,1,VeriSign 310,784,003,3,us,United States,1,Unknown -310,784,023,575,us,United States,1,Unknown -310,784,024,591,us,United States,1,Unknown -310,784,025,607,us,United States,1,Unknown +310,784,023,575,us,United States,1,Unknown2 +310,784,024,591,us,United States,1,Unknown3 +310,784,025,607,us,United States,1,Unknown4 310,784,530,1328,us,United States,1,West Virginia Wireless 310,784,026,623,us,United States,1,Unknown 310,784,340,832,us,United States,1,Westlink Communications LLC @@ -1667,11 +1673,11 @@ 434,1076,005,95,uz,Uzbekistan,998,Ucell/Coscom 434,1076,002,2,uz,Uzbekistan,998,Uzmacom 541,1345,005,95,vu,Vanuatu,678,DigiCel -541,1345,000,0,vu,Vanuatu,678,DigiCel +541,1345,000,0,vu,Vanuatu,678,DigiCel2 541,1345,001,31,vu,Vanuatu,678,SMILE 734,1844,003,3,ve,Venezuela,58,DigiTel C.A. -734,1844,002,47,ve,Venezuela,58,DigiTel C.A. -734,1844,001,1,ve,Venezuela,58,DigiTel C.A. +734,1844,002,47,ve,Venezuela,58,DigiTel C.A.2 +734,1844,001,1,ve,Venezuela,58,DigiTel C.A.3 734,1844,006,111,ve,Venezuela,58,Movilnet C.A. 734,1844,004,79,ve,Venezuela,58,Movistar/TelCel 452,1106,007,127,vn,Viet Nam,84,Beeline @@ -1679,8 +1685,8 @@ 452,1106,003,63,vn,Viet Nam,84,S-Fone/Telecom 452,1106,005,95,vn,Viet Nam,84,VietnaMobile 452,1106,008,143,vn,Viet Nam,84,Viettel Mobile -452,1106,006,111,vn,Viet Nam,84,Viettel Mobile -452,1106,004,79,vn,Viet Nam,84,Viettel Mobile +452,1106,006,111,vn,Viet Nam,84,Viettel Mobile2 +452,1106,004,79,vn,Viet Nam,84,Viettel Mobile3 452,1106,002,47,vn,Viet Nam,84,Vinaphone 376,886,350,848,vi,Virgin Islands U.S.,1340,Cable & Wireless (Turks & Caicos) 376,886,050,1295,vi,Virgin Islands U.S.,1340,Digicel From 7c706635d9534e55f64e3913a1583a69561a8bc6 Mon Sep 17 00:00:00 2001 From: SikiFn Date: Fri, 21 Nov 2014 13:29:08 +0200 Subject: [PATCH 125/436] Update README.md --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index a63acd52..1aedb0de 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,6 @@ +# Registration Issues? +Stick to this topic: https://github.com/mgp25/WhatsAPI-Official/issues/133 + # WhatsAPI Interface to WhatsApp Messenger From ebfd6b89738c00155d4973dbb418b7580c022e58 Mon Sep 17 00:00:00 2001 From: SikiFn Date: Fri, 21 Nov 2014 13:33:00 +0200 Subject: [PATCH 126/436] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 1aedb0de..819598da 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ # Registration Issues? -Stick to this topic: https://github.com/mgp25/WhatsAPI-Official/issues/133 +**Stick to this [topic](https://github.com/mgp25/WhatsAPI-Official/issues/133)** # WhatsAPI From a41ff160b9ad197221b466909db7b5a5a1114e5b Mon Sep 17 00:00:00 2001 From: SikiFn Date: Sun, 23 Nov 2014 01:03:03 +0200 Subject: [PATCH 127/436] Added onGetGroupV2Info Event --- src/events/AllEvents.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/events/AllEvents.php b/src/events/AllEvents.php index 6cc8fceb..4e184eba 100644 --- a/src/events/AllEvents.php +++ b/src/events/AllEvents.php @@ -62,6 +62,7 @@ public function onGetGroupMessage( $mynumber, $from_group_jid, $from_user_jid, $ public function onGetGroupParticipants( $mynumber, $groupId, $groupList ){} public function onGetGroups( $mynumber, $groupList ){} public function onGetGroupsInfo( $mynumber, $groupList ){} + public function onGetGroupV2Info( $mynumber, $type, $groupList ){} public function onGetGroupsSubject( $mynumber, $group_jid, $time, $author, $name, $subject ){} public function onGetImage( $mynumber, $from, $id, $type, $time, $name, $size, $url, $file, $mimeType, $fileHash, $width, $height, $preview, $caption ){} public function onGetLocation( $mynumber, $from, $id, $type, $time, $name, $name, $longitude, $latitude, $url, $preview ){} From c6b68347fcff16f993b10b7559d8c313ff356efd Mon Sep 17 00:00:00 2001 From: SikiFn Date: Sun, 23 Nov 2014 01:08:10 +0200 Subject: [PATCH 128/436] Added sendGetGroupV2Info Functionality --- src/whatsprot.class.php | 44 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index 28d20167..5888852f 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -859,6 +859,27 @@ public function sendGetGroupsInfo($gjid) $this->sendNode($node); $this->waitForServer($msgId); } + + /** + * Send a request to get new Groups V2 info + * + * @param $groupID + * The group JID + */ + public function sendGetGroupV2Info($groupID) + { + $msgId = $this->createMsgId("get_groupv2_info"); + + $queryNode = new ProtocolNode("query", array("request" => "interactive"), null, null); + $node = new ProtocolNode("iq", array( + "id" => $msgId, + "xmlns" => "w:g2", + "type" => "get", + "to" => $this->getJID($groupID) + ), array($queryNode), null); + + $this->sendNode($node); + } /** * Send a request to return a list of groups user has started @@ -2886,6 +2907,29 @@ protected function processInboundDataNode(ProtocolNode $node, $autoReceipt = tru )); } } + if($node->nodeIdContains('get_groupv2_info')){ + $groupId = self::parseJID($node->getAttribute('from')); + + $type = ""; + $groupList = array(); + $groupChild = $node->getChild(0); + if ($groupChild != null) { + $type = $groupChild->getAttribute('type'); + + if ($groupChild->getChild(0) != null) { + foreach ($groupChild->getChildren() as $child) { + $groupList[] = $child->getAttributes(); + } + } + } + + $this->eventManager()->fire("onGetGroupV2Info", + array( + $this->phoneNumber, + $type, + $groupList + )); + } if ($node->nodeIdContains("get_lists")) { $broadcastLists = array(); if ($node->getChild(0) != null) { From 92f5e4dd3f2cab8bb2e66441d546189df2c7712c Mon Sep 17 00:00:00 2001 From: mgp25 Date: Mon, 24 Nov 2014 18:54:04 +0100 Subject: [PATCH 129/436] added event onGetKeysLeft Update classes md5 and version to 2.11.452 --- src/events/AllEvents.php | 1 + src/token.php | 2 +- src/whatsprot.class.php | 10 +++++++--- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/src/events/AllEvents.php b/src/events/AllEvents.php index 4e184eba..bb5e5e99 100644 --- a/src/events/AllEvents.php +++ b/src/events/AllEvents.php @@ -65,6 +65,7 @@ public function onGetGroupsInfo( $mynumber, $groupList ){} public function onGetGroupV2Info( $mynumber, $type, $groupList ){} public function onGetGroupsSubject( $mynumber, $group_jid, $time, $author, $name, $subject ){} public function onGetImage( $mynumber, $from, $id, $type, $time, $name, $size, $url, $file, $mimeType, $fileHash, $width, $height, $preview, $caption ){} + public function onGetKeysLeft( $mynumber, $keysLeft){} public function onGetLocation( $mynumber, $from, $id, $type, $time, $name, $name, $longitude, $latitude, $url, $preview ){} public function onGetMessage( $mynumber, $from, $id, $type, $time, $name, $body ){} public function onGetNormalizedJid( $mynumber, $data ){} diff --git a/src/token.php b/src/token.php index 87361fa5..a543673f 100755 --- a/src/token.php +++ b/src/token.php @@ -4,7 +4,7 @@ function generateRequestToken($country, $phone) { $signature = "MIIDMjCCAvCgAwIBAgIETCU2pDALBgcqhkjOOAQDBQAwfDELMAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFDASBgNVBAcTC1NhbnRhIENsYXJhMRYwFAYDVQQKEw1XaGF0c0FwcCBJbmMuMRQwEgYDVQQLEwtFbmdpbmVlcmluZzEUMBIGA1UEAxMLQnJpYW4gQWN0b24wHhcNMTAwNjI1MjMwNzE2WhcNNDQwMjE1MjMwNzE2WjB8MQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEUMBIGA1UEBxMLU2FudGEgQ2xhcmExFjAUBgNVBAoTDVdoYXRzQXBwIEluYy4xFDASBgNVBAsTC0VuZ2luZWVyaW5nMRQwEgYDVQQDEwtCcmlhbiBBY3RvbjCCAbgwggEsBgcqhkjOOAQBMIIBHwKBgQD9f1OBHXUSKVLfSpwu7OTn9hG3UjzvRADDHj+AtlEmaUVdQCJR+1k9jVj6v8X1ujD2y5tVbNeBO4AdNG/yZmC3a5lQpaSfn+gEexAiwk+7qdf+t8Yb+DtX58aophUPBPuD9tPFHsMCNVQTWhaRMvZ1864rYdcq7/IiAxmd0UgBxwIVAJdgUI8VIwvMspK5gqLrhAvwWBz1AoGBAPfhoIXWmz3ey7yrXDa4V7l5lK+7+jrqgvlXTAs9B4JnUVlXjrrUWU/mcQcQgYC0SRZxI+hMKBYTt88JMozIpuE8FnqLVHyNKOCjrh4rs6Z1kW6jfwv6ITVi8ftiegEkO8yk8b6oUZCJqIPf4VrlnwaSi2ZegHtVJWQBTDv+z0kqA4GFAAKBgQDRGYtLgWh7zyRtQainJfCpiaUbzjJuhMgo4fVWZIvXHaSHBU1t5w//S0lDK2hiqkj8KpMWGywVov9eZxZy37V26dEqr/c2m5qZ0E+ynSu7sqUD7kGx/zeIcGT0H+KAVgkGNQCo5Uc0koLRWYHNtYoIvt5R3X6YZylbPftF/8ayWTALBgcqhkjOOAQDBQADLwAwLAIUAKYCp0d6z4QQdyN74JDfQ2WCyi8CFDUM4CaNB+ceVXdKtOrNTQcc0e+t"; - $classesMd5 = "Ghame8Kns3K5rsItbpoM7w=="; // 2.11.448 + $classesMd5 = "X15hD0/uYZgWxkeKE3JgRA=="; // 2.11.452 $key2 = base64_decode("/UIGKU1FVQa+ATM2A0za7G2KI9S/CwPYjgAbc67v7ep42eO/WeTLx1lb1cHwxpsEgF4+PmYpLd2YpGUdX/A2JQitsHzDwgcdBpUf7psX1BU="); $data = base64_decode($signature) . base64_decode($classesMd5) . $phone; diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index 5888852f..c7d9a23b 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -46,8 +46,8 @@ class WhatsProt const WHATSAPP_SERVER = 's.whatsapp.net'; // The hostname used to login/send messages. const WHATSAPP_UPLOAD_HOST = 'https://mms.whatsapp.net/client/iphone/upload.php'; // The upload host. const WHATSAPP_DEVICE = 'Android'; // The device name. - const WHATSAPP_VER = '2.11.448'; // The WhatsApp version. - const WHATSAPP_USER_AGENT = 'WhatsApp/2.11.448 Android/4.3 Device/GalaxyS3'; // User agent used in request/registration code. + const WHATSAPP_VER = '2.11.452'; // The WhatsApp version. + const WHATSAPP_USER_AGENT = 'WhatsApp/2.11.452 Android/4.3 Device/GalaxyS3'; // User agent used in request/registration code. const WHATSAPP_VER_CHECKER = 'https://coderus.openrepos.net/whitesoft/whatsapp_version'; // Check WhatsApp version /** @@ -3070,7 +3070,11 @@ protected function processInboundDataNode(ProtocolNode $node, $autoReceipt = tru case "encrypt": $value = $node->getChild(0)->getAttribute('value'); if (is_numeric($value)){ - //TODO + $this->eventManager()->fire("onGetKeysLeft", + array( + $this->phoneNumber, + $node->getChild(0)->getAttribute('value') + )); } else{ echo "Corrupt Stream: value " . $value . "is not numeric"; From 244796d75372f9dfe7bde936b2f1a3fe3f6f7699 Mon Sep 17 00:00:00 2001 From: Akif Rabbani Date: Tue, 25 Nov 2014 13:48:55 +0800 Subject: [PATCH 130/436] Allow send image other than jpeg If try to send image other than jpeg, it will return imagecreatefromjpeg(): gd-jpeg: JPEG library reports unrecoverable error. Checking file extension to split to seperate formats. --- src/func.php | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/func.php b/src/func.php index b9086865..b67c25c1 100755 --- a/src/func.php +++ b/src/func.php @@ -107,8 +107,19 @@ function createIconGD($file, $size = 100, $raw = false) $nwidth = ($width / $height) * $size; $nheight = $size; } + $image_p = imagecreatetruecolor($nwidth, $nheight); - $image = imagecreatefromjpeg($file); + + // get image extension + $ext = strtolower(pathinfo($file, PATHINFO_EXTENSION)); + if ($ext == "jpg" || $ext == "jpeg") { + $image = imagecreatefromjpeg($file); + } elseif ($ext == "png") { + $image = imagecreatefrompng($file); + } elseif ($ext == "gif") { + $image = imagecreatefromgif($file); + } + imagecopyresampled($image_p, $image, 0, 0, 0, 0, $nwidth, $nheight, $width, $height); ob_start(); imagejpeg($image_p); From f7d2e611ec39031a82df4aef11b462b91a61d75e Mon Sep 17 00:00:00 2001 From: mgp25 Date: Fri, 28 Nov 2014 19:34:09 +0100 Subject: [PATCH 131/436] Update README.md --- README.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 819598da..18b5e046 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,3 @@ -# Registration Issues? -**Stick to this [topic](https://github.com/mgp25/WhatsAPI-Official/issues/133)** - # WhatsAPI Interface to WhatsApp Messenger @@ -25,6 +22,8 @@ And I also want to thank all the users that are collaborating with me and are ma [![Gratipay](http://img.shields.io/badge/Donate-Gratipay-brightgreen.svg)](https://gratipay.com/mgp25/) [![Paypal](https://www.paypalobjects.com/es_XC/i/btn/btn_donate_SM.gif)](https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=me%40mgp25%2ecom&lc=US&item_name=WhatsAPI¤cy_code=USD&bn=PP%2dDonationsBF%3abtn_donate_SM%2egif%3aNonHosted) +**Bitcoin:** 15NejBDahfe1eLAPSJh4iMfYLHYuKDrwJ2 + ### Update October 7th, 2014 From 9dd057ea06c140c29b905a4e74e5ca588db127a4 Mon Sep 17 00:00:00 2001 From: mgp25 Date: Sat, 29 Nov 2014 01:53:34 +0100 Subject: [PATCH 132/436] General update No code changes. Only token and version update --- EVENTS.md | 47 -------------- README.md | 1 + classesMD5.txt | 139 ---------------------------------------- src/token.php | 2 +- src/whatsprot.class.php | 17 +++-- 5 files changed, 10 insertions(+), 196 deletions(-) delete mode 100755 EVENTS.md delete mode 100644 classesMD5.txt diff --git a/EVENTS.md b/EVENTS.md deleted file mode 100755 index 5c02ecc0..00000000 --- a/EVENTS.md +++ /dev/null @@ -1,47 +0,0 @@ -Available events and arguments -============================== -See events/WhatsAppEventListener.php. - -How to bind a callback to an event -================================== - -# Create a WhatsAppEventListener class and implement the method you -# would like to handle: -```php -require 'events/WhatsAppEventListenerBase.php'; - -class MyEventListener extends WhatsAppEventListenerBase { - function onGetMessage( - $phone, // The user phone number including the country code. - $from, // The sender JID. - $msgid, // The message id. - $type, // The message type. - $time, // The unix time when send message notification. - $name, // The sender name. - $message // The message. - ) { - print( "onGetMessage(" . $phone . ", " . $from . ", " . $msgid . ", " . $type . ", " . $time . ", " . $name . ", " . $message . ")\n" ); - } -} -``` -# Require your new class; -```php -require 'MyEventListener.php'; -``` -# Create an instance of WhastProt. -```php -$w = new WhatsProt($userPhone, $userIdentity, $userName, $debug); -``` -# Add your event listener. -```php -w->eventManager()->addEventListener(new MyEventListener()); -``` -# Connect to WhatsApp servers. -```php -$w->connect(); -``` -# Login to WhatsApp -```php -$w->loginWithPassword($password); -``` -[...] diff --git a/README.md b/README.md index 18b5e046..3dd97a7f 100644 --- a/README.md +++ b/README.md @@ -19,6 +19,7 @@ And I also want to thank all the users that are collaborating with me and are ma - [GitsUp](https://github.com/GitsUp) - [SikiFn](https://github.com/SikiFn) - [Dennobaby](https://github.com/Dennobaby) +- [0xTryCatch](https://github.com/0xTryCatch) [![Gratipay](http://img.shields.io/badge/Donate-Gratipay-brightgreen.svg)](https://gratipay.com/mgp25/) [![Paypal](https://www.paypalobjects.com/es_XC/i/btn/btn_donate_SM.gif)](https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=me%40mgp25%2ecom&lc=US&item_name=WhatsAPI¤cy_code=USD&bn=PP%2dDonationsBF%3abtn_donate_SM%2egif%3aNonHosted) diff --git a/classesMD5.txt b/classesMD5.txt deleted file mode 100644 index 61b201f2..00000000 --- a/classesMD5.txt +++ /dev/null @@ -1,139 +0,0 @@ -=============================== -= CLASSES MD5 = -= B64 ENCODED = -=============================== - -WhatsApp/2.11.431 Android/4.3 Device/GalaxyS3 [Blue check feature enabled] -6AFrxlvRhUKoSxdMjnYATg== - -WhatsApp/2.11.426 Android/4.3 Device/GalaxyS3 -gGha73KQT1l3G8AMQGgKxg== - -WhatsApp/2.11.424 Android/4.3 Device/GalaxyS3 -JT0gTRUvrWEBPlFv2ZvhGg== - -WhatsApp/2.11.422 Android/4.3 Device/GalaxyS3 -fjwVxyGxveeMtXfbBZX5+A== - -WhatsApp/2.11.421 Android/4.3 Device/GalaxyS3 -kiGqotPZe/wzm22tbORcog== - -WhatsApp/2.11.419 Android/4.3 Device/GalaxyS3 -Vu6nzOKzMttaMOYKo7YkEw== - -WhatsApp/2.11.418 Android/4.3 Device/GalaxyS3 -NXu/tI3lcaD89NMMxIGvHA== - -WhatsApp/2.11.416 Android/4.3 Device/GalaxyS3 -5aZ7LEI7a88AxkzGp8gIWw== - -WhatsApp/2.11.414 Android/4.3 Device/GalaxyS3 -Ania53j5EZJVFR1YgwjiLQ== - -WhatsApp/2.11.413 Android/4.3 Device/GalaxyS3 -zwycjRMDKzScsAoXOVrDKA== - -WhatsApp/2.11.407 Android/4.3 Device/GalaxyS3 -xOyKd7AoN0uoos7Fkeup5w== - -WhatsApp/2.11.404 Android/4.3 Device/GalaxyS3 -UwR/p2qFH6trUCtAwVFvlw== - -WhatsApp/2.11.395 Android/4.3 Device/GalaxyS3 [*] Safe version -P3b9TfNFCkkzPoVzZnm+BA== - -WhatsApp/2.11.394 Android/4.3 Device/GalaxyS3 -EkA+wIj+E8R7ncRihvTbJQ== - -WhatsApp/2.11.393 Android/4.3 Device/GalaxyS3 -39ykQ+QRBQ3V4y5u7qnqDA== - -WhatsApp/2.11.391 Android/4.3 Device/GalaxyS3 -08io6i/9AExMEsEar18G5w== - -WhatsApp/2.11.390 Android/4.3 Device/GalaxyS3 -ueXcdj5E56OZ0ABxU/YasQ== - -WhatsApp/2.11.388 Android/4.3 Device/GalaxyS3 -KSb52iVfhyJMXxuGse8avw== - -WhatsApp/2.11.383 Android/4.3 Device/GalaxyS3 -2IVWfReKm2m+1ORLg3gQtg== - -WhatsApp/2.11.382 Android/4.3 Device/GalaxyS3 -IJWjujh8Eds1Ew1pjWZWvg== - -WhatsApp/2.11.380 Android/4.3 Device/GalaxyS3 -b9ztDlCAK+k27UGaZkM7nw== - -WhatsApp/2.11.378 Android/4.3 Device/GalaxyS3 [*] 5 Sept 2014. PS. -oCtjlSonS+4H16h9HW6nNA== - -WhatsApp/2.11.375 Android/4.3 Device/GalaxyS3 -ZLvs/rzS8qU90wZLE/1MgQ== - -WhatsApp/2.11.372 Android/4.3 Device/GalaxyS3 -eAaY/5A1G1nadV0TLtmdFQ== - -WhatsApp/2.11.371 Android/4.3 Device/GalaxyS3 -ScUKonjwWeLYhKqH8uV4HA== - -WhatsApp/2.11.365 Android/4.3 Device/GalaxyS3 -GUfilO0O5J4ZEMWcQKN7mg== - -WhatsApp/2.11.355 Android/4.3 Device/GalaxyS3 -w5mQTrb0Tky4s6Ln6RFMVQ== - -WhatsApp/2.11.354 Android/4.3 Device/GalaxyS3 -MPLa6ffv7Z/WNGS60PpxJQ== - -WhatsApp/2.11.348 Android/4.3 Device/GalaxyS3 -vszYr764HF2FQpdbqTdr/w== - -WhatsApp/2.11.339 Android/4.0.4 Device/GalaxyS3 -iV15qOB/jPIidogqfJ/oJA== - -WhatsApp/2.11.301 Android/4.3 Device/GalaxyS3 -pZ3J/O+F3HXOyx8YixzvPQ== - -WhatsApp/2.11.272 Android/4.0.4 Device/GalaxyS2 -kI6dipxOAk055AWZxknGqg== - -WhatsApp/2.11.264 Android/4.0.4 Device/GalaxyS2 -opf5/xMP2qdqHJ+7d4/LwA== - -WhatsApp/2.11.254 Android/4.0.4 Device/GalaxyS2 -ueKiLIlXuHtGzw2oxoZvfg== - -WhatsApp/2.11.224 Android/4.4.2 Device/GalaxyS4 -ZGdhtLiFqomD5ovSpQ+Odw== - -WhatsApp/2.11.209 Android/4.4.2 Device/GalaxyS4 -+XW/7rCZDX9T7YrGQqTmcg== - -WhatsApp/2.11.200 Android/4.4.2 Device/GalaxyS4 -8PZch1s/VRHIKujxCxOXig== - -WhatsApp/2.11.151 Android/4.2.1 Device/GalaxyS3 -94bjoO7brhy/QJZRceJHYw== - -WhatsApp/2.11.144 Android/4.2.1 Device/GalaxyS3 -QtHrjQzwQjujOOOd1oObgQ== - -WhatsApp/2.11.139 Android/4.2.1 Device/GalaxyS3 -rzoCoMEYKQ6zoUWINKC9oQ== - -WhatsApp/2.11.134 Android/4.2.1 Device/GalaxyS3 -r4WQV17nVTl3+uFlF9mvEg== - -WhatsApp/2.11.125 Android/4.2.1 Device/GalaxyS3 -JqOGtSEKUWEu/jxzCB6Bdw== - -WhatsApp/2.11.113 Android/4.2.1 Device/GalaxyS3 -MOpsiNsR+nHEv0dFc3dqmA== - -WhatsApp/2.11.102 Android/4.2.1 Device/GalaxyS3 -zo7YXXvrrRqpikOi/CveTw== - -WhatsApp/2.11.69 Android/4.2.1 Device/GalaxyS3 -30CnAF22oY+2PUD5pcJGqw== diff --git a/src/token.php b/src/token.php index a543673f..1e447a77 100755 --- a/src/token.php +++ b/src/token.php @@ -4,7 +4,7 @@ function generateRequestToken($country, $phone) { $signature = "MIIDMjCCAvCgAwIBAgIETCU2pDALBgcqhkjOOAQDBQAwfDELMAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFDASBgNVBAcTC1NhbnRhIENsYXJhMRYwFAYDVQQKEw1XaGF0c0FwcCBJbmMuMRQwEgYDVQQLEwtFbmdpbmVlcmluZzEUMBIGA1UEAxMLQnJpYW4gQWN0b24wHhcNMTAwNjI1MjMwNzE2WhcNNDQwMjE1MjMwNzE2WjB8MQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEUMBIGA1UEBxMLU2FudGEgQ2xhcmExFjAUBgNVBAoTDVdoYXRzQXBwIEluYy4xFDASBgNVBAsTC0VuZ2luZWVyaW5nMRQwEgYDVQQDEwtCcmlhbiBBY3RvbjCCAbgwggEsBgcqhkjOOAQBMIIBHwKBgQD9f1OBHXUSKVLfSpwu7OTn9hG3UjzvRADDHj+AtlEmaUVdQCJR+1k9jVj6v8X1ujD2y5tVbNeBO4AdNG/yZmC3a5lQpaSfn+gEexAiwk+7qdf+t8Yb+DtX58aophUPBPuD9tPFHsMCNVQTWhaRMvZ1864rYdcq7/IiAxmd0UgBxwIVAJdgUI8VIwvMspK5gqLrhAvwWBz1AoGBAPfhoIXWmz3ey7yrXDa4V7l5lK+7+jrqgvlXTAs9B4JnUVlXjrrUWU/mcQcQgYC0SRZxI+hMKBYTt88JMozIpuE8FnqLVHyNKOCjrh4rs6Z1kW6jfwv6ITVi8ftiegEkO8yk8b6oUZCJqIPf4VrlnwaSi2ZegHtVJWQBTDv+z0kqA4GFAAKBgQDRGYtLgWh7zyRtQainJfCpiaUbzjJuhMgo4fVWZIvXHaSHBU1t5w//S0lDK2hiqkj8KpMWGywVov9eZxZy37V26dEqr/c2m5qZ0E+ynSu7sqUD7kGx/zeIcGT0H+KAVgkGNQCo5Uc0koLRWYHNtYoIvt5R3X6YZylbPftF/8ayWTALBgcqhkjOOAQDBQADLwAwLAIUAKYCp0d6z4QQdyN74JDfQ2WCyi8CFDUM4CaNB+ceVXdKtOrNTQcc0e+t"; - $classesMd5 = "X15hD0/uYZgWxkeKE3JgRA=="; // 2.11.452 + $classesMd5 = "U8Rv0Yqm6qUsIGkGbBBaZA=="; // 2.11.453 $key2 = base64_decode("/UIGKU1FVQa+ATM2A0za7G2KI9S/CwPYjgAbc67v7ep42eO/WeTLx1lb1cHwxpsEgF4+PmYpLd2YpGUdX/A2JQitsHzDwgcdBpUf7psX1BU="); $data = base64_decode($signature) . base64_decode($classesMd5) . $phone; diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index c7d9a23b..8d4852b7 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -46,8 +46,8 @@ class WhatsProt const WHATSAPP_SERVER = 's.whatsapp.net'; // The hostname used to login/send messages. const WHATSAPP_UPLOAD_HOST = 'https://mms.whatsapp.net/client/iphone/upload.php'; // The upload host. const WHATSAPP_DEVICE = 'Android'; // The device name. - const WHATSAPP_VER = '2.11.452'; // The WhatsApp version. - const WHATSAPP_USER_AGENT = 'WhatsApp/2.11.452 Android/4.3 Device/GalaxyS3'; // User agent used in request/registration code. + const WHATSAPP_VER = '2.11.453'; // The WhatsApp version. + const WHATSAPP_USER_AGENT = 'WhatsApp/2.11.453 Android/4.3 Device/GalaxyS3'; // User agent used in request/registration code. const WHATSAPP_VER_CHECKER = 'https://coderus.openrepos.net/whitesoft/whatsapp_version'; // Check WhatsApp version /** @@ -859,7 +859,7 @@ public function sendGetGroupsInfo($gjid) $this->sendNode($node); $this->waitForServer($msgId); } - + /** * Send a request to get new Groups V2 info * @@ -2909,20 +2909,20 @@ protected function processInboundDataNode(ProtocolNode $node, $autoReceipt = tru } if($node->nodeIdContains('get_groupv2_info')){ $groupId = self::parseJID($node->getAttribute('from')); - + $type = ""; $groupList = array(); $groupChild = $node->getChild(0); if ($groupChild != null) { $type = $groupChild->getAttribute('type'); - + if ($groupChild->getChild(0) != null) { foreach ($groupChild->getChildren() as $child) { $groupList[] = $child->getAttributes(); } } } - + $this->eventManager()->fire("onGetGroupV2Info", array( $this->phoneNumber, @@ -3341,13 +3341,12 @@ protected function processUploadResponse($node) } $mediaAttribs = array(); - $mediaAttribs["xmlns"] = "urn:xmpp:whatsapp:mms"; $mediaAttribs["type"] = $filetype; $mediaAttribs["url"] = $url; + $mediaAttribs["encoding"] = "raw"; $mediaAttribs["file"] = $filename; $mediaAttribs["size"] = $filesize; - $mediaAttribs["hash"] = $filehash; - $mediaAttribs["caption"] = $this->mediaQueue[$id]['caption']; + $mediaAttribs["caption"] = $this->mediaQueue[$id]['caption']; $filepath = $this->mediaQueue[$id]['filePath']; $to = $this->mediaQueue[$id]['to']; From ca05d898498e484ee8249eb8828ea48bcb45f8f0 Mon Sep 17 00:00:00 2001 From: mgp25 Date: Sat, 29 Nov 2014 17:33:26 +0100 Subject: [PATCH 133/436] Fixed re-connecting issues and stream error by ack --- src/whatsprot.class.php | 44 ++++++++++++++++++++++++++++++++--------- 1 file changed, 35 insertions(+), 9 deletions(-) diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index 8d4852b7..ba3c4c66 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -490,12 +490,11 @@ public function connect() * Do we have an active socket connection to whatsapp? * @return bool */ - protected function isConnected() + public function isConnected() { - if ( ! empty($this->socket) && feof($this->socket) === false) + if (!empty($this->socket) && feof($this->socket) === false) { - //Already connected. - return true; + return true; //Already connected. } return false; @@ -509,6 +508,7 @@ public function disconnect() { if (is_resource($this->socket)) { fclose($this->socket); + $this->socket = null; $this->eventManager()->fire("onDisconnect", array( $this->phoneNumber, @@ -587,10 +587,9 @@ public function loginWithPassword($password) */ public function pollMessage($autoReceipt = true, $type = "read") { - - if(feof($this->socket)) { - throw new Exception('Connection Closed!'); - } + if(!$this->isConnected()) { + throw new Exception('Connection Closed!'); + } $stanza = $this->readStanza(); if($stanza) @@ -2523,6 +2522,15 @@ protected function processInboundDataNode(ProtocolNode $node, $autoReceipt = tru $node->getAttribute('type'), $node->getAttribute('t') )); + + $ackNode = new ProtocolNode("ack", array( + "to" => $node->getAttribute('from'), + "id" => $node->getAttribute('id'), + "type" => $type, + "t" => time() + ), null, null); + + $this->sendNode($ackNode); } if ($node->getTag() == "message") { array_push($this->messageQueue, $node); @@ -3009,6 +3017,23 @@ protected function processInboundDataNode(ProtocolNode $node, $autoReceipt = tru )); } + if ($node->getTag() == "message" && $node->getAttribute('type') == "media" && $node->getChild(0)->getAttribute('type') == "image" ) { + + $msgId = $this->createMsgId("ack-media"); + + $ackNode = new ProtocolNode("ack", array( + "url" => $node->getChild(0)->getAttribute('url') + ), null, null); + + $iqNode = new ProtocolNode("iq", array( + "id" => $msgId, + "xmlns" => "w:m", + "type" => "set", + "to" => static::WHATSAPP_SERVER + ), array($ackNode), null); + $this->sendNode($iqNode); + } + $children = $node->getChild(0); if ($node->getTag() == "stream:error" && empty($children) == false && $node->getChild(0)->getTag() == "system-shutdown") { @@ -3346,7 +3371,8 @@ protected function processUploadResponse($node) $mediaAttribs["encoding"] = "raw"; $mediaAttribs["file"] = $filename; $mediaAttribs["size"] = $filesize; - $mediaAttribs["caption"] = $this->mediaQueue[$id]['caption']; + if($this->mediaQueue[$id]['caption'] != null) + $mediaAttribs["caption"] = $this->mediaQueue[$id]['caption']; $filepath = $this->mediaQueue[$id]['filePath']; $to = $this->mediaQueue[$id]['to']; From 7d03a05593d73b1ceba13a33c6d3be97d7931f4b Mon Sep 17 00:00:00 2001 From: mgp25 Date: Sat, 29 Nov 2014 22:30:17 +0100 Subject: [PATCH 134/436] Minor fixes and fixed ack from encrypted messages --- src/whatsprot.class.php | 33 ++++++++++++++++++++++----------- 1 file changed, 22 insertions(+), 11 deletions(-) diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index ba3c4c66..56636c5e 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -1033,14 +1033,16 @@ public function sendGetRequestLastSeen($to) */ public function sendGetServerProperties() { + $id = $this->createMsgId("getproperties"); $child = new ProtocolNode("props", null, null, null); $node = new ProtocolNode("iq", array( - "id" => $this->createMsgId("getproperties"), + "id" => $id, "type" => "get", "xmlns" => "w", "to" => "s.whatsapp.net" ), array($child), null); $this->sendNode($node); + $this->waitForServer($id); } /** @@ -2297,6 +2299,7 @@ public function sendSync(array $numbers, $mode = "full", $context = "registratio ), null); $this->sendNode($node); + $this->waitForServer($id); return $id; } @@ -2578,6 +2581,13 @@ protected function processInboundDataNode(ProtocolNode $node, $autoReceipt = tru $this->sendMessageReceived($node, $type); } } + if ($node->getAttribute("type") == "text" && $node->getChild(0)->getTag() == 'enc') { + // TODO + if($autoReceipt) + { + $this->sendMessageReceived($node, $type); + } + } if ($node->getAttribute("type") == "media" && $node->getChild('media') != null) { if ($node->getChild("media")->getAttribute('type') == 'image') { $this->eventManager()->fire("onGetImage", @@ -3331,11 +3341,11 @@ protected function processUploadResponse($node) //file already on whatsapp servers $url = $duplicate->getAttribute("url"); $filesize = $duplicate->getAttribute("size"); -// $mimetype = $duplicate->getAttribute("mimetype"); +// $mimetype = $duplicate->getAttribute("mimetype"); $filehash = $duplicate->getAttribute("filehash"); $filetype = $duplicate->getAttribute("type"); -// $width = $duplicate->getAttribute("width"); -// $height = $duplicate->getAttribute("height"); +// $width = $duplicate->getAttribute("width"); +// $height = $duplicate->getAttribute("height"); $exploded = explode("/", $url); $filename = array_pop($exploded); } else { @@ -3357,11 +3367,11 @@ protected function processUploadResponse($node) $url = $json->url; $filesize = $json->size; -// $mimetype = $json->mimetype; +// $mimetype = $json->mimetype; $filehash = $json->filehash; $filetype = $json->type; -// $width = $json->width; -// $height = $json->height; +// $width = $json->width; +// $height = $json->height; $filename = $json->name; } @@ -3371,23 +3381,24 @@ protected function processUploadResponse($node) $mediaAttribs["encoding"] = "raw"; $mediaAttribs["file"] = $filename; $mediaAttribs["size"] = $filesize; - if($this->mediaQueue[$id]['caption'] != null) + if($this->mediaQueue[$id]['caption'] != '') $mediaAttribs["caption"] = $this->mediaQueue[$id]['caption']; $filepath = $this->mediaQueue[$id]['filePath']; $to = $this->mediaQueue[$id]['to']; + $icon = ""; switch ($filetype) { case "image": - $caption = $this->mediaQueue[$id]['caption']; + $caption = $this->mediaQueue[$id]['caption']; $icon = createIcon($filepath); break; case "video": - $caption = $this->mediaQueue[$id]['caption']; + $caption = $this->mediaQueue[$id]['caption']; $icon = createVideoIcon($filepath); break; default: - $caption = ''; + $caption = ''; $icon = ''; break; } From 29f011cac14a4be4ab450f50fd35ed899b9d0c60 Mon Sep 17 00:00:00 2001 From: mgp25 Date: Sat, 29 Nov 2014 23:39:08 +0100 Subject: [PATCH 135/436] Fixed/added image and video thumbnails --- src/func.php | 37 ++++++++----------------------------- 1 file changed, 8 insertions(+), 29 deletions(-) diff --git a/src/func.php b/src/func.php index b67c25c1..05fda69a 100755 --- a/src/func.php +++ b/src/func.php @@ -92,11 +92,11 @@ function createIcon($file) if ((extension_loaded('gd')) && (file_exists($file))) { return createIconGD($file); } else { - return giftThumbnail(); + return base64_decode(giftThumbnail()); } } -function createIconGD($file, $size = 100, $raw = false) +function createIconGD($file, $size = 100, $raw = true) { list($width, $height) = getimagesize($file); if ($width > $height) { @@ -107,37 +107,20 @@ function createIconGD($file, $size = 100, $raw = false) $nwidth = ($width / $height) * $size; $nheight = $size; } - + $image_p = imagecreatetruecolor($nwidth, $nheight); - - // get image extension - $ext = strtolower(pathinfo($file, PATHINFO_EXTENSION)); - if ($ext == "jpg" || $ext == "jpeg") { - $image = imagecreatefromjpeg($file); - } elseif ($ext == "png") { - $image = imagecreatefrompng($file); - } elseif ($ext == "gif") { - $image = imagecreatefromgif($file); - } - + $image = imagecreatefromstring(file_get_contents($file)); + imagecopyresampled($image_p, $image, 0, 0, 0, 0, $nwidth, $nheight, $width, $height); ob_start(); imagejpeg($image_p); $i = ob_get_contents(); ob_end_clean(); - if ($raw) { - return $i; - } else { - return base64_encode($i); - } + return $i; } function createVideoIcon($file) { - // @todo: Add support for video thumbnail create. - // @see: http://stackoverflow.com/questions/14662027/generate-thumbnail-for-a-bunch-of-mp4-video-in-a-folder - //return giftThumbnail(); - /* should install ffmpeg for the method to work successfully */ if (checkFFMPEG()) { //generate thumbnail @@ -145,15 +128,12 @@ function createVideoIcon($file) @unlink($preview); //capture video preview - $command = "ffmpeg -i \"" . $file . "\" -f image2 -vframes 1 \"" . $preview . "\""; + $command = "ffmpeg -i \"" . $file . "\" -f mjpeg -ss 00:00:01 -vframes 1 \"" . $preview . "\""; exec($command); - // Parsear la imagen - //TODO: Make it work using libGD (see createIcon()) return createIconGD($preview); } else { - //fallback - return giftThumbnail(); + return base64_decode(videoThumbnail()); } } @@ -3377,4 +3357,3 @@ function ArrayEmojis() array('iOS2' => '', 'iOS5' => 'โ€ผ', 'iOS7' => 'โ€ผ๏ธ', 'Hex' => '203C') ); } - From 0ac7b92120d1282b089af945990bb42db9b26730 Mon Sep 17 00:00:00 2001 From: mgp25 Date: Wed, 3 Dec 2014 00:11:30 +0100 Subject: [PATCH 136/436] General updates --- src/token.php | 2 +- src/whatsprot.class.php | 69 +++++++++++++++++++++++------------------ 2 files changed, 39 insertions(+), 32 deletions(-) diff --git a/src/token.php b/src/token.php index 1e447a77..ce099e84 100755 --- a/src/token.php +++ b/src/token.php @@ -4,7 +4,7 @@ function generateRequestToken($country, $phone) { $signature = "MIIDMjCCAvCgAwIBAgIETCU2pDALBgcqhkjOOAQDBQAwfDELMAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFDASBgNVBAcTC1NhbnRhIENsYXJhMRYwFAYDVQQKEw1XaGF0c0FwcCBJbmMuMRQwEgYDVQQLEwtFbmdpbmVlcmluZzEUMBIGA1UEAxMLQnJpYW4gQWN0b24wHhcNMTAwNjI1MjMwNzE2WhcNNDQwMjE1MjMwNzE2WjB8MQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEUMBIGA1UEBxMLU2FudGEgQ2xhcmExFjAUBgNVBAoTDVdoYXRzQXBwIEluYy4xFDASBgNVBAsTC0VuZ2luZWVyaW5nMRQwEgYDVQQDEwtCcmlhbiBBY3RvbjCCAbgwggEsBgcqhkjOOAQBMIIBHwKBgQD9f1OBHXUSKVLfSpwu7OTn9hG3UjzvRADDHj+AtlEmaUVdQCJR+1k9jVj6v8X1ujD2y5tVbNeBO4AdNG/yZmC3a5lQpaSfn+gEexAiwk+7qdf+t8Yb+DtX58aophUPBPuD9tPFHsMCNVQTWhaRMvZ1864rYdcq7/IiAxmd0UgBxwIVAJdgUI8VIwvMspK5gqLrhAvwWBz1AoGBAPfhoIXWmz3ey7yrXDa4V7l5lK+7+jrqgvlXTAs9B4JnUVlXjrrUWU/mcQcQgYC0SRZxI+hMKBYTt88JMozIpuE8FnqLVHyNKOCjrh4rs6Z1kW6jfwv6ITVi8ftiegEkO8yk8b6oUZCJqIPf4VrlnwaSi2ZegHtVJWQBTDv+z0kqA4GFAAKBgQDRGYtLgWh7zyRtQainJfCpiaUbzjJuhMgo4fVWZIvXHaSHBU1t5w//S0lDK2hiqkj8KpMWGywVov9eZxZy37V26dEqr/c2m5qZ0E+ynSu7sqUD7kGx/zeIcGT0H+KAVgkGNQCo5Uc0koLRWYHNtYoIvt5R3X6YZylbPftF/8ayWTALBgcqhkjOOAQDBQADLwAwLAIUAKYCp0d6z4QQdyN74JDfQ2WCyi8CFDUM4CaNB+ceVXdKtOrNTQcc0e+t"; - $classesMd5 = "U8Rv0Yqm6qUsIGkGbBBaZA=="; // 2.11.453 + $classesMd5 = "NCZCdOqhl7ssienxqRuu5Q=="; // 2.11.456 $key2 = base64_decode("/UIGKU1FVQa+ATM2A0za7G2KI9S/CwPYjgAbc67v7ep42eO/WeTLx1lb1cHwxpsEgF4+PmYpLd2YpGUdX/A2JQitsHzDwgcdBpUf7psX1BU="); $data = base64_decode($signature) . base64_decode($classesMd5) . $phone; diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index 56636c5e..c064d7da 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -46,8 +46,8 @@ class WhatsProt const WHATSAPP_SERVER = 's.whatsapp.net'; // The hostname used to login/send messages. const WHATSAPP_UPLOAD_HOST = 'https://mms.whatsapp.net/client/iphone/upload.php'; // The upload host. const WHATSAPP_DEVICE = 'Android'; // The device name. - const WHATSAPP_VER = '2.11.453'; // The WhatsApp version. - const WHATSAPP_USER_AGENT = 'WhatsApp/2.11.453 Android/4.3 Device/GalaxyS3'; // User agent used in request/registration code. + const WHATSAPP_VER = '2.11.456'; // The WhatsApp version. + const WHATSAPP_USER_AGENT = 'WhatsApp/2.11.456 Android/4.3 Device/GalaxyS3'; // User agent used in request/registration code. const WHATSAPP_VER_CHECKER = 'https://coderus.openrepos.net/whitesoft/whatsapp_version'; // Check WhatsApp version /** @@ -821,7 +821,7 @@ public function sendGetClientConfig() $node = new ProtocolNode("iq", array( "id" => $msgId, "xmlns" => "urn:xmpp:whatsapp:push", - "type" => "set", + "type" => "get", "to" => static::WHATSAPP_SERVER ), array($child), null); $this->sendNode($node); @@ -852,7 +852,7 @@ public function sendGetGroupsInfo($gjid) $node = new ProtocolNode("iq", array( "id" => $msgId, "type" => "get", - "xmlns" => "w:g", + "xmlns" => "w:g2", "to" => $this->getJID($gjid) ), array($child), null); $this->sendNode($node); @@ -905,7 +905,7 @@ public function sendGetGroupsParticipants($gjid) $node = new ProtocolNode("iq", array( "id" => $msgId, "type" => "get", - "xmlns" => "w:g", + "xmlns" => "w:g2", "to" => $this->getJID($gjid) ), array($child), null); $this->sendNode($node); @@ -1042,7 +1042,6 @@ public function sendGetServerProperties() "to" => "s.whatsapp.net" ), array($child), null); $this->sendNode($node); - $this->waitForServer($id); } /** @@ -1184,17 +1183,25 @@ public function sendPing() } /** - * Get voip info. of a number + * Get voip info. of a number/s * - * @param string $number + * @param string $jids */ - public function sendGetHasVoipEnabled($number) + public function sendGetHasVoipEnabled($jids) { $msgId = $this->createMsgId("voip_"); - $userNode = new ProtocolNode("user", array( - "jid" => $number."@".static::WHATSAPP_SERVER - ), null, null); - $eligibleNode = new ProtocolNode("eligible", null, array($userNode), null); + + if(!is_array($jids)) + { + $jids = array($jids); + } + $userNode = array(); + foreach($jids as $jid) + { + $userNode[] = new ProtocolNode("user", array('jid' => $this->getJID($jid)), null, null); + } + + $eligibleNode = new ProtocolNode("eligible", null, $userNode, null); $node = new ProtocolNode("iq", array( "id" => $msgId, "xmlns" => "voip", @@ -1218,7 +1225,7 @@ public function sendGetStatuses($jids) $children = array(); foreach($jids as $jid) { - $children[] = new ProtocolNode("user", array("jid" => $this->getJID($jid)), null, null); + $children[] = new ProtocolNode("user", array("jid" => $this->getJID($jid), "t" => time()), null, null); } $node = new ProtocolNode("iq", array( "to" => "s.whatsapp.net", @@ -1252,7 +1259,7 @@ public function sendGroupsChatCreate($subject, $participants = array()) $setHash = array(); $setHash["id"] = $this->createMsgId("creategroup"); $setHash["type"] = "set"; - $setHash["xmlns"] = "w:g"; + $setHash["xmlns"] = "w:g2"; $setHash["to"] = static::WHATSAPP_GROUP_SERVER; $groupNode = new ProtocolNode("iq", $setHash, array($group), ""); @@ -1280,7 +1287,7 @@ public function sendSetGroupSubject($gjid, $subject) "id" => $this->createMsgId("set_group_subject"), "type" => "set", "to" => $this->getJID($gjid), - "xmlns" => "w:g" + "xmlns" => "w:g2" ), array($child), null); $this->sendNode($node); } @@ -1306,7 +1313,7 @@ public function sendGroupsChatEnd($gjid) $iqData = array(); $iqData["id"] = $msgID; $iqData["type"] = "set"; - $iqData["xmlns"] = "w:g"; + $iqData["xmlns"] = "w:g2"; $iqData["to"] = static::WHATSAPP_GROUP_SERVER; $iqNode = new ProtocolNode("iq", $iqData, array($leaveNode), null); @@ -1333,7 +1340,7 @@ public function sendGroupsLeave($gjids) $hash["id"] = $this->createMsgId("leavegroups"); $hash["to"] = static::WHATSAPP_GROUP_SERVER; $hash["type"] = "set"; - $hash["xmlns"] = "w:g"; + $hash["xmlns"] = "w:g2"; $node = new ProtocolNode("iq", $hash, array($leave), null); $this->sendNode($node); $this->waitForServer($hash["id"]); @@ -2953,6 +2960,7 @@ protected function processInboundDataNode(ProtocolNode $node, $autoReceipt = tru if ($node->getChild(0) != null) { $childArray = $node->getChildren(); foreach ($childArray as $list) { + if($list->getChildren() != null) { foreach ( $list->getChildren() as $sublist) { $id = $sublist->getAttribute("id"); $name = $sublist->getAttribute("name"); @@ -2963,6 +2971,7 @@ protected function processInboundDataNode(ProtocolNode $node, $autoReceipt = tru } $broadcastLists[$id]['recipients'] = $recipients; } + } } } $this->eventManager()->fire("onGetBroadcastLists", @@ -3590,13 +3599,11 @@ protected function sendData($data) protected function sendGetGroupsFiltered($type) { $msgID = $this->createMsgId("getgroups"); - $child = new ProtocolNode("list", array( - "type" => $type - ), null, null); + $child = new ProtocolNode($type, null, null, null); $node = new ProtocolNode("iq", array( "id" => $msgID, "type" => "get", - "xmlns" => "w:g", + "xmlns" => "w:g2", "to" => "g.us" ), array($child), null); $this->sendNode($node); @@ -3753,15 +3760,15 @@ protected function sendRequestFileUpload($b64hash, $type, $size, $filepath, $to, */ protected function sendSetPicture($jid, $filepath) { - if(stripos($filepath, 'http')!== false && !preg_match('/\s/',$filepath)){ - $extension = end(explode(".", $filepath)); - $newImageName = rand(0, 100000); - $imagePath = static::PICTURES_FOLDER."/".$newImageName.".jpg"; - if($extension == 'jpg'){ - copy($filepath, $imagePath); - $filepath = $imagePath; - } - } + if(stripos($filepath, 'http')!== false && !preg_match('/\s/',$filepath)){ + $extension = end(explode(".", $filepath)); + $newImageName = rand(0, 100000); + $imagePath = static::PICTURES_FOLDER."/".$newImageName.".jpg"; + if($extension == 'jpg'){ + copy($filepath, $imagePath); + $filepath = $imagePath; + } + } preprocessProfilePicture($filepath); $fp = @fopen($filepath, "r"); if ($fp) { From f526cd3ad00b68adcea337691be2c466deaf158e Mon Sep 17 00:00:00 2001 From: mgp25 Date: Wed, 3 Dec 2014 21:21:00 +0100 Subject: [PATCH 137/436] Free memory by calling imagedestroy() --- src/func.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/func.php b/src/func.php index 05fda69a..9b2066b9 100755 --- a/src/func.php +++ b/src/func.php @@ -116,6 +116,10 @@ function createIconGD($file, $size = 100, $raw = true) imagejpeg($image_p); $i = ob_get_contents(); ob_end_clean(); + + imagedestroy($image); + imagedestroy($image_p); + return $i; } From d7db07616b7b78dd3308f7dc232f12975a33c440 Mon Sep 17 00:00:00 2001 From: mgp25 Date: Thu, 4 Dec 2014 19:51:28 +0100 Subject: [PATCH 138/436] Update groups to w:g2 --- src/whatsprot.class.php | 71 ++++++++++++++++++++++------------------- 1 file changed, 39 insertions(+), 32 deletions(-) diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index c064d7da..42f8a511 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -46,8 +46,8 @@ class WhatsProt const WHATSAPP_SERVER = 's.whatsapp.net'; // The hostname used to login/send messages. const WHATSAPP_UPLOAD_HOST = 'https://mms.whatsapp.net/client/iphone/upload.php'; // The upload host. const WHATSAPP_DEVICE = 'Android'; // The device name. - const WHATSAPP_VER = '2.11.456'; // The WhatsApp version. - const WHATSAPP_USER_AGENT = 'WhatsApp/2.11.456 Android/4.3 Device/GalaxyS3'; // User agent used in request/registration code. + const WHATSAPP_VER = '2.11.461'; // The WhatsApp version. + const WHATSAPP_USER_AGENT = 'WhatsApp/2.11.461 Android/4.3 Device/GalaxyS3'; // User agent used in request/registration code. const WHATSAPP_VER_CHECKER = 'https://coderus.openrepos.net/whitesoft/whatsapp_version'; // Check WhatsApp version /** @@ -1249,36 +1249,43 @@ public function sendGetStatuses($jids) * @return string * The group ID. */ - public function sendGroupsChatCreate($subject, $participants = array()) - { - $groupHash = array(); - $groupHash["action"] = "create"; - $groupHash["subject"] = $subject; - $group = new ProtocolNode("group", $groupHash, null, ""); - - $setHash = array(); - $setHash["id"] = $this->createMsgId("creategroup"); - $setHash["type"] = "set"; - $setHash["xmlns"] = "w:g2"; - $setHash["to"] = static::WHATSAPP_GROUP_SERVER; - $groupNode = new ProtocolNode("iq", $setHash, array($group), ""); - - $this->sendNode($groupNode); - $this->waitForServer($setHash["id"]); - $groupId = $this->groupId; - - if (count($participants) > 0) { - $this->sendGroupsParticipantsAdd($groupId, $participants); - } - - $this->eventManager()->fire("onGroupCreate", - array( - $this->phoneNumber, - $groupId - )); - - return $groupId; - } + public function sendGroupsChatCreate($subject, $participants) + { + if (!is_array($participants)) { + $participants = array($participants); + } + foreach ($participants as $participant) + { + $participantNode[] = new ProtocolNode("participant", array( + "jid" => $this->getJID($participant) + ), null, null); + } + + $id = $this->createMsgId("creategroup"); + + $createNode = new ProtocolNode("create", array( + "subject" => $subject + ), $participantNode, null); + + $iqNode = new ProtocolNode("iq", array( + "xmlns" => "w:g2", + "id" => $id, + "type" => "set", + "to" => "g.us" + ), array($createNode), null); + + $this->sendNode($iqNode); + $this->waitForServer($id); + $groupId = $this->groupId; + + $this->eventManager()->fire("onGroupCreate", + array( + $this->phoneNumber, + $groupId + )); + + return $groupId; + } public function sendSetGroupSubject($gjid, $subject) { From c5126df7ad28f1fd347d6fbc4083a1791a55f3b3 Mon Sep 17 00:00:00 2001 From: mgp25 Date: Thu, 4 Dec 2014 19:51:49 +0100 Subject: [PATCH 139/436] Update token to 2.11.461 --- src/token.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/token.php b/src/token.php index ce099e84..b6a111f3 100755 --- a/src/token.php +++ b/src/token.php @@ -4,7 +4,7 @@ function generateRequestToken($country, $phone) { $signature = "MIIDMjCCAvCgAwIBAgIETCU2pDALBgcqhkjOOAQDBQAwfDELMAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFDASBgNVBAcTC1NhbnRhIENsYXJhMRYwFAYDVQQKEw1XaGF0c0FwcCBJbmMuMRQwEgYDVQQLEwtFbmdpbmVlcmluZzEUMBIGA1UEAxMLQnJpYW4gQWN0b24wHhcNMTAwNjI1MjMwNzE2WhcNNDQwMjE1MjMwNzE2WjB8MQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEUMBIGA1UEBxMLU2FudGEgQ2xhcmExFjAUBgNVBAoTDVdoYXRzQXBwIEluYy4xFDASBgNVBAsTC0VuZ2luZWVyaW5nMRQwEgYDVQQDEwtCcmlhbiBBY3RvbjCCAbgwggEsBgcqhkjOOAQBMIIBHwKBgQD9f1OBHXUSKVLfSpwu7OTn9hG3UjzvRADDHj+AtlEmaUVdQCJR+1k9jVj6v8X1ujD2y5tVbNeBO4AdNG/yZmC3a5lQpaSfn+gEexAiwk+7qdf+t8Yb+DtX58aophUPBPuD9tPFHsMCNVQTWhaRMvZ1864rYdcq7/IiAxmd0UgBxwIVAJdgUI8VIwvMspK5gqLrhAvwWBz1AoGBAPfhoIXWmz3ey7yrXDa4V7l5lK+7+jrqgvlXTAs9B4JnUVlXjrrUWU/mcQcQgYC0SRZxI+hMKBYTt88JMozIpuE8FnqLVHyNKOCjrh4rs6Z1kW6jfwv6ITVi8ftiegEkO8yk8b6oUZCJqIPf4VrlnwaSi2ZegHtVJWQBTDv+z0kqA4GFAAKBgQDRGYtLgWh7zyRtQainJfCpiaUbzjJuhMgo4fVWZIvXHaSHBU1t5w//S0lDK2hiqkj8KpMWGywVov9eZxZy37V26dEqr/c2m5qZ0E+ynSu7sqUD7kGx/zeIcGT0H+KAVgkGNQCo5Uc0koLRWYHNtYoIvt5R3X6YZylbPftF/8ayWTALBgcqhkjOOAQDBQADLwAwLAIUAKYCp0d6z4QQdyN74JDfQ2WCyi8CFDUM4CaNB+ceVXdKtOrNTQcc0e+t"; - $classesMd5 = "NCZCdOqhl7ssienxqRuu5Q=="; // 2.11.456 + $classesMd5 = "ZiVLoYj05SJyvAR90dEqaw=="; // 2.11.461 $key2 = base64_decode("/UIGKU1FVQa+ATM2A0za7G2KI9S/CwPYjgAbc67v7ep42eO/WeTLx1lb1cHwxpsEgF4+PmYpLd2YpGUdX/A2JQitsHzDwgcdBpUf7psX1BU="); $data = base64_decode($signature) . base64_decode($classesMd5) . $phone; From fc043660f3dbdf17e7ff247718c754fe052ec667 Mon Sep 17 00:00:00 2001 From: mgp25 Date: Thu, 4 Dec 2014 20:11:10 +0100 Subject: [PATCH 140/436] Update registerTool Now supports carriers --- examples/registerTool.php | 32 ++++++++++++++++++++------------ 1 file changed, 20 insertions(+), 12 deletions(-) diff --git a/examples/registerTool.php b/examples/registerTool.php index dbb4b251..7747b073 100644 --- a/examples/registerTool.php +++ b/examples/registerTool.php @@ -12,9 +12,11 @@ echo "\n\nUsername (country code + number without + or 00): "; $username = trim(fgets(STDIN)); -$identity = ""; +$identity = "identity"; echo "\nNickname: "; $nickname = trim(fgets(STDIN)); +echo "\nCarrier: "; +$carrier = trim(fgets(STDIN)); // Create a instance of WhastPort. $w = new WhatsProt($username, $identity, $nickname, $debug); @@ -22,20 +24,26 @@ echo "\n\nType sms or voice: "; $option = fgets(STDIN); -try { - $w->codeRequest(trim($option)); -} catch (Exception $e) { - echo "\nError: $e"; - exit(0); +try +{ + $w->codeRequest(trim($option), $carrier); +} +catch(Exception $e) +{ + echo $e->getMessage(); + exit(0); } echo "\n\nEnter the received code: "; $code = fgets(STDIN); -try { - $result = $w->codeRegister(trim($code)); - echo "\nYour password is: " . $result->pw; -} catch (Exception $e) { - echo "\Error: $e"; - exit(0); +try +{ + $result = $w->codeRegister(trim($code)); + echo "\nYour password is: ".$result->pw."\n"; +} +catch(Exception $e) +{ + echo $e->getMessage(); + exit(0); } From df685d9aac31704eb68feb9589ed765204939f2f Mon Sep 17 00:00:00 2001 From: mgp25 Date: Thu, 4 Dec 2014 20:19:03 +0100 Subject: [PATCH 141/436] Use sendGetGroupV2Info sendGetGroupsInfo is not working anymore --- src/whatsprot.class.php | 22 +--------------------- 1 file changed, 1 insertion(+), 21 deletions(-) diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index 42f8a511..fcf2c0c3 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -839,26 +839,6 @@ public function sendGetGroups() $this->sendGetGroupsFiltered("participating"); } - /** - * Send a request to get information about a specific group - * - * @param string $gjid The specific group id - */ - public function sendGetGroupsInfo($gjid) - { - $msgId = $this->createMsgId("getgroupinfo"); - - $child = new ProtocolNode("query", null, null, null); - $node = new ProtocolNode("iq", array( - "id" => $msgId, - "type" => "get", - "xmlns" => "w:g2", - "to" => $this->getJID($gjid) - ), array($child), null); - $this->sendNode($node); - $this->waitForServer($msgId); - } - /** * Send a request to get new Groups V2 info * @@ -2895,7 +2875,7 @@ protected function processInboundDataNode(ProtocolNode $node, $autoReceipt = tru //Events fired depend on text in the ID field. $groupList = array(); if ($node->getChild(0) != null) { - foreach ($node->getChildren() as $child) { + foreach ($node->getChild(0)->getChildren() as $child) { $groupList[] = $child->getAttributes(); } } From fea309743437b1f70189556c685b457081a472b4 Mon Sep 17 00:00:00 2001 From: mgp25 Date: Fri, 5 Dec 2014 08:12:42 +0100 Subject: [PATCH 142/436] Fixed Mac Mismatch and Incomplete message errors Credits: @0xTryCatch --- src/whatsprot.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index fcf2c0c3..a397da73 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -3439,8 +3439,8 @@ public function readStanza() { throw new Exception("Failed to read stanza header"); } - $treeLength = 0; - $treeLength = ord($header[1]) << 8; + $treeLength = (ord($header[0]) & 0x0F) << 16; + $treeLength |= ord($header[1]) << 8; $treeLength |= ord($header[2]) << 0; //read full length From 216defbe08472d294b8cbbc5ade6550441511266 Mon Sep 17 00:00:00 2001 From: SikiFn Date: Sun, 7 Dec 2014 13:18:44 +0200 Subject: [PATCH 143/436] Migrated from fsockopen() to socket_*() Closed connection handling in fsockopen() is a bit picky.. When using socket_* in php, the socket_read() returns false when the socket is closed.. --- src/whatsprot.class.php | 66 +++++++++++++++++++++++++---------------- 1 file changed, 40 insertions(+), 26 deletions(-) diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index a397da73..a173cd07 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -46,8 +46,8 @@ class WhatsProt const WHATSAPP_SERVER = 's.whatsapp.net'; // The hostname used to login/send messages. const WHATSAPP_UPLOAD_HOST = 'https://mms.whatsapp.net/client/iphone/upload.php'; // The upload host. const WHATSAPP_DEVICE = 'Android'; // The device name. - const WHATSAPP_VER = '2.11.461'; // The WhatsApp version. - const WHATSAPP_USER_AGENT = 'WhatsApp/2.11.461 Android/4.3 Device/GalaxyS3'; // User agent used in request/registration code. + const WHATSAPP_VER = '2.11.464'; // The WhatsApp version. + const WHATSAPP_USER_AGENT = 'WhatsApp/2.11.464 Android/4.3 Device/GalaxyS3'; // User agent used in request/registration code. const WHATSAPP_VER_CHECKER = 'https://coderus.openrepos.net/whitesoft/whatsapp_version'; // Check WhatsApp version /** @@ -464,16 +464,28 @@ public function connect() updateData('whatsprot.class.php', $WAver); } - $Socket = fsockopen(static::WHATSAPP_HOST, static::PORT); - if ($Socket !== false) { - stream_set_timeout($Socket, static::TIMEOUT_SEC, static::TIMEOUT_USEC); - $this->socket = $Socket; + /* Create a TCP/IP socket. */ + $socket = socket_create(AF_INET, SOCK_STREAM, SOL_TCP); + if ($socket !== false) { + $result = socket_connect($socket, static::WHATSAPP_HOST, static::PORT); + if ($result === false) { + $socket = false; + } + } + + if ($socket !== false) { + + socket_set_option($socket, SOL_SOCKET, SO_RCVTIMEO, array('sec' => static::TIMEOUT_SEC, 'usec' => static::TIMEOUT_USEC)); + socket_set_option($socket, SOL_SOCKET, SO_SNDTIMEO, array('sec' => static::TIMEOUT_SEC, 'usec' => static::TIMEOUT_USEC)); + + $this->socket = $socket; $this->eventManager()->fire("onConnect", array( $this->phoneNumber, $this->socket ) ); + } else { if ($this->debug) { print_r("Firing onConnectError\n"); @@ -482,7 +494,8 @@ public function connect() array( $this->phoneNumber, $this->socket - )); + ) + ); } } @@ -492,12 +505,10 @@ public function connect() */ public function isConnected() { - if (!empty($this->socket) && feof($this->socket) === false) - { - return true; //Already connected. + if($this->socket === null) { + return false; } - - return false; + return true; } @@ -3429,7 +3440,20 @@ public function readStanza() $buff = ''; if($this->socket != null) { - $header = @fread($this->socket, 3);//read stanza header + $header = @socket_read($this->socket, 3);//read stanza header + var_dump($header); + if($header === false) { + $error = "socket EOF, closing socket..."; + socket_close($this->socket); + $this->socket = null; + $this->eventManager()->fire("onClose", + array( + $this->phoneNumber, + $error + ) + ); + } + if(strlen($header) == 0) { //no data received @@ -3444,14 +3468,14 @@ public function readStanza() $treeLength |= ord($header[2]) << 0; //read full length - $buff = @fread($this->socket, $treeLength); + $buff = socket_read($this->socket, $treeLength); $trlen = $treeLength; $len = strlen($buff); $prev = 0; while(strlen($buff) < $treeLength) { $toRead = $treeLength - strlen($buff); - $buff .= @fread($this->socket, $toRead); + $buff .= socket_read($this->socket, $toRead); if($len == strlen($buff)) { //no new data read, fuck it @@ -3462,16 +3486,6 @@ public function readStanza() if (strlen($buff) != $treeLength) { throw new Exception("Tree length did not match received length (buff = " . strlen($buff) . " & treeLength = $treeLength)"); - } else - if (@feof($this->socket)) { - $error = "socket EOF, closing socket..."; - fclose($this->socket); - $this->socket = null; - $this->eventManager()->fire("onClose", - array( - $this->phoneNumber, - $error - )); } $buff = $header . $buff; } @@ -3575,7 +3589,7 @@ protected function sendData($data) { if($this->socket != null) { - fwrite($this->socket, $data, strlen($data)); + socket_write($this->socket, $data, strlen($data)); } } From 02a41ae05219c4972db126ab24cc68290e89a0da Mon Sep 17 00:00:00 2001 From: SikiFn Date: Sun, 7 Dec 2014 13:22:31 +0200 Subject: [PATCH 144/436] Update token --- src/token.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/token.php b/src/token.php index b6a111f3..71c88021 100755 --- a/src/token.php +++ b/src/token.php @@ -4,7 +4,7 @@ function generateRequestToken($country, $phone) { $signature = "MIIDMjCCAvCgAwIBAgIETCU2pDALBgcqhkjOOAQDBQAwfDELMAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFDASBgNVBAcTC1NhbnRhIENsYXJhMRYwFAYDVQQKEw1XaGF0c0FwcCBJbmMuMRQwEgYDVQQLEwtFbmdpbmVlcmluZzEUMBIGA1UEAxMLQnJpYW4gQWN0b24wHhcNMTAwNjI1MjMwNzE2WhcNNDQwMjE1MjMwNzE2WjB8MQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEUMBIGA1UEBxMLU2FudGEgQ2xhcmExFjAUBgNVBAoTDVdoYXRzQXBwIEluYy4xFDASBgNVBAsTC0VuZ2luZWVyaW5nMRQwEgYDVQQDEwtCcmlhbiBBY3RvbjCCAbgwggEsBgcqhkjOOAQBMIIBHwKBgQD9f1OBHXUSKVLfSpwu7OTn9hG3UjzvRADDHj+AtlEmaUVdQCJR+1k9jVj6v8X1ujD2y5tVbNeBO4AdNG/yZmC3a5lQpaSfn+gEexAiwk+7qdf+t8Yb+DtX58aophUPBPuD9tPFHsMCNVQTWhaRMvZ1864rYdcq7/IiAxmd0UgBxwIVAJdgUI8VIwvMspK5gqLrhAvwWBz1AoGBAPfhoIXWmz3ey7yrXDa4V7l5lK+7+jrqgvlXTAs9B4JnUVlXjrrUWU/mcQcQgYC0SRZxI+hMKBYTt88JMozIpuE8FnqLVHyNKOCjrh4rs6Z1kW6jfwv6ITVi8ftiegEkO8yk8b6oUZCJqIPf4VrlnwaSi2ZegHtVJWQBTDv+z0kqA4GFAAKBgQDRGYtLgWh7zyRtQainJfCpiaUbzjJuhMgo4fVWZIvXHaSHBU1t5w//S0lDK2hiqkj8KpMWGywVov9eZxZy37V26dEqr/c2m5qZ0E+ynSu7sqUD7kGx/zeIcGT0H+KAVgkGNQCo5Uc0koLRWYHNtYoIvt5R3X6YZylbPftF/8ayWTALBgcqhkjOOAQDBQADLwAwLAIUAKYCp0d6z4QQdyN74JDfQ2WCyi8CFDUM4CaNB+ceVXdKtOrNTQcc0e+t"; - $classesMd5 = "ZiVLoYj05SJyvAR90dEqaw=="; // 2.11.461 + $classesMd5 = "suw7l5pJIa1AUX3khZkoSw=="; // 2.11.464 $key2 = base64_decode("/UIGKU1FVQa+ATM2A0za7G2KI9S/CwPYjgAbc67v7ep42eO/WeTLx1lb1cHwxpsEgF4+PmYpLd2YpGUdX/A2JQitsHzDwgcdBpUf7psX1BU="); $data = base64_decode($signature) . base64_decode($classesMd5) . $phone; From 856fe8f4afe8cb8a365ead97698d792bc0005078 Mon Sep 17 00:00:00 2001 From: SikiFn Date: Sun, 7 Dec 2014 13:45:45 +0200 Subject: [PATCH 145/436] Removed var_dump() in readStanza Lol. We forgot a var_dump after the sockets update --- src/whatsprot.class.php | 1 - 1 file changed, 1 deletion(-) diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index a173cd07..142550d8 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -3441,7 +3441,6 @@ public function readStanza() if($this->socket != null) { $header = @socket_read($this->socket, 3);//read stanza header - var_dump($header); if($header === false) { $error = "socket EOF, closing socket..."; socket_close($this->socket); From 791823877c2abd83b1ac9e26f8343d076badfdfa Mon Sep 17 00:00:00 2001 From: mgp25 Date: Mon, 8 Dec 2014 10:45:37 +0100 Subject: [PATCH 146/436] New dictionary WA 1.5 --- src/tokenmap.class.php | 850 ++++++++++++++++++++++------------------- 1 file changed, 461 insertions(+), 389 deletions(-) diff --git a/src/tokenmap.class.php b/src/tokenmap.class.php index b7ddadcf..e7796f6c 100755 --- a/src/tokenmap.class.php +++ b/src/tokenmap.class.php @@ -11,397 +11,469 @@ class TokenMap { private static $primaryStrings = array( - "", - "", - "", - "account", - "ack", - "action", - "active", - "add", - "after", - "all", - "allow", - "apple", - "auth", - "author", - "available", - "bad-protocol", - "bad-request", - "before", - "body", - "broadcast", - "cancel", - "category", - "challenge", - "chat", - "clean", - "code", - "composing", - "config", - "contacts", - "count", - "create", - "creation", - "debug", - "default", - "delete", - "delivery", - "delta", - "deny", - "digest", - "dirty", - "duplicate", - "elapsed", - "enable", - "encoding", - "error", - "event", - "expiration", - "expired", - "fail", - "failure", - "false", - "favorites", - "feature", - "features", - "feature-not-implemented", - "field", - "first", - "free", - "from", - "g.us", - "get", - "google", - "group", - "groups", - "http://etherx.jabber.org/streams", - "http://jabber.org/protocol/chatstates", - "ib", - "id", - "image", - "img", - "index", - "internal-server-error", - "ip", - "iq", - "item-not-found", - "item", - "jabber:iq:last", - "jabber:iq:privacy", - "jabber:x:event", - "jid", - "kind", - "last", - "leave", - "list", - "max", - "mechanism", - "media", - "message_acks", - "message", - "method", - "microsoft", - "missing", - "modify", - "mute", - "name", - "nokia", - "none", - "not-acceptable", - "not-allowed", - "not-authorized", - "notification", - "notify", - "off", - "offline", - "order", - "owner", - "owning", - "p_o", - "p_t", - "paid", - "participant", - "participants", - "participating", - "paused", - "picture", - "pin", - "ping", - "platform", - "port", - "presence", - "preview", - "probe", - "prop", - "props", - "query", - "raw", - "read", - "reason", - "receipt", - "received", - "relay", - "remote-server-timeout", - "remove", - "request", - "required", - "resource-constraint", - "resource", - "response", - "result", - "retry", - "rim", - "s_o", - "s_t", - "s.us", - "s.whatsapp.net", - "seconds", - "server-error", - "server", - "service-unavailable", - "set", - "show", - "silent", - "stat", - "status", - "stream:error", - "stream:features", - "subject", - "subscribe", - "success", - "sync", - "t", - "text", - "timeout", - "timestamp", - "to", - "true", - "type", - "unavailable", - "unsubscribe", - "uri", - "url", - "urn:ietf:params:xml:ns:xmpp-sasl", - "urn:ietf:params:xml:ns:xmpp-stanzas", - "urn:ietf:params:xml:ns:xmpp-streams", - "urn:xmpp:ping", - "urn:xmpp:receipts", - "urn:xmpp:whatsapp:account", - "urn:xmpp:whatsapp:dirty", - "urn:xmpp:whatsapp:mms", - "urn:xmpp:whatsapp:push", - "urn:xmpp:whatsapp", - "user", - "user-not-found", - "value", - "version", - "w:g", - "w:p:r", - "w:p", - "w:profile:picture", - "w", - "wait", - "WAUTH-2", - "x", - "xmlns:stream", - "xmlns", - "1", - "chatstate", - "crypto", - "enc", - "class", - "off_cnt", - "w:g2", - "promote", - "demote", - "creator" + "", + "", + "", + "account", + "ack", + "action", + "active", + "add", + "after", + "all", + "allow", + "apple", + "auth", + "author", + "available", + "bad-protocol", + "bad-request", + "before", + "body", + "broadcast", + "cancel", + "category", + "challenge", + "chat", + "clean", + "code", + "composing", + "config", + "contacts", + "count", + "create", + "creation", + "debug", + "default", + "delete", + "delivery", + "delta", + "deny", + "digest", + "dirty", + "duplicate", + "elapsed", + "enable", + "encoding", + "error", + "event", + "expiration", + "expired", + "fail", + "failure", + "false", + "favorites", + "feature", + "features", + "feature-not-implemented", + "field", + "first", + "free", + "from", + "g.us", + "get", + "google", + "group", + "groups", + "groups_v2", + "http://etherx.jabber.org/streams", + "http://jabber.org/protocol/chatstates", + "ib", + "id", + "image", + "img", + "index", + "internal-server-error", + "ip", + "iq", + "item-not-found", + "item", + "jabber:iq:last", + "jabber:iq:privacy", + "jabber:x:event", + "jid", + "kind", + "last", + "leave", + "list", + "max", + "mechanism", + "media", + "message_acks", + "message", + "method", + "microsoft", + "missing", + "modify", + "mute", + "name", + "nokia", + "none", + "not-acceptable", + "not-allowed", + "not-authorized", + "notification", + "notify", + "off", + "offline", + "order", + "owner", + "owning", + "p_o", + "p_t", + "paid", + "participant", + "participants", + "participating", + "paused", + "picture", + "pin", + "ping", + "platform", + "port", + "presence", + "preview", + "probe", + "prop", + "props", + "query", + "raw", + "read", + "readreceipts", + "reason", + "receipt", + "relay", + "remote-server-timeout", + "remove", + "request", + "required", + "resource-constraint", + "resource", + "response", + "result", + "retry", + "rim", + "s_o", + "s_t", + "s.us", + "s.whatsapp.net", + "seconds", + "server-error", + "server", + "service-unavailable", + "set", + "show", + "silent", + "stat", + "status", + "stream:error", + "stream:features", + "subject", + "subscribe", + "success", + "sync", + "t", + "text", + "timeout", + "timestamp", + "to", + "true", + "type", + "unavailable", + "unsubscribe", + "uri", + "url", + "urn:ietf:params:xml:ns:xmpp-sasl", + "urn:ietf:params:xml:ns:xmpp-stanzas", + "urn:ietf:params:xml:ns:xmpp-streams", + "urn:xmpp:ping", + "urn:xmpp:whatsapp:account", + "urn:xmpp:whatsapp:dirty", + "urn:xmpp:whatsapp:mms", + "urn:xmpp:whatsapp:push", + "urn:xmpp:whatsapp", + "user", + "user-not-found", + "value", + "version", + "w:g", + "w:p:r", + "w:p", + "w:profile:picture", + "w", + "wait", + "WAUTH-2", + "xmlns:stream", + "xmlns", + "1", + "chatstate", + "crypto", + "phash", + "enc", + "class", + "off_cnt", + "w:g2", + "promote", + "demote", + "creator", + "Bell.caf", + "Boing.caf", + "Glass.caf", + "Harp.caf", + "TimePassing.caf", + "Tri-tone.caf", + "Xylophone.caf", + "background", + "backoff", + "chunked", + "context", + "full", + "in", + "interactive", + "out", + "registration", + "sid", + "urn:xmpp:whatsapp:sync", + "flt", + "s16", + "u8", + "adpcm", + "amrnb", + "amrwb", + "mp3", + "pcm", + "qcelp", + "wma", + "h263", + "h264", + "jpeg" ); private static $secondaryStrings = array( - "Bell.caf", - "Boing.caf", - "Glass.caf", - "Harp.caf", - "TimePassing.caf", - "Tri-tone.caf", - "Xylophone.caf", - "background", - "backoff", - "chunked", - "context", - "full", - "in", - "interactive", - "out", - "registration", - "sid", - "urn:xmpp:whatsapp:sync", - "flt", - "s16", - "u8", - "adpcm", - "amrnb", - "amrwb", - "mp3", - "pcm", - "qcelp", - "wma", - "h263", - "h264", - "jpeg", - "mpeg4", - "wmv", - "audio/3gpp", - "audio/aac", - "audio/amr", - "audio/mp4", - "audio/mpeg", - "audio/ogg", - "audio/qcelp", - "audio/wav", - "audio/webm", - "audio/x-caf", - "audio/x-ms-wma", - "image/gif", - "image/jpeg", - "image/png", - "video/3gpp", - "video/avi", - "video/mp4", - "video/mpeg", - "video/quicktime", - "video/x-flv", - "video/x-ms-asf", - "302", - "400", - "401", - "402", - "403", - "404", - "405", - "406", - "407", - "409", - "500", - "501", - "503", - "504", - "abitrate", - "acodec", - "app_uptime", - "asampfmt", - "asampfreq", - "audio", - "bb_db", - "clear", - "conflict", - "conn_no_nna", - "cost", - "currency", - "duration", - "extend", - "file", - "fps", - "g_notify", - "g_sound", - "gcm", - "google_play", - "hash", - "height", - "invalid", - "jid-malformed", - "latitude", - "lc", - "lg", - "live", - "location", - "log", - "longitude", - "max_groups", - "max_participants", - "max_subject", - "mimetype", - "mode", - "napi_version", - "normalize", - "orighash", - "origin", - "passive", - "password", - "played", - "policy-violation", - "pop_mean_time", - "pop_plus_minus", - "price", - "pricing", - "redeem", - "Replaced by new connection", - "resume", - "signature", - "size", - "sound", - "source", - "system-shutdown", - "username", - "vbitrate", - "vcard", - "vcodec", - "video", - "width", - "xml-not-well-formed", - "checkmarks", - "image_max_edge", - "image_max_kbytes", - "image_quality", - "ka", - "ka_grow", - "ka_shrink", - "newmedia", - "library", - "caption", - "forward", - "c0", - "c1", - "c2", - "c3", - "clock_skew", - "cts", - "k0", - "k1", - "login_rtt", - "m_id", - "nna_msg_rtt", - "nna_no_off_count", - "nna_offline_ratio", - "nna_push_rtt", - "no_nna_con_count", - "off_msg_rtt", - "on_msg_rtt", - "stat_name", - "sts", - "suspect_conn", - "lists", - "self", - "qr", - "web", - "w:b", - "recipient", - "w:stats", - "forbidden", - "aurora.m4r", - "bamboo.m4r", - "chord.m4r", - "circles.m4r", - "complete.m4r", - "hello.m4r", - "input.m4r", - "keys.m4r", - "note.m4r", - "popcorn.m4r", - "pulse.m4r", - "synth.m4r", - "filehash" + "mpeg4", + "wmv", + "audio/3gpp", + "audio/aac", + "audio/amr", + "audio/mp4", + "audio/mpeg", + "audio/ogg", + "audio/qcelp", + "audio/wav", + "audio/webm", + "audio/x-caf", + "audio/x-ms-wma", + "image/gif", + "image/jpeg", + "image/png", + "video/3gpp", + "video/avi", + "video/mp4", + "video/mpeg", + "video/quicktime", + "video/x-flv", + "video/x-ms-asf", + "302", + "400", + "401", + "402", + "403", + "404", + "405", + "406", + "407", + "409", + "410", + "500", + "501", + "503", + "504", + "abitrate", + "acodec", + "app_uptime", + "asampfmt", + "asampfreq", + "audio", + "clear", + "conflict", + "conn_no_nna", + "cost", + "currency", + "duration", + "extend", + "file", + "fps", + "g_notify", + "g_sound", + "gcm", + "gone", + "google_play", + "hash", + "height", + "invalid", + "jid-malformed", + "latitude", + "lc", + "lg", + "live", + "location", + "log", + "longitude", + "max_groups", + "max_participants", + "max_subject", + "mimetype", + "mode", + "napi_version", + "normalize", + "orighash", + "origin", + "passive", + "password", + "played", + "policy-violation", + "pop_mean_time", + "pop_plus_minus", + "price", + "pricing", + "redeem", + "Replaced by new connection", + "resume", + "signature", + "size", + "sound", + "source", + "system-shutdown", + "username", + "vbitrate", + "vcard", + "vcodec", + "video", + "width", + "xml-not-well-formed", + "checkmarks", + "image_max_edge", + "image_max_kbytes", + "image_quality", + "ka", + "ka_grow", + "ka_shrink", + "newmedia", + "library", + "caption", + "forward", + "c0", + "c1", + "c2", + "c3", + "clock_skew", + "cts", + "k0", + "k1", + "login_rtt", + "m_id", + "nna_msg_rtt", + "nna_no_off_count", + "nna_offline_ratio", + "nna_push_rtt", + "no_nna_con_count", + "off_msg_rtt", + "on_msg_rtt", + "stat_name", + "sts", + "suspect_conn", + "lists", + "self", + "qr", + "web", + "w:b", + "recipient", + "w:stats", + "forbidden", + "aurora.m4r", + "bamboo.m4r", + "chord.m4r", + "circles.m4r", + "complete.m4r", + "hello.m4r", + "input.m4r", + "keys.m4r", + "note.m4r", + "popcorn.m4r", + "pulse.m4r", + "synth.m4r", + "filehash", + "max_list_recipients", + "en-AU", + "en-GB", + "es-MX", + "pt-PT", + "zh-Hans", + "zh-Hant", + "relayelection", + "relaylatency", + "interruption", + "Apex.m4r", + "Beacon.m4r", + "Bulletin.m4r", + "By The Seaside.m4r", + "Chimes.m4r", + "Circuit.m4r", + "Constellation.m4r", + "Cosmic.m4r", + "Crystals.m4r", + "Hillside.m4r", + "Illuminate.m4r", + "Night Owl.m4r", + "Opening.m4r", + "Playtime.m4r", + "Presto.m4r", + "Radar.m4r", + "Radiate.m4r", + "Ripples.m4r", + "Sencha.m4r", + "Signal.m4r", + "Silk.m4r", + "Slow Rise.m4r", + "Stargaze.m4r", + "Summit.m4r", + "Twinkle.m4r", + "Uplift.m4r", + "Waves.m4r", + "voip", + "eligible", + "upgrade", + "planned", + "current", + "future", + "disable", + "expire", + "start", + "stop", + "accuracy", + "speed", + "bearing", + "recording", + "encrypt", + "key", + "identity", + "w:gp2", + "admin", + "locked", + "unlocked", + "new", + "battery", + "archive", + "adm", + "plaintext_size", + "compressed_size", + "delivered", + "msg", + "pkmsg", + "everyone", + "v", + "transport", + "call-id" ); public static function TryGetToken($string, &$subdict, &$token) @@ -441,4 +513,4 @@ public static function GetToken($token, &$subdict, &$string) throw new Exception("Invalid token/length in GetToken"); } } -} \ No newline at end of file +} From 87072caaca344273f17c8cfe702a6814271a9b59 Mon Sep 17 00:00:00 2001 From: mgp25 Date: Mon, 8 Dec 2014 10:46:35 +0100 Subject: [PATCH 147/436] Update readStrings --- src/protocol.class.php | 46 +++++++++++++++++++++++++++++++++++++++++- 1 file changed, 45 insertions(+), 1 deletion(-) diff --git a/src/protocol.class.php b/src/protocol.class.php index 1118c8a4..50312f9e 100755 --- a/src/protocol.class.php +++ b/src/protocol.class.php @@ -287,6 +287,48 @@ public function nextTree($input = null) return null; } + protected function readNibble() { + $byte = $this->readInt8(); + + $ignoreLastNibble = (bool) ($byte & 0x80); + $size = ($byte & 0x7f); + $nrOfNibbles = $size * 2 - (int) $ignoreLastNibble; + + $data = $this->fillArray($size); + $string = ''; + + for ($i = 0; $i < $nrOfNibbles; $i++) { + $byte = $data[(int) floor($i / 2)]; + $ord = ord($byte); + + $shift = 4 * (1 - $i % 2); + $decimal = ($ord & (15 << $shift)) >> $shift; + + switch ($decimal) { + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + $string .= $decimal; + break; + case 10: + case 11: + $string .= chr($decimal - 10 + 45); + break; + default: + throw new Exception("Bad nibble: $decimal"); + } + } + + return $string; + } + protected function getToken($token) { $ret = ""; @@ -326,6 +368,8 @@ protected function readString($token) } elseif (strlen($server) > 0) { $ret = $server; } + } elseif ($token == 0xff) { + $ret = $this->readNibble(); } return $ret; @@ -498,7 +542,7 @@ public function StartStream($domain, $resource) $attributes = array(); $header = "WA"; $header .= $this->writeInt8(1); - $header .= $this->writeInt8(4); + $header .= $this->writeInt8(5); $attributes["to"] = $domain; $attributes["resource"] = $resource; From 37bf559256c0442c2adadd1055625ee82512752c Mon Sep 17 00:00:00 2001 From: mgp25 Date: Tue, 9 Dec 2014 00:42:20 +0100 Subject: [PATCH 148/436] Update group functions sendSetGroupSubject and sendSetGroupPicture --- src/whatsprot.class.php | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index 142550d8..d79e1382 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -1278,9 +1278,17 @@ public function sendGroupsChatCreate($subject, $participants) return $groupId; } + /** + * Change group subject + * + * @param string $gjid + * The group id + * @param string $subject + * The subject + */ public function sendSetGroupSubject($gjid, $subject) { - $child = new ProtocolNode("subject", array("value" => $subject), null, null); + $child = new ProtocolNode("subject", null, null, $subject); $node = new ProtocolNode("iq", array( "id" => $this->createMsgId("set_group_subject"), "type" => "set", @@ -3775,10 +3783,7 @@ protected function sendSetPicture($jid, $filepath) $data = fread($fp, filesize($filepath)); if ($data) { //this is where the fun starts - $picture = new ProtocolNode("picture", null, null, $data); - - $icon = createIconGD($filepath, 96, true); - $thumb = new ProtocolNode("picture", array("type" => "preview"), null, $icon); + $picture = new ProtocolNode("picture", array("type" => "image"), null, $data); $hash = array(); $nodeID = $this->createMsgId("setphoto"); @@ -3786,7 +3791,7 @@ protected function sendSetPicture($jid, $filepath) $hash["to"] = $this->getJID($jid); $hash["type"] = "set"; $hash["xmlns"] = "w:profile:picture"; - $node = new ProtocolNode("iq", $hash, array($picture, $thumb), null); + $node = new ProtocolNode("iq", $hash, array($picture), null); $this->sendNode($node); $this->waitForServer($nodeID); From b6a315a288fa237a370f92b123b07cb167fda269 Mon Sep 17 00:00:00 2001 From: mgp25 Date: Tue, 9 Dec 2014 21:03:18 +0100 Subject: [PATCH 149/436] sendSetPrivacyBlockedList updated --- src/whatsprot.class.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index d79e1382..0fcdfb89 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -1771,9 +1771,10 @@ public function sendSetPrivacyBlockedList($blockedJids = array()) $items[] = $item; } $child = new ProtocolNode("list", array("name" => "default"), $items, null); - $child2 = new ProtocolNode("query", array("xmlns" => "jabber:iq:privacy"), array($child), null); + $child2 = new ProtocolNode("query", null, array($child), null); $node = new ProtocolNode("iq", array( "id" => $this->createMsgId("setprivacy"), + "xmlns" => "jabber:iq:privacy", "type" => "set" ), array($child2), null); $this->sendNode($node); From 8d6ae0121a41cd098ec39ab7c3b6ee81786c5d76 Mon Sep 17 00:00:00 2001 From: mgp25 Date: Thu, 11 Dec 2014 19:07:00 +0100 Subject: [PATCH 150/436] Fix connection closed! issue + update token --- src/token.php | 2 +- src/whatsprot.class.php | 28 +++++++++++++++++----------- 2 files changed, 18 insertions(+), 12 deletions(-) diff --git a/src/token.php b/src/token.php index 71c88021..3c6cef4e 100755 --- a/src/token.php +++ b/src/token.php @@ -4,7 +4,7 @@ function generateRequestToken($country, $phone) { $signature = "MIIDMjCCAvCgAwIBAgIETCU2pDALBgcqhkjOOAQDBQAwfDELMAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFDASBgNVBAcTC1NhbnRhIENsYXJhMRYwFAYDVQQKEw1XaGF0c0FwcCBJbmMuMRQwEgYDVQQLEwtFbmdpbmVlcmluZzEUMBIGA1UEAxMLQnJpYW4gQWN0b24wHhcNMTAwNjI1MjMwNzE2WhcNNDQwMjE1MjMwNzE2WjB8MQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEUMBIGA1UEBxMLU2FudGEgQ2xhcmExFjAUBgNVBAoTDVdoYXRzQXBwIEluYy4xFDASBgNVBAsTC0VuZ2luZWVyaW5nMRQwEgYDVQQDEwtCcmlhbiBBY3RvbjCCAbgwggEsBgcqhkjOOAQBMIIBHwKBgQD9f1OBHXUSKVLfSpwu7OTn9hG3UjzvRADDHj+AtlEmaUVdQCJR+1k9jVj6v8X1ujD2y5tVbNeBO4AdNG/yZmC3a5lQpaSfn+gEexAiwk+7qdf+t8Yb+DtX58aophUPBPuD9tPFHsMCNVQTWhaRMvZ1864rYdcq7/IiAxmd0UgBxwIVAJdgUI8VIwvMspK5gqLrhAvwWBz1AoGBAPfhoIXWmz3ey7yrXDa4V7l5lK+7+jrqgvlXTAs9B4JnUVlXjrrUWU/mcQcQgYC0SRZxI+hMKBYTt88JMozIpuE8FnqLVHyNKOCjrh4rs6Z1kW6jfwv6ITVi8ftiegEkO8yk8b6oUZCJqIPf4VrlnwaSi2ZegHtVJWQBTDv+z0kqA4GFAAKBgQDRGYtLgWh7zyRtQainJfCpiaUbzjJuhMgo4fVWZIvXHaSHBU1t5w//S0lDK2hiqkj8KpMWGywVov9eZxZy37V26dEqr/c2m5qZ0E+ynSu7sqUD7kGx/zeIcGT0H+KAVgkGNQCo5Uc0koLRWYHNtYoIvt5R3X6YZylbPftF/8ayWTALBgcqhkjOOAQDBQADLwAwLAIUAKYCp0d6z4QQdyN74JDfQ2WCyi8CFDUM4CaNB+ceVXdKtOrNTQcc0e+t"; - $classesMd5 = "suw7l5pJIa1AUX3khZkoSw=="; // 2.11.464 + $classesMd5 = "zkrJMO7CuBg3gV4h3ZPrbg=="; // 2.11.471 $key2 = base64_decode("/UIGKU1FVQa+ATM2A0za7G2KI9S/CwPYjgAbc67v7ep42eO/WeTLx1lb1cHwxpsEgF4+PmYpLd2YpGUdX/A2JQitsHzDwgcdBpUf7psX1BU="); $data = base64_decode($signature) . base64_decode($classesMd5) . $phone; diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index 0fcdfb89..6aa4d1ab 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -46,8 +46,8 @@ class WhatsProt const WHATSAPP_SERVER = 's.whatsapp.net'; // The hostname used to login/send messages. const WHATSAPP_UPLOAD_HOST = 'https://mms.whatsapp.net/client/iphone/upload.php'; // The upload host. const WHATSAPP_DEVICE = 'Android'; // The device name. - const WHATSAPP_VER = '2.11.464'; // The WhatsApp version. - const WHATSAPP_USER_AGENT = 'WhatsApp/2.11.464 Android/4.3 Device/GalaxyS3'; // User agent used in request/registration code. + const WHATSAPP_VER = '2.11.471'; // The WhatsApp version. + const WHATSAPP_USER_AGENT = 'WhatsApp/2.11.471 Android/4.3 Device/GalaxyS3'; // User agent used in request/registration code. const WHATSAPP_VER_CHECKER = 'https://coderus.openrepos.net/whitesoft/whatsapp_version'; // Check WhatsApp version /** @@ -598,17 +598,23 @@ public function loginWithPassword($password) */ public function pollMessage($autoReceipt = true, $type = "read") { - if(!$this->isConnected()) { - throw new Exception('Connection Closed!'); - } + if(!$this->isConnected()) { + throw new Exception('Connection Closed!'); + } - $stanza = $this->readStanza(); - if($stanza) - { - $this->processInboundData($stanza, $autoReceipt, $type); - return true; + $r = array($this->socket); + $w = array(); + $e = array(); + + if (socket_select($r, $w, $e, static::TIMEOUT_SEC, static::TIMEOUT_USEC)) { + // Something to read + if ($stanza = $this->readStanza()) { + $this->processInboundData($stanza, $autoReceipt, $type); + return true; } - return false; + } + + return false; } /** From c15b80f22fc1cd9780678d30db13e4e3622ee57b Mon Sep 17 00:00:00 2001 From: mgp25 Date: Sun, 14 Dec 2014 00:41:25 +0100 Subject: [PATCH 151/436] Update token --- src/token.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/token.php b/src/token.php index 3c6cef4e..7ef1bbce 100755 --- a/src/token.php +++ b/src/token.php @@ -4,7 +4,7 @@ function generateRequestToken($country, $phone) { $signature = "MIIDMjCCAvCgAwIBAgIETCU2pDALBgcqhkjOOAQDBQAwfDELMAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFDASBgNVBAcTC1NhbnRhIENsYXJhMRYwFAYDVQQKEw1XaGF0c0FwcCBJbmMuMRQwEgYDVQQLEwtFbmdpbmVlcmluZzEUMBIGA1UEAxMLQnJpYW4gQWN0b24wHhcNMTAwNjI1MjMwNzE2WhcNNDQwMjE1MjMwNzE2WjB8MQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEUMBIGA1UEBxMLU2FudGEgQ2xhcmExFjAUBgNVBAoTDVdoYXRzQXBwIEluYy4xFDASBgNVBAsTC0VuZ2luZWVyaW5nMRQwEgYDVQQDEwtCcmlhbiBBY3RvbjCCAbgwggEsBgcqhkjOOAQBMIIBHwKBgQD9f1OBHXUSKVLfSpwu7OTn9hG3UjzvRADDHj+AtlEmaUVdQCJR+1k9jVj6v8X1ujD2y5tVbNeBO4AdNG/yZmC3a5lQpaSfn+gEexAiwk+7qdf+t8Yb+DtX58aophUPBPuD9tPFHsMCNVQTWhaRMvZ1864rYdcq7/IiAxmd0UgBxwIVAJdgUI8VIwvMspK5gqLrhAvwWBz1AoGBAPfhoIXWmz3ey7yrXDa4V7l5lK+7+jrqgvlXTAs9B4JnUVlXjrrUWU/mcQcQgYC0SRZxI+hMKBYTt88JMozIpuE8FnqLVHyNKOCjrh4rs6Z1kW6jfwv6ITVi8ftiegEkO8yk8b6oUZCJqIPf4VrlnwaSi2ZegHtVJWQBTDv+z0kqA4GFAAKBgQDRGYtLgWh7zyRtQainJfCpiaUbzjJuhMgo4fVWZIvXHaSHBU1t5w//S0lDK2hiqkj8KpMWGywVov9eZxZy37V26dEqr/c2m5qZ0E+ynSu7sqUD7kGx/zeIcGT0H+KAVgkGNQCo5Uc0koLRWYHNtYoIvt5R3X6YZylbPftF/8ayWTALBgcqhkjOOAQDBQADLwAwLAIUAKYCp0d6z4QQdyN74JDfQ2WCyi8CFDUM4CaNB+ceVXdKtOrNTQcc0e+t"; - $classesMd5 = "zkrJMO7CuBg3gV4h3ZPrbg=="; // 2.11.471 + $classesMd5 = "2BemshOrsTglFob3C6No8w=="; // 2.11.473 $key2 = base64_decode("/UIGKU1FVQa+ATM2A0za7G2KI9S/CwPYjgAbc67v7ep42eO/WeTLx1lb1cHwxpsEgF4+PmYpLd2YpGUdX/A2JQitsHzDwgcdBpUf7psX1BU="); $data = base64_decode($signature) . base64_decode($classesMd5) . $phone; From fea70662812c475432b2aacfb3e4fd426299bbc8 Mon Sep 17 00:00:00 2001 From: mgp25 Date: Sun, 14 Dec 2014 00:41:44 +0100 Subject: [PATCH 152/436] Fixed profile image --- src/func.php | 30 ++++++++++++++++++------- src/whatsprot.class.php | 49 +++++++++++++++-------------------------- 2 files changed, 40 insertions(+), 39 deletions(-) diff --git a/src/func.php b/src/func.php index 9b2066b9..b0587809 100755 --- a/src/func.php +++ b/src/func.php @@ -75,16 +75,30 @@ function wa_pbkdf2($algorithm, $password, $salt, $count, $key_length, $raw_outpu function preprocessProfilePicture($path) { list($width, $height) = getimagesize($path); - if ($width != $height) { - throw new Exception("Profile picture needs to be square (image is $width x $height)"); - } - if ($width > 640) { - throw new Exception("Profile picture maximum size of 640 x 640 (image is $width x $height)"); + if ($width > $height) { + $y = 0; + $x = ($width - $height) / 2; + $smallestSide = $height; + } else { + $x = 0; + $y = ($height - $width) / 2; + $smallestSide = $width; } - $img = imagecreatefromjpeg($path); - unlink($path); - imagejpeg($img, $path, 50); + + $size = 639; + $image = imagecreatetruecolor($size, $size); + $img = imagecreatefromstring(file_get_contents($path)); + + imagecopyresampled($image, $img, 0, 0, $x, $y, $size, $size, $smallestSide, $smallestSide); + ob_start(); + imagejpeg($image); + $i = ob_get_contents(); + ob_end_clean(); + + imagedestroy($image); imagedestroy($img); + + return $i; } function createIcon($file) diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index 6aa4d1ab..696f90d5 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -46,8 +46,8 @@ class WhatsProt const WHATSAPP_SERVER = 's.whatsapp.net'; // The hostname used to login/send messages. const WHATSAPP_UPLOAD_HOST = 'https://mms.whatsapp.net/client/iphone/upload.php'; // The upload host. const WHATSAPP_DEVICE = 'Android'; // The device name. - const WHATSAPP_VER = '2.11.471'; // The WhatsApp version. - const WHATSAPP_USER_AGENT = 'WhatsApp/2.11.471 Android/4.3 Device/GalaxyS3'; // User agent used in request/registration code. + const WHATSAPP_VER = '2.11.473'; // The WhatsApp version. + const WHATSAPP_USER_AGENT = 'WhatsApp/2.11.473 Android/4.3 Device/GalaxyS3'; // User agent used in request/registration code. const WHATSAPP_VER_CHECKER = 'https://coderus.openrepos.net/whitesoft/whatsapp_version'; // Check WhatsApp version /** @@ -3775,35 +3775,22 @@ protected function sendRequestFileUpload($b64hash, $type, $size, $filepath, $to, */ protected function sendSetPicture($jid, $filepath) { - if(stripos($filepath, 'http')!== false && !preg_match('/\s/',$filepath)){ - $extension = end(explode(".", $filepath)); - $newImageName = rand(0, 100000); - $imagePath = static::PICTURES_FOLDER."/".$newImageName.".jpg"; - if($extension == 'jpg'){ - copy($filepath, $imagePath); - $filepath = $imagePath; - } - } - preprocessProfilePicture($filepath); - $fp = @fopen($filepath, "r"); - if ($fp) { - $data = fread($fp, filesize($filepath)); - if ($data) { - //this is where the fun starts - $picture = new ProtocolNode("picture", array("type" => "image"), null, $data); - - $hash = array(); - $nodeID = $this->createMsgId("setphoto"); - $hash["id"] = $nodeID; - $hash["to"] = $this->getJID($jid); - $hash["type"] = "set"; - $hash["xmlns"] = "w:profile:picture"; - $node = new ProtocolNode("iq", $hash, array($picture), null); - - $this->sendNode($node); - $this->waitForServer($nodeID); - } - } + $data = preprocessProfilePicture($filepath); + $preview = createIconGD($filepath, 96, true); + + $picture = new ProtocolNode("picture", array("type" => "image"), null, $data); + $preview = new ProtocolNode("picture", array("type" => "preview"), null, $preview); + + $hash = array(); + $nodeID = $this->createMsgId("setphoto"); + $hash["id"] = $nodeID; + $hash["to"] = $this->getJID($jid); + $hash["type"] = "set"; + $hash["xmlns"] = "w:profile:picture"; + $node = new ProtocolNode("iq", $hash, array($picture, $preview), null); + + $this->sendNode($node); + $this->waitForServer($nodeID); } /** * Parse the message text for emojis From 2dcc0ea8f3969d09ebb1016c1cc075b22ccaf4fb Mon Sep 17 00:00:00 2001 From: mgp25 Date: Sun, 14 Dec 2014 00:55:41 +0100 Subject: [PATCH 153/436] Added event onCodeRequestFailedTooManyGuesses --- src/events/AllEvents.php | 1 + src/whatsprot.class.php | 14 +++++++++++++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/src/events/AllEvents.php b/src/events/AllEvents.php index bb5e5e99..bad53a8f 100644 --- a/src/events/AllEvents.php +++ b/src/events/AllEvents.php @@ -46,6 +46,7 @@ public function onCodeRegisterFailed( $mynumber, $status, $reason, $retry_after public function onCodeRequest( $mynumber, $method, $length ){} public function onCodeRequestFailed( $mynumber, $method, $reason, $param ){} public function onCodeRequestFailedTooRecent( $mynumber, $method, $reason, $retry_after ){} + public function onCodeRequestFailedTooManyGuesses( $mynumber, $method, $reason, $retry_after ){} public function onConnect( $mynumber, $socket ) {} public function onConnectError( $mynumber, $socket ){} public function onCredentialsBad( $mynumber, $status, $reason ){} diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index 696f90d5..68cc3fec 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -413,7 +413,19 @@ public function codeRequest($method = 'sms', $carrier = null, $countryCode = nul )); $minutes = round($response->retry_after / 60); throw new Exception("Code already sent. Retry after $minutes minutes."); - } else { + + } else if (isset($response->reason) && $response->reason == "too_many_guesses") { + $this->eventManager()->fire("onCodeRequestFailedTooManyGuesses", + array( + $this->phoneNumber, + $method, + $response->reason, + $response->retry_after + )); + $minutes = round($response->retry_after / 60); + throw new Exception("Too many guesses. Retry after $minutes minutes."); + + } else { $this->eventManager()->fire("onCodeRequestFailed", array( $this->phoneNumber, From 402030818898be65a4e58640e9593354329099c9 Mon Sep 17 00:00:00 2001 From: mgp25 Date: Sun, 14 Dec 2014 01:07:40 +0100 Subject: [PATCH 154/436] Update codeRequest. See description MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Set the default carrier as T-Mobile5. If you carrier doesnโ€™t work, try with this one. codeRequest(โ€œsmsโ€); --- src/whatsprot.class.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index 68cc3fec..d8a6996c 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -333,7 +333,7 @@ public function codeRegister($code) * * @throws Exception */ - public function codeRequest($method = 'sms', $carrier = null, $countryCode = null, $langCode = null) + public function codeRequest($method = 'sms', $carrier = "T-Mobile5", $countryCode = null, $langCode = null) { if (!$phone = $this->dissectPhone()) { throw new Exception('The provided phone number is not valid.'); @@ -368,12 +368,12 @@ public function codeRequest($method = 'sms', $carrier = null, $countryCode = nul 'id' => $this->identity, 'lg' => $langCode, 'lc' => $countryCode, - 'mcc' => $phone['mcc'], - 'mnc' => $mnc, + 'mcc' => '000', + 'mnc' => '000', 'sim_mcc' => $phone['mcc'], 'sim_mnc' => $mnc, 'method' => $method, - //'reason' => "self-send-jailbroken", + 'reason' => urlencode("self-send-jailbroken"), 'token' => urlencode($token), 'network_radio_type' => "1" ); From 96c899a50cf34cd138dddf5ce7352074334d93a2 Mon Sep 17 00:00:00 2001 From: mgp25 Date: Sun, 14 Dec 2014 01:36:21 +0100 Subject: [PATCH 155/436] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 3dd97a7f..e05ec833 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,7 @@ And I also want to thank all the users that are collaborating with me and are ma - [Dennobaby](https://github.com/Dennobaby) - [0xTryCatch](https://github.com/0xTryCatch) -[![Gratipay](http://img.shields.io/badge/Donate-Gratipay-brightgreen.svg)](https://gratipay.com/mgp25/) [![Paypal](https://www.paypalobjects.com/es_XC/i/btn/btn_donate_SM.gif)](https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=me%40mgp25%2ecom&lc=US&item_name=WhatsAPI¤cy_code=USD&bn=PP%2dDonationsBF%3abtn_donate_SM%2egif%3aNonHosted) +[![Paypal](https://www.paypalobjects.com/es_XC/i/btn/btn_donate_SM.gif)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=KN6L7WMU7VM56) **Bitcoin:** 15NejBDahfe1eLAPSJh4iMfYLHYuKDrwJ2 From 9bf719c8b9598e89c05c4ccbf9f8a192af66fa12 Mon Sep 17 00:00:00 2001 From: mgp25 Date: Mon, 15 Dec 2014 01:00:33 +0100 Subject: [PATCH 156/436] Update disconnect function --- src/whatsprot.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index d8a6996c..e8092056 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -530,7 +530,7 @@ public function isConnected() public function disconnect() { if (is_resource($this->socket)) { - fclose($this->socket); + socket_close($this->socket); $this->socket = null; $this->eventManager()->fire("onDisconnect", array( From 027b06a7a53140ffe3f466dcb5ed2c08db5924af Mon Sep 17 00:00:00 2001 From: Koen Hendriks Date: Mon, 15 Dec 2014 23:48:13 +0100 Subject: [PATCH 157/436] Check if we can get children before iterating Fixes #215 --- src/whatsprot.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index e8092056..3ec59de7 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -2912,7 +2912,7 @@ protected function processInboundDataNode(ProtocolNode $node, $autoReceipt = tru //There are multiple types of Group reponses. Also a valid group response can have NO children. //Events fired depend on text in the ID field. $groupList = array(); - if ($node->getChild(0) != null) { + if ($node->getChild(0) != null && $node->getChild(0)->getChildren() != null) { foreach ($node->getChild(0)->getChildren() as $child) { $groupList[] = $child->getAttributes(); } From 13468cbf42f3ce0febe009ddb28c27759f0a3c8a Mon Sep 17 00:00:00 2001 From: mgp25 Date: Mon, 5 Jan 2015 09:23:17 +0100 Subject: [PATCH 158/436] Update registration token --- src/token.php | 2 +- src/whatsprot.class.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/token.php b/src/token.php index 7ef1bbce..137dd8d0 100755 --- a/src/token.php +++ b/src/token.php @@ -4,7 +4,7 @@ function generateRequestToken($country, $phone) { $signature = "MIIDMjCCAvCgAwIBAgIETCU2pDALBgcqhkjOOAQDBQAwfDELMAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFDASBgNVBAcTC1NhbnRhIENsYXJhMRYwFAYDVQQKEw1XaGF0c0FwcCBJbmMuMRQwEgYDVQQLEwtFbmdpbmVlcmluZzEUMBIGA1UEAxMLQnJpYW4gQWN0b24wHhcNMTAwNjI1MjMwNzE2WhcNNDQwMjE1MjMwNzE2WjB8MQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEUMBIGA1UEBxMLU2FudGEgQ2xhcmExFjAUBgNVBAoTDVdoYXRzQXBwIEluYy4xFDASBgNVBAsTC0VuZ2luZWVyaW5nMRQwEgYDVQQDEwtCcmlhbiBBY3RvbjCCAbgwggEsBgcqhkjOOAQBMIIBHwKBgQD9f1OBHXUSKVLfSpwu7OTn9hG3UjzvRADDHj+AtlEmaUVdQCJR+1k9jVj6v8X1ujD2y5tVbNeBO4AdNG/yZmC3a5lQpaSfn+gEexAiwk+7qdf+t8Yb+DtX58aophUPBPuD9tPFHsMCNVQTWhaRMvZ1864rYdcq7/IiAxmd0UgBxwIVAJdgUI8VIwvMspK5gqLrhAvwWBz1AoGBAPfhoIXWmz3ey7yrXDa4V7l5lK+7+jrqgvlXTAs9B4JnUVlXjrrUWU/mcQcQgYC0SRZxI+hMKBYTt88JMozIpuE8FnqLVHyNKOCjrh4rs6Z1kW6jfwv6ITVi8ftiegEkO8yk8b6oUZCJqIPf4VrlnwaSi2ZegHtVJWQBTDv+z0kqA4GFAAKBgQDRGYtLgWh7zyRtQainJfCpiaUbzjJuhMgo4fVWZIvXHaSHBU1t5w//S0lDK2hiqkj8KpMWGywVov9eZxZy37V26dEqr/c2m5qZ0E+ynSu7sqUD7kGx/zeIcGT0H+KAVgkGNQCo5Uc0koLRWYHNtYoIvt5R3X6YZylbPftF/8ayWTALBgcqhkjOOAQDBQADLwAwLAIUAKYCp0d6z4QQdyN74JDfQ2WCyi8CFDUM4CaNB+ceVXdKtOrNTQcc0e+t"; - $classesMd5 = "2BemshOrsTglFob3C6No8w=="; // 2.11.473 + $classesMd5 = "ZXEimx8U9X1WZwQmVJRnGA=="; // 2.11.481 $key2 = base64_decode("/UIGKU1FVQa+ATM2A0za7G2KI9S/CwPYjgAbc67v7ep42eO/WeTLx1lb1cHwxpsEgF4+PmYpLd2YpGUdX/A2JQitsHzDwgcdBpUf7psX1BU="); $data = base64_decode($signature) . base64_decode($classesMd5) . $phone; diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index 3ec59de7..892af9c0 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -46,8 +46,8 @@ class WhatsProt const WHATSAPP_SERVER = 's.whatsapp.net'; // The hostname used to login/send messages. const WHATSAPP_UPLOAD_HOST = 'https://mms.whatsapp.net/client/iphone/upload.php'; // The upload host. const WHATSAPP_DEVICE = 'Android'; // The device name. - const WHATSAPP_VER = '2.11.473'; // The WhatsApp version. - const WHATSAPP_USER_AGENT = 'WhatsApp/2.11.473 Android/4.3 Device/GalaxyS3'; // User agent used in request/registration code. + const WHATSAPP_VER = '2.11.481'; // The WhatsApp version. + const WHATSAPP_USER_AGENT = 'WhatsApp/2.11.481 Android/4.3 Device/GalaxyS3'; // User agent used in request/registration code. const WHATSAPP_VER_CHECKER = 'https://coderus.openrepos.net/whitesoft/whatsapp_version'; // Check WhatsApp version /** From 325e871274ca0e569891a5e00ace747821948e6e Mon Sep 17 00:00:00 2001 From: mgp25 Date: Wed, 7 Jan 2015 20:19:09 +0100 Subject: [PATCH 159/436] Fix 20 bytes identity --- src/whatsprot.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index 892af9c0..62c79641 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -2286,7 +2286,7 @@ protected function buildIdentity($identity) else { $id = fopen($identity.".dat", "w"); - $bytes = "%".implode("%", str_split(strtolower(bin2hex(openssl_random_pseudo_bytes(16))), 2)); + $bytes = "%".implode("%", str_split(strtolower(bin2hex(openssl_random_pseudo_bytes(20))), 2)); fwrite($id, $bytes); fclose($id); From 4fc6990970e85dd46c7e4e12bf595f3729c60c90 Mon Sep 17 00:00:00 2001 From: mgp25 Date: Wed, 7 Jan 2015 20:20:45 +0100 Subject: [PATCH 160/436] Better way to build url --- src/whatsprot.class.php | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index 62c79641..c2c8ecd2 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -2448,11 +2448,7 @@ protected function getMediaFile($filepath, $maxsizebytes = 1048576) protected function getResponse($host, $query) { // Build the url. - $url = $host . '?'; - foreach ($query as $key => $value) { - $url .= $key . '=' . $value . '&'; - } - $url = rtrim($url, '&'); + $url = $host . '?' . http_build_query($query); // Open connection. $ch = curl_init(); From a4094a68f4edc4dc7301c4e9cca83398b77a16ad Mon Sep 17 00:00:00 2001 From: mgp25 Date: Wed, 7 Jan 2015 20:21:41 +0100 Subject: [PATCH 161/436] Updated codeRequest Removed urlencode() --- src/whatsprot.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index c2c8ecd2..dc5f9f9c 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -373,8 +373,8 @@ public function codeRequest($method = 'sms', $carrier = "T-Mobile5", $countryCod 'sim_mcc' => $phone['mcc'], 'sim_mnc' => $mnc, 'method' => $method, - 'reason' => urlencode("self-send-jailbroken"), - 'token' => urlencode($token), + 'reason' => "self-send-jailbroken", + 'token' => $token, 'network_radio_type' => "1" ); From 6487828ffe4958676c238d6ff7605be36c2fb0e9 Mon Sep 17 00:00:00 2001 From: mgp25 Date: Wed, 7 Jan 2015 20:58:29 +0100 Subject: [PATCH 162/436] Improving identity generation Has backwards compatibility. --- src/whatsprot.class.php | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index dc5f9f9c..b5597996 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -103,7 +103,7 @@ public function __construct($number, $identity, $nickname, $debug = false) $this->identity = $this->buildIdentity($identity); } else { //use provided identity hash - $this->identity = file_get_contents($identity.'.dat'); + $this->identity = urldecode(file_get_contents($identity.'.dat')); } $this->name = $nickname; $this->loginStatus = static::DISCONNECTED_STATUS; @@ -2281,13 +2281,13 @@ protected function buildIdentity($identity) { if (file_exists($identity.".dat")) { - return file_get_contents($identity.'.dat'); + return urldecode(file_get_contents($identity.'.dat')); } else { $id = fopen($identity.".dat", "w"); - $bytes = "%".implode("%", str_split(strtolower(bin2hex(openssl_random_pseudo_bytes(20))), 2)); - fwrite($id, $bytes); + $bytes = openssl_random_pseudo_bytes(20); + fwrite($id, strtolower(urlencode($bytes))); fclose($id); return $bytes; @@ -2297,8 +2297,12 @@ protected function buildIdentity($identity) protected function checkIdentity($identity) { if (file_exists($identity.".dat")) - { - return (strlen(file_get_contents($identity.'.dat')) == 48); + { + $id = urldecode(file_get_contents($identity.'.dat')); + if (($id == 20) || ($id == 16)) + { + return true; + } } else { From 3996d75239df2a47d3168e60de064970f466b6a8 Mon Sep 17 00:00:00 2001 From: mgp25 Date: Wed, 7 Jan 2015 21:13:36 +0100 Subject: [PATCH 163/436] sendGetStatuses fix MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Attrib โ€™tโ€™ no longer required. --- src/whatsprot.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index b5597996..fbda3529 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -1234,7 +1234,7 @@ public function sendGetStatuses($jids) $children = array(); foreach($jids as $jid) { - $children[] = new ProtocolNode("user", array("jid" => $this->getJID($jid), "t" => time()), null, null); + $children[] = new ProtocolNode("user", array("jid" => $this->getJID($jid)), null, null); } $node = new ProtocolNode("iq", array( "to" => "s.whatsapp.net", From 2a8aa676bd836f57f3a9cc76e975f9bdab536837 Mon Sep 17 00:00:00 2001 From: mgp25 Date: Sun, 11 Jan 2015 23:30:16 +0100 Subject: [PATCH 164/436] Fixed sendBroadcastMessage --- src/whatsprot.class.php | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index fbda3529..75e7cbd9 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -46,8 +46,8 @@ class WhatsProt const WHATSAPP_SERVER = 's.whatsapp.net'; // The hostname used to login/send messages. const WHATSAPP_UPLOAD_HOST = 'https://mms.whatsapp.net/client/iphone/upload.php'; // The upload host. const WHATSAPP_DEVICE = 'Android'; // The device name. - const WHATSAPP_VER = '2.11.481'; // The WhatsApp version. - const WHATSAPP_USER_AGENT = 'WhatsApp/2.11.481 Android/4.3 Device/GalaxyS3'; // User agent used in request/registration code. + const WHATSAPP_VER = '2.11.489'; // The WhatsApp version. + const WHATSAPP_USER_AGENT = 'WhatsApp/2.11.489 Android/4.3 Device/GalaxyS3'; // User agent used in request/registration code. const WHATSAPP_VER_CHECKER = 'https://coderus.openrepos.net/whitesoft/whatsapp_version'; // Check WhatsApp version /** @@ -3573,11 +3573,6 @@ protected function sendBroadcast($targets, $node, $type) $targets = array($targets); } - $serverNode = new ProtocolNode("server", null, null, ""); - $xHash = array(); - $xHash["xmlns"] = "jabber:x:event"; - $xNode = new ProtocolNode("x", $xHash, array($serverNode), ""); - $toNodes = array(); foreach ($targets as $target) { $jid = $this->getJID($target); @@ -3594,7 +3589,7 @@ protected function sendBroadcast($targets, $node, $type) $id = $this->createMsgId("broadcast"); $messageHash["id"] = $id; - $messageNode = new ProtocolNode("message", $messageHash, array($broadcastNode, $xNode, $node), null); + $messageNode = new ProtocolNode("message", $messageHash, array($node, $broadcastNode), null); $this->sendNode($messageNode); //listen for response $this->eventManager()->fire("onSendMessage", From 4524257a02bc48e4daa74214e48e81948d045529 Mon Sep 17 00:00:00 2001 From: mgp25 Date: Sun, 11 Jan 2015 23:30:32 +0100 Subject: [PATCH 165/436] Token updated to 2.11.489 --- src/token.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/token.php b/src/token.php index 137dd8d0..5d51a3d0 100755 --- a/src/token.php +++ b/src/token.php @@ -4,7 +4,7 @@ function generateRequestToken($country, $phone) { $signature = "MIIDMjCCAvCgAwIBAgIETCU2pDALBgcqhkjOOAQDBQAwfDELMAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFDASBgNVBAcTC1NhbnRhIENsYXJhMRYwFAYDVQQKEw1XaGF0c0FwcCBJbmMuMRQwEgYDVQQLEwtFbmdpbmVlcmluZzEUMBIGA1UEAxMLQnJpYW4gQWN0b24wHhcNMTAwNjI1MjMwNzE2WhcNNDQwMjE1MjMwNzE2WjB8MQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEUMBIGA1UEBxMLU2FudGEgQ2xhcmExFjAUBgNVBAoTDVdoYXRzQXBwIEluYy4xFDASBgNVBAsTC0VuZ2luZWVyaW5nMRQwEgYDVQQDEwtCcmlhbiBBY3RvbjCCAbgwggEsBgcqhkjOOAQBMIIBHwKBgQD9f1OBHXUSKVLfSpwu7OTn9hG3UjzvRADDHj+AtlEmaUVdQCJR+1k9jVj6v8X1ujD2y5tVbNeBO4AdNG/yZmC3a5lQpaSfn+gEexAiwk+7qdf+t8Yb+DtX58aophUPBPuD9tPFHsMCNVQTWhaRMvZ1864rYdcq7/IiAxmd0UgBxwIVAJdgUI8VIwvMspK5gqLrhAvwWBz1AoGBAPfhoIXWmz3ey7yrXDa4V7l5lK+7+jrqgvlXTAs9B4JnUVlXjrrUWU/mcQcQgYC0SRZxI+hMKBYTt88JMozIpuE8FnqLVHyNKOCjrh4rs6Z1kW6jfwv6ITVi8ftiegEkO8yk8b6oUZCJqIPf4VrlnwaSi2ZegHtVJWQBTDv+z0kqA4GFAAKBgQDRGYtLgWh7zyRtQainJfCpiaUbzjJuhMgo4fVWZIvXHaSHBU1t5w//S0lDK2hiqkj8KpMWGywVov9eZxZy37V26dEqr/c2m5qZ0E+ynSu7sqUD7kGx/zeIcGT0H+KAVgkGNQCo5Uc0koLRWYHNtYoIvt5R3X6YZylbPftF/8ayWTALBgcqhkjOOAQDBQADLwAwLAIUAKYCp0d6z4QQdyN74JDfQ2WCyi8CFDUM4CaNB+ceVXdKtOrNTQcc0e+t"; - $classesMd5 = "ZXEimx8U9X1WZwQmVJRnGA=="; // 2.11.481 + $classesMd5 = "R7MxKWjKZns6728qXwgRRQ=="; // 2.11.489 $key2 = base64_decode("/UIGKU1FVQa+ATM2A0za7G2KI9S/CwPYjgAbc67v7ep42eO/WeTLx1lb1cHwxpsEgF4+PmYpLd2YpGUdX/A2JQitsHzDwgcdBpUf7psX1BU="); $data = base64_decode($signature) . base64_decode($classesMd5) . $phone; From 740d3ac71e6b8d981d6f028e238f6028bcf724de Mon Sep 17 00:00:00 2001 From: mgp25 Date: Sun, 11 Jan 2015 23:47:56 +0100 Subject: [PATCH 166/436] added from attrib in onGetError event --- src/WhatsAppEvent.php | 5 +++-- src/events/AllEvents.php | 2 +- src/whatsprot.class.php | 1 + 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/WhatsAppEvent.php b/src/WhatsAppEvent.php index dab4ee63..f0a524c9 100755 --- a/src/WhatsAppEvent.php +++ b/src/WhatsAppEvent.php @@ -280,11 +280,12 @@ function fireGetAudio( function fireGetError( $phone, + $from, $id, $error ) { - $callbackEvent = function(WhatsAppEventListener $listener) use ($phone, $id, $error) { - $listener->onGetError($phone, $id, $error); + $callbackEvent = function(WhatsAppEventListener $listener) use ($phone, $from, $id, $error) { + $listener->onGetError($phone, $from, $id, $error); }; $this->fireCallback($callbackEvent); } diff --git a/src/events/AllEvents.php b/src/events/AllEvents.php index bad53a8f..6907c6d1 100644 --- a/src/events/AllEvents.php +++ b/src/events/AllEvents.php @@ -56,7 +56,7 @@ public function onDissectPhone( $mynumber, $phonecountry, $phonecc, $phone, $pho public function onDissectPhoneFailed( $mynumber ){} public function onGetAudio( $mynumber, $from, $id, $type, $time, $name, $size, $url, $file, $mimeType, $fileHash, $duration, $acodec ){} public function onGetBroadcastLists( $mynumber, $broadcastLists ){} - public function onGetError( $mynumber, $id, $data ){} + public function onGetError( $mynumber, $from, $id, $data ){} public function onGetExtendAccount( $mynumber, $kind, $status, $creation, $expiration ){} public function onGetFeature( $mynumber, $from, $encrypt ){} public function onGetGroupMessage( $mynumber, $from_group_jid, $from_user_jid, $id, $type, $time, $name, $body ){} diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index 75e7cbd9..8e784bb0 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -3056,6 +3056,7 @@ protected function processInboundDataNode(ProtocolNode $node, $autoReceipt = tru $this->eventManager()->fire("onGetError", array( $this->phoneNumber, + $node->getAttribute('from'), $node->getAttribute('id'), $node->getChild(0) )); From 8c58303d27593da00cea5c02c7456bc9814e361f Mon Sep 17 00:00:00 2001 From: mgp25 Date: Mon, 12 Jan 2015 20:58:55 +0100 Subject: [PATCH 167/436] Update README.md --- README.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/README.md b/README.md index e05ec833..73798ef1 100644 --- a/README.md +++ b/README.md @@ -14,11 +14,9 @@ I would like to thank all those who have made this project goes forward. First I And I also want to thank all the users that are collaborating with me and are making such good work: -- [pastoso](https://github.com/pastoso) - [CODeRUS](https://github.com/CODeRUS) -- [GitsUp](https://github.com/GitsUp) +- [tgalal](https://github.com/tgalal) - [SikiFn](https://github.com/SikiFn) -- [Dennobaby](https://github.com/Dennobaby) - [0xTryCatch](https://github.com/0xTryCatch) [![Paypal](https://www.paypalobjects.com/es_XC/i/btn/btn_donate_SM.gif)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=KN6L7WMU7VM56) From 15749a3d4ac27963cc6687f34ddc5ad1505d9dab Mon Sep 17 00:00:00 2001 From: mgp25 Date: Tue, 13 Jan 2015 17:25:07 +0100 Subject: [PATCH 168/436] Update registration token --- src/token.php | 28 ++++++++++++++++------------ src/whatsprot.class.php | 20 ++++++++++---------- 2 files changed, 26 insertions(+), 22 deletions(-) diff --git a/src/token.php b/src/token.php index 5d51a3d0..4690b955 100755 --- a/src/token.php +++ b/src/token.php @@ -3,20 +3,24 @@ function generateRequestToken($country, $phone) { - $signature = "MIIDMjCCAvCgAwIBAgIETCU2pDALBgcqhkjOOAQDBQAwfDELMAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFDASBgNVBAcTC1NhbnRhIENsYXJhMRYwFAYDVQQKEw1XaGF0c0FwcCBJbmMuMRQwEgYDVQQLEwtFbmdpbmVlcmluZzEUMBIGA1UEAxMLQnJpYW4gQWN0b24wHhcNMTAwNjI1MjMwNzE2WhcNNDQwMjE1MjMwNzE2WjB8MQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEUMBIGA1UEBxMLU2FudGEgQ2xhcmExFjAUBgNVBAoTDVdoYXRzQXBwIEluYy4xFDASBgNVBAsTC0VuZ2luZWVyaW5nMRQwEgYDVQQDEwtCcmlhbiBBY3RvbjCCAbgwggEsBgcqhkjOOAQBMIIBHwKBgQD9f1OBHXUSKVLfSpwu7OTn9hG3UjzvRADDHj+AtlEmaUVdQCJR+1k9jVj6v8X1ujD2y5tVbNeBO4AdNG/yZmC3a5lQpaSfn+gEexAiwk+7qdf+t8Yb+DtX58aophUPBPuD9tPFHsMCNVQTWhaRMvZ1864rYdcq7/IiAxmd0UgBxwIVAJdgUI8VIwvMspK5gqLrhAvwWBz1AoGBAPfhoIXWmz3ey7yrXDa4V7l5lK+7+jrqgvlXTAs9B4JnUVlXjrrUWU/mcQcQgYC0SRZxI+hMKBYTt88JMozIpuE8FnqLVHyNKOCjrh4rs6Z1kW6jfwv6ITVi8ftiegEkO8yk8b6oUZCJqIPf4VrlnwaSi2ZegHtVJWQBTDv+z0kqA4GFAAKBgQDRGYtLgWh7zyRtQainJfCpiaUbzjJuhMgo4fVWZIvXHaSHBU1t5w//S0lDK2hiqkj8KpMWGywVov9eZxZy37V26dEqr/c2m5qZ0E+ynSu7sqUD7kGx/zeIcGT0H+KAVgkGNQCo5Uc0koLRWYHNtYoIvt5R3X6YZylbPftF/8ayWTALBgcqhkjOOAQDBQADLwAwLAIUAKYCp0d6z4QQdyN74JDfQ2WCyi8CFDUM4CaNB+ceVXdKtOrNTQcc0e+t"; - $classesMd5 = "R7MxKWjKZns6728qXwgRRQ=="; // 2.11.489 + // $signature = "MIIDMjCCAvCgAwIBAgIETCU2pDALBgcqhkjOOAQDBQAwfDELMAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFDASBgNVBAcTC1NhbnRhIENsYXJhMRYwFAYDVQQKEw1XaGF0c0FwcCBJbmMuMRQwEgYDVQQLEwtFbmdpbmVlcmluZzEUMBIGA1UEAxMLQnJpYW4gQWN0b24wHhcNMTAwNjI1MjMwNzE2WhcNNDQwMjE1MjMwNzE2WjB8MQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEUMBIGA1UEBxMLU2FudGEgQ2xhcmExFjAUBgNVBAoTDVdoYXRzQXBwIEluYy4xFDASBgNVBAsTC0VuZ2luZWVyaW5nMRQwEgYDVQQDEwtCcmlhbiBBY3RvbjCCAbgwggEsBgcqhkjOOAQBMIIBHwKBgQD9f1OBHXUSKVLfSpwu7OTn9hG3UjzvRADDHj+AtlEmaUVdQCJR+1k9jVj6v8X1ujD2y5tVbNeBO4AdNG/yZmC3a5lQpaSfn+gEexAiwk+7qdf+t8Yb+DtX58aophUPBPuD9tPFHsMCNVQTWhaRMvZ1864rYdcq7/IiAxmd0UgBxwIVAJdgUI8VIwvMspK5gqLrhAvwWBz1AoGBAPfhoIXWmz3ey7yrXDa4V7l5lK+7+jrqgvlXTAs9B4JnUVlXjrrUWU/mcQcQgYC0SRZxI+hMKBYTt88JMozIpuE8FnqLVHyNKOCjrh4rs6Z1kW6jfwv6ITVi8ftiegEkO8yk8b6oUZCJqIPf4VrlnwaSi2ZegHtVJWQBTDv+z0kqA4GFAAKBgQDRGYtLgWh7zyRtQainJfCpiaUbzjJuhMgo4fVWZIvXHaSHBU1t5w//S0lDK2hiqkj8KpMWGywVov9eZxZy37V26dEqr/c2m5qZ0E+ynSu7sqUD7kGx/zeIcGT0H+KAVgkGNQCo5Uc0koLRWYHNtYoIvt5R3X6YZylbPftF/8ayWTALBgcqhkjOOAQDBQADLwAwLAIUAKYCp0d6z4QQdyN74JDfQ2WCyi8CFDUM4CaNB+ceVXdKtOrNTQcc0e+t"; + // $classesMd5 = "R7MxKWjKZns6728qXwgRRQ=="; // 2.11.489 - $key2 = base64_decode("/UIGKU1FVQa+ATM2A0za7G2KI9S/CwPYjgAbc67v7ep42eO/WeTLx1lb1cHwxpsEgF4+PmYpLd2YpGUdX/A2JQitsHzDwgcdBpUf7psX1BU="); - $data = base64_decode($signature) . base64_decode($classesMd5) . $phone; + // $key2 = base64_decode("/UIGKU1FVQa+ATM2A0za7G2KI9S/CwPYjgAbc67v7ep42eO/WeTLx1lb1cHwxpsEgF4+PmYpLd2YpGUdX/A2JQitsHzDwgcdBpUf7psX1BU="); + // $data = base64_decode($signature) . base64_decode($classesMd5) . $phone; - $opad = str_repeat(chr(0x5C), 64); - $ipad = str_repeat(chr(0x36), 64); - for ($i = 0; $i < 64; $i++) { - $opad[$i] = $opad[$i] ^ $key2[$i]; - $ipad[$i] = $ipad[$i] ^ $key2[$i]; - } + // $opad = str_repeat(chr(0x5C), 64); + // $ipad = str_repeat(chr(0x36), 64); + // for ($i = 0; $i < 64; $i++) { + // $opad[$i] = $opad[$i] ^ $key2[$i]; + // $ipad[$i] = $ipad[$i] ^ $key2[$i]; + // } - $output = hash("sha1", $opad . hash("sha1", $ipad . $data, true), true); + // $output = hash("sha1", $opad . hash("sha1", $ipad . $data, true), true); - return base64_encode($output); + // return base64_encode($output); + + $token = md5("PdA2DJyKoUrwLw1Bg6EIhzh502dF9noR9uFCllGk1418865329241".$phone); + + return $token; } diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index 8e784bb0..d9dcc01c 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -47,7 +47,7 @@ class WhatsProt const WHATSAPP_UPLOAD_HOST = 'https://mms.whatsapp.net/client/iphone/upload.php'; // The upload host. const WHATSAPP_DEVICE = 'Android'; // The device name. const WHATSAPP_VER = '2.11.489'; // The WhatsApp version. - const WHATSAPP_USER_AGENT = 'WhatsApp/2.11.489 Android/4.3 Device/GalaxyS3'; // User agent used in request/registration code. + const WHATSAPP_USER_AGENT = 'WhatsApp/2.12.60 S40Version/14.26 Device/Nokia302'; // User agent used in request/registration code. const WHATSAPP_VER_CHECKER = 'https://coderus.openrepos.net/whitesoft/whatsapp_version'; // Check WhatsApp version /** @@ -463,18 +463,18 @@ public function connect() return true; } - $WAver = trim(file_get_contents(static::WHATSAPP_VER_CHECKER)); + // $WAver = trim(file_get_contents(static::WHATSAPP_VER_CHECKER)); - $WAverS = str_replace(".","",$WAver); - $ver = str_replace(".","",static::WHATSAPP_VER); + // $WAverS = str_replace(".","",$WAver); + // $ver = str_replace(".","",static::WHATSAPP_VER); - if($ver<$WAverS) - { - $classesMD5 = file_get_contents('https://coderus.openrepos.net/whitesoft/whatsapp_classes'); + // if($ver<$WAverS) + // { + // $classesMD5 = file_get_contents('https://coderus.openrepos.net/whitesoft/whatsapp_classes'); - updateData('token.php', $WAver, $classesMD5); - updateData('whatsprot.class.php', $WAver); - } + // updateData('token.php', $WAver, $classesMD5); + // updateData('whatsprot.class.php', $WAver); + // } /* Create a TCP/IP socket. */ $socket = socket_create(AF_INET, SOCK_STREAM, SOL_TCP); From e38c8e38dd75bf99b02ed37a2941dedf162ea938 Mon Sep 17 00:00:00 2001 From: mgp25 Date: Thu, 15 Jan 2015 16:04:21 +0100 Subject: [PATCH 169/436] sendMessageLocation updated --- src/whatsprot.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index d9dcc01c..cee75d77 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -1594,8 +1594,8 @@ public function sendMessageImage($to, $filepath, $storeURLmedia = false, $fsize public function sendMessageLocation($to, $long, $lat, $name = null, $url = null) { $mediaHash = array(); - $mediaHash['xmlns'] = "urn:xmpp:whatsapp:mms"; $mediaHash['type'] = "location"; + $mediaHash['encoding'] = "raw"; $mediaHash['latitude'] = $lat; $mediaHash['longitude'] = $long; $mediaHash['name'] = $name; From b48e0331edac6676ef3f6fbd0960952c83c74211 Mon Sep 17 00:00:00 2001 From: mgp25 Date: Thu, 15 Jan 2015 23:19:59 +0100 Subject: [PATCH 170/436] sendChangeNumber added Now you can transfer your number to a new number. All groups, conversations will be migrated too. --- src/whatsprot.class.php | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index cee75d77..0e62df97 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -857,6 +857,31 @@ public function sendGetClientConfig() $this->waitForServer($msgId); } + /** + * Transfer your number to new one + * + * @param string $number + * @param string $identity + */ + public function sendChangeNumber($number, $identity) + { + $msgId = $this->createMsgId("change_number"); + + $usernameNode = new ProtocolNode("username", null, null, $number); + $passwordNode = new ProtocolNode("password", null, null, urldecode($identity)); + + $modifyNode = new ProtocolNode("modify",null, array($usernameNode, $passwordNode) null); + + $iqNode = new ProtocolNode("iq", array( + "xmlns" => "urn:xmpp:whatsapp:account", + "id" => $msgId, + "type" => "get", + "to" => "c.us" + ), array($modifyNode), null); + + $this->sendNode($iqNode); + } + /** * Send a request to return a list of groups user is currently participating * in. From ba56f2f0084e0e46f2796fd6061bbf634ceba3a2 Mon Sep 17 00:00:00 2001 From: mgp25 Date: Fri, 16 Jan 2015 00:36:55 +0100 Subject: [PATCH 171/436] sendChangeNumber update --- src/whatsprot.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index 0e62df97..0ab372cc 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -870,7 +870,7 @@ public function sendChangeNumber($number, $identity) $usernameNode = new ProtocolNode("username", null, null, $number); $passwordNode = new ProtocolNode("password", null, null, urldecode($identity)); - $modifyNode = new ProtocolNode("modify",null, array($usernameNode, $passwordNode) null); + $modifyNode = new ProtocolNode("modify", null, array($usernameNode, $passwordNode), null); $iqNode = new ProtocolNode("iq", array( "xmlns" => "urn:xmpp:whatsapp:account", From 6e887eece069997fa67e651c66a4b4049f65bec0 Mon Sep 17 00:00:00 2001 From: mgp25 Date: Sat, 17 Jan 2015 00:58:17 +0100 Subject: [PATCH 172/436] sendGetProfilePhotoIds added --- src/whatsprot.class.php | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index 0ab372cc..341c1840 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -1040,6 +1040,38 @@ public function sendGetProfilePicture($number, $large = false) $this->sendNode($node); $this->waitForServer($hash["id"]); } + + /** + * + * @param string array $numbers + * Numbers of your contacts + */ + public function sendGetProfilePhotoIds($numbers) + { + + if(!is_array($numbers)) + { + $numbers = array($numbers); + } + + $msgId = $this->createMsgId("get_picture_ids"); + + $i = 0; + for($i; $i $this->getJID($numbers[$i])), null, $null); + } + + $listNode = new ProtocolNode("list", null, $userNode, null); + + $iqNode = new ProtocolNode("iq", array( + "id" => $msgId, + "xmlns" => "w:profile:picture", + "type" => "get" + ), array($listNode), null); + + $this->sendNode($iqNode); + } /** * Request to retrieve the last online time of specific user. From 8bcf1487f1d7d6ad3fe17110d86fe0d806dbc704 Mon Sep 17 00:00:00 2001 From: mgp25 Date: Mon, 19 Jan 2015 00:48:20 +0100 Subject: [PATCH 173/436] sendSync updated --- src/whatsprot.class.php | 66 ++++++++++++++++++++++++++++++++++++----- 1 file changed, 59 insertions(+), 7 deletions(-) diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index 341c1840..f926cd3d 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -1040,7 +1040,7 @@ public function sendGetProfilePicture($number, $large = false) $this->sendNode($node); $this->waitForServer($hash["id"]); } - + /** * * @param string array $numbers @@ -2367,20 +2367,72 @@ protected function checkIdentity($identity) } } - public function sendSync(array $numbers, $mode = "full", $context = "registration", $index = 0, $last = true) + public function sendSync(array $numbers, array $deletedNumbers = null, $syncType = 4, $index = 0, $last = true) { $users = array(); - foreach ($numbers as $number) { // number must start with '+' if international contact - $users[] = new ProtocolNode("user", null, null, (substr($number, 0, 1) != '+')?('+' . $number):($number)); + $i = 0; + for ($i; $i $this->getJID($deletedNumbers[$j]), "type" => "delete"), null, null); + $i++; + } + } + + switch($syncType) + { + case 0: + $mode = "full"; + $context = "registration"; + break; + case 1: + $mode = "full"; + $context = "interactive"; + break; + case 2: + $mode = "full"; + $context = "background"; + break; + case 3: + $mode = "delta"; + $context = "interactive"; + break; + case 4: + $mode = "delta"; + $context = "background"; + break; + case 5: + $mode = "query"; + $context = "interactive"; + break; + case 6: + $mode = "chunked"; + $context = "registration"; + break; + case 7: + $mode = "chunked"; + $context = "interactive"; + break; + case 8: + $mode = "chunked"; + $context = "background"; + break; + default: + $mode = "delta"; + $context = "background"; } $id = $this->createMsgId("sendsync_"); $node = new ProtocolNode("iq", array( - "to" => $this->getJID($this->phoneNumber), - "type" => "get", "id" => $id, - "xmlns" => "urn:xmpp:whatsapp:sync" + "xmlns" => "urn:xmpp:whatsapp:sync", + "type" => "get" ), array( new ProtocolNode("sync", array( "mode" => $mode, From b1a1e288348477aaaf01916745e86494c1c43043 Mon Sep 17 00:00:00 2001 From: vaziuok Date: Mon, 19 Jan 2015 14:32:59 +0100 Subject: [PATCH 174/436] Fixed typo --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 73798ef1..51e844a1 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ Interface to WhatsApp Messenger -**Read the [wiki](https://github.com/mgp25/WhatsAPI-Official/wiki)** and previous issues before opeining a new one! Maybe your issue is already answered. +**Read the [wiki](https://github.com/mgp25/WhatsAPI-Official/wiki)** and previous issues before opening a new one! Maybe your issue is already answered. **[WhatsApp incoming updates log](https://github.com/mgp25/WhatsAPI-Official/wiki/WhatsApp-incoming-updates)** From a69ad8d1834c30bd41ca2cc373771cf044584b56 Mon Sep 17 00:00:00 2001 From: mgp25 Date: Tue, 20 Jan 2015 00:11:35 +0100 Subject: [PATCH 175/436] checkIdentity fix Thanks @ivanbaldo for noticing the bug --- src/whatsprot.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index f926cd3d..7c68064b 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -2356,7 +2356,7 @@ protected function checkIdentity($identity) if (file_exists($identity.".dat")) { $id = urldecode(file_get_contents($identity.'.dat')); - if (($id == 20) || ($id == 16)) + if ((strlen($id) == 20) || (strlen($id) == 16)) { return true; } From cd9d1b4b56ffa7e1e01cdb8db48b6967796accbc Mon Sep 17 00:00:00 2001 From: mgp25 Date: Tue, 20 Jan 2015 00:35:42 +0100 Subject: [PATCH 176/436] checkIdentity fix Thanks for @ivanbaldo for noticing the bug --- src/whatsprot.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index 7c68064b..c0f486db 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -2355,8 +2355,8 @@ protected function checkIdentity($identity) { if (file_exists($identity.".dat")) { - $id = urldecode(file_get_contents($identity.'.dat')); - if ((strlen($id) == 20) || (strlen($id) == 16)) + $id = strlen(urldecode(file_get_contents($identity.'.dat'))); + if (($id == 20) || ($id == 16)) { return true; } From aa43d75d66f7db531f37d545883b2293641d7845 Mon Sep 17 00:00:00 2001 From: mgp25 Date: Wed, 21 Jan 2015 01:25:39 +0100 Subject: [PATCH 177/436] sendClientConfig update --- src/whatsprot.class.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index c0f486db..8f43aade 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -835,9 +835,8 @@ public function sendClientConfig() $phone = $this->dissectPhone(); $attr = array(); - $attr["platform"] = "none"; - $attr["lc"] = $phone["ISO3166"]; - $attr["lg"] = $phone["ISO639"]; + $attr["platform"] = static::WHATSAPP_DEVICE; + $attr["version"] = static::WHATSAPP_VER; $child = new ProtocolNode("config", $attr, null, ""); $node = new ProtocolNode("iq", array("id" => $this->createMsgId("config"), "type" => "set", "xmlns" => "urn:xmpp:whatsapp:push", "to" => static::WHATSAPP_SERVER), array($child), null); $this->sendNode($node); From 12e9dc91671d023835a37afa269f3a9763162e05 Mon Sep 17 00:00:00 2001 From: mgp25 Date: Wed, 21 Jan 2015 01:30:13 +0100 Subject: [PATCH 178/436] Auto update Android version --- src/whatsprot.class.php | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index 8f43aade..93d4e10c 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -463,18 +463,18 @@ public function connect() return true; } - // $WAver = trim(file_get_contents(static::WHATSAPP_VER_CHECKER)); + $WAver = trim(file_get_contents(static::WHATSAPP_VER_CHECKER)); - // $WAverS = str_replace(".","",$WAver); - // $ver = str_replace(".","",static::WHATSAPP_VER); + $WAverS = str_replace(".","",$WAver); + $ver = str_replace(".","",static::WHATSAPP_VER); - // if($ver<$WAverS) - // { + if($ver<$WAverS) + { // $classesMD5 = file_get_contents('https://coderus.openrepos.net/whitesoft/whatsapp_classes'); // updateData('token.php', $WAver, $classesMD5); - // updateData('whatsprot.class.php', $WAver); - // } + updateData('whatsprot.class.php', $WAver); + } /* Create a TCP/IP socket. */ $socket = socket_create(AF_INET, SOCK_STREAM, SOL_TCP); From 1528cf1c2a045e0bd5f29f655e3859ba6aa82074 Mon Sep 17 00:00:00 2001 From: mgp25 Date: Wed, 21 Jan 2015 01:30:55 +0100 Subject: [PATCH 179/436] Version and UA updated to 2.11.291 --- src/whatsprot.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index 93d4e10c..b6715bff 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -46,8 +46,8 @@ class WhatsProt const WHATSAPP_SERVER = 's.whatsapp.net'; // The hostname used to login/send messages. const WHATSAPP_UPLOAD_HOST = 'https://mms.whatsapp.net/client/iphone/upload.php'; // The upload host. const WHATSAPP_DEVICE = 'Android'; // The device name. - const WHATSAPP_VER = '2.11.489'; // The WhatsApp version. - const WHATSAPP_USER_AGENT = 'WhatsApp/2.12.60 S40Version/14.26 Device/Nokia302'; // User agent used in request/registration code. + const WHATSAPP_VER = '2.11.491'; // The WhatsApp version. + const WHATSAPP_USER_AGENT = 'WhatsApp/2.11.491 Android/4.3 Device/GalaxyS3'; // User agent used in request/registration code. const WHATSAPP_VER_CHECKER = 'https://coderus.openrepos.net/whitesoft/whatsapp_version'; // Check WhatsApp version /** From f70917d770ca5dc0c9927972b3ad5469d54a3bad Mon Sep 17 00:00:00 2001 From: mgp25 Date: Wed, 21 Jan 2015 13:57:07 +0100 Subject: [PATCH 180/436] updateData fix --- src/func.php | 2 +- src/whatsprot.class.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/func.php b/src/func.php index b0587809..999ccfe9 100755 --- a/src/func.php +++ b/src/func.php @@ -189,7 +189,7 @@ function updateData($nameFile, $WAver, $classesMD5 = "") } else { if ($file == __DIR__ . '/whatsprot.class.php') { $content[48] = ' const WHATSAPP_VER = \'' . trim($WAver) . '\'; // The WhatsApp version.'; - $content[49] = ' const WHATSAPP_USER_AGENT = \'WhatsApp/' . trim($WAver) . ' Android/4.3 Device/GalaxyS3\'; // User agent used in request/registration code.'; + // $content[49] = ' const WHATSAPP_USER_AGENT = \'WhatsApp/' . trim($WAver) . ' Android/4.3 Device/GalaxyS3\'; // User agent used in request/registration code.'; } } diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index b6715bff..f3a0523e 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -47,7 +47,7 @@ class WhatsProt const WHATSAPP_UPLOAD_HOST = 'https://mms.whatsapp.net/client/iphone/upload.php'; // The upload host. const WHATSAPP_DEVICE = 'Android'; // The device name. const WHATSAPP_VER = '2.11.491'; // The WhatsApp version. - const WHATSAPP_USER_AGENT = 'WhatsApp/2.11.491 Android/4.3 Device/GalaxyS3'; // User agent used in request/registration code. + const WHATSAPP_USER_AGENT = 'WhatsApp/2.12.60 S40Version/14.26 Device/Nokia302'; // User agent used in request/registration code. const WHATSAPP_VER_CHECKER = 'https://coderus.openrepos.net/whitesoft/whatsapp_version'; // Check WhatsApp version /** From f779de1a7fb5b8a9050f87895ddaa1ff42bad921 Mon Sep 17 00:00:00 2001 From: SikiFn Date: Thu, 22 Jan 2015 10:29:04 +0200 Subject: [PATCH 181/436] WE DO NOT SUPPORT SPAMMING This was being abused --- examples/bulk.php | 155 ---------------------------------------------- 1 file changed, 155 deletions(-) delete mode 100755 examples/bulk.php diff --git a/examples/bulk.php b/examples/bulk.php deleted file mode 100755 index 1207c4ff..00000000 --- a/examples/bulk.php +++ /dev/null @@ -1,155 +0,0 @@ -Login(); - * $wbs->SyncContacts($contacts); - * $wbs->SendBulk($contacts, "bulk message"); - * or - * $wbs->SendBroadcast($contacts, "Broadcast Message"); - */ -class WaBulkSender -{ - - protected $username; - protected $password; - protected $nickname; - /** @var @var $wa WhatsProt */ - protected $wa; - protected static $sendLock = false; - - /** - * @param string $username - * @param string $password - * @param string $nickname - * @param bool $debug - */ - public function __construct($username, $password, $nickname = "WhatsApp", $debug = false) - { - $this->username = $username; - $this->password = $password; - $this->wa = new WhatsProt($username, null, $nickname, $debug); - $this->bindEvents(); - } - - protected function bindEvents() - { - $this->wa->eventManager()->bind("onLoginFailed", "WaBulkSender::event_onLoginFailed"); - $this->wa->eventManager()->bind("onLogin", "WaBulkSender::event_onLogin"); - $this->wa->eventManager()->bind("onConnect", "WaBulkSender::event_onConnect"); - $this->wa->eventManager()->bind("onMessageReceivedServer", "WaBulkSender::event_onMessageReceivedServer"); - } - - public function Login() - { - echo "Connecting... "; - $this->wa->connect(); - echo "Logging in... "; - $this->wa->loginWithPassword($this->password); - $this->wa->sendClientConfig(); - $this->wa->sendGetServerProperties(); - while ($this->wa->pollMessage()) { - ; - } - echo "Ready for work!
"; - } - - /** - * @param string $number - * @param string $reason - */ - public static function event_onLoginFailed($number, $reason) - { - die("login failed for $number; Reason: $reason"); - } - - /** - * @param string $number - */ - public static function event_onLogin($number) - { - echo "logged in as $number
"; - } - - /** - * @param string $number - * @param $socket - */ - public static function event_onConnect($number, $socket) - { - echo "connected to WhatsApp
"; - } - - public static function event_onMessageReceivedServer($mynumber, $from, $id, $type) - { - if ($from != "broadcast") { - //unlock - echo "$type with id $id from $mynumber to $from received by server
"; - static::$sendLock = false; - } - } - - /** - * @param string[] $contacts - */ - public function SyncContacts($contacts) - { - $this->wa->sendSync($contacts); - echo "Synced " . count($contacts) . " contacts
"; - } - - /** - * @param string[] $targets - * @param string $message - */ - public function SendBroadcast($targets, $message) - { - if (count($targets) > 25) { - echo "Error: too many broadcast targets (" . count($targets) . ")
"; - return; - } - echo "Sending broadcast... "; - $this->wa->sendBroadcastMessage($targets, $message); - $this->wa->pollMessage(); - echo "done!
"; - } - - /** - * @param string[] $targets - * @param $message - */ - public function SendBulk($targets, $message) - { - echo "Sending " . count($targets) . " bulk messages...
"; - foreach ($targets as $target) { - $this->wa->sendPresenceSubscription($target); - $this->wa->pollMessage(); - $this->wa->sendMessageComposing($target); - sleep(1); - $this->wa->pollMessage(); - $this->wa->sendMessagePaused($target); - static::$sendLock = true; - echo "Sending message from " . $this->username . " to $target... "; - $this->wa->sendMessage($target, $message); - while (static::$sendLock) { - //wait for server receipt - sleep(1); - } - } - echo "Finished sending bulk
"; - } -} From 401a6add62ebb3c62249d80e81d37f78f45721d1 Mon Sep 17 00:00:00 2001 From: mgp25 Date: Fri, 23 Jan 2015 14:17:14 +0100 Subject: [PATCH 182/436] Use sendGetGroupV2Info instead Removed sendGetGroupsParticipants, not used anymore --- src/whatsprot.class.php | 22 ---------------------- 1 file changed, 22 deletions(-) diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index f3a0523e..ecb62a4b 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -924,28 +924,6 @@ public function sendGetGroupsOwning() $this->sendGetGroupsFiltered("owning"); } - /** - * Send a request to return a list of people participating in a specific - * group. - * - * @param string $gjid The specific group id - */ - public function sendGetGroupsParticipants($gjid) - { - $msgId = $this->createMsgId("getgroupparticipants"); - - $child = new ProtocolNode("list", null, null, null); - $node = new ProtocolNode("iq", array( - "id" => $msgId, - "type" => "get", - "xmlns" => "w:g2", - "to" => $this->getJID($gjid) - ), array($child), null); - $this->sendNode($node); - - $this->waitForServer($msgId); - } - /** * Send a request to get a list of people you have currently blocked */ From 4576f4c9df7cc0f36053be94524ae5261490d22f Mon Sep 17 00:00:00 2001 From: mgp25 Date: Mon, 26 Jan 2015 12:12:06 +0100 Subject: [PATCH 183/436] Encryption workaround Using iPhone data to login --- src/whatsprot.class.php | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index ecb62a4b..0a0b6cbd 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -45,8 +45,8 @@ class WhatsProt const WHATSAPP_REQUEST_HOST = 'v.whatsapp.net/v2/code'; // The request code host. const WHATSAPP_SERVER = 's.whatsapp.net'; // The hostname used to login/send messages. const WHATSAPP_UPLOAD_HOST = 'https://mms.whatsapp.net/client/iphone/upload.php'; // The upload host. - const WHATSAPP_DEVICE = 'Android'; // The device name. - const WHATSAPP_VER = '2.11.491'; // The WhatsApp version. + const WHATSAPP_DEVICE = 'iPhone'; // The device name. + const WHATSAPP_VER = '2.11.14'; // The WhatsApp version. const WHATSAPP_USER_AGENT = 'WhatsApp/2.12.60 S40Version/14.26 Device/Nokia302'; // User agent used in request/registration code. const WHATSAPP_VER_CHECKER = 'https://coderus.openrepos.net/whitesoft/whatsapp_version'; // Check WhatsApp version @@ -468,13 +468,13 @@ public function connect() $WAverS = str_replace(".","",$WAver); $ver = str_replace(".","",static::WHATSAPP_VER); - if($ver<$WAverS) - { + // if($ver<$WAverS) + // { // $classesMD5 = file_get_contents('https://coderus.openrepos.net/whitesoft/whatsapp_classes'); - + // // updateData('token.php', $WAver, $classesMD5); - updateData('whatsprot.class.php', $WAver); - } + // updateData('whatsprot.class.php', $WAver); + // } /* Create a TCP/IP socket. */ $socket = socket_create(AF_INET, SOCK_STREAM, SOL_TCP); From 4eee0b45d41383df55226b36ce161e997e60afae Mon Sep 17 00:00:00 2001 From: kraken Date: Mon, 26 Jan 2015 20:57:51 +0500 Subject: [PATCH 184/436] added ConnectionClosedException --- src/exception.php | 6 ++++++ src/whatsprot.class.php | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/exception.php b/src/exception.php index 8678bbd7..a44a2375 100755 --- a/src/exception.php +++ b/src/exception.php @@ -47,3 +47,9 @@ public function __toString() } } + +/* + * Exception occurs when we have no active socket + * connection to whatsapp + */ +class ConnectionClosedException extends Exception{} diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index 0a0b6cbd..94b1d435 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -611,7 +611,7 @@ public function loginWithPassword($password) public function pollMessage($autoReceipt = true, $type = "read") { if(!$this->isConnected()) { - throw new Exception('Connection Closed!'); + throw new ConnectionClosedException('Connection Closed!'); } $r = array($this->socket); From 7fa3acffb7831ca71ff2215c50ba2ce6d3d7ce88 Mon Sep 17 00:00:00 2001 From: Ajay Sharavat Date: Wed, 28 Jan 2015 15:47:55 +0530 Subject: [PATCH 185/436] Update whatsprot.class.php Video caption was not working with filehash and size > 0 --- src/whatsprot.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index 0a0b6cbd..878ce547 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -1683,7 +1683,7 @@ public function sendMessageVideo($to, $filepath, $storeURLmedia = false, $fsize return $this->sendCheckAndSendMedia($filepath, $size, $to, 'video', $allowedExtensions, $storeURLmedia, $caption); } else{ - $this->sendRequestFileUpload($fhash, 'video', $fsize, $filepath, $to); + $this->sendRequestFileUpload($fhash, 'video', $fsize, $filepath, $to, $caption); return true; } } From e6b3e0c92bf50209e820e7206607e39c63c06545 Mon Sep 17 00:00:00 2001 From: mgp25 Date: Wed, 28 Jan 2015 11:44:22 +0100 Subject: [PATCH 186/436] ConnectionException added --- src/exception.php | 7 +++++++ src/whatsprot.class.php | 6 +++--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/src/exception.php b/src/exception.php index 8678bbd7..88af347d 100755 --- a/src/exception.php +++ b/src/exception.php @@ -47,3 +47,10 @@ public function __toString() } } + + +/* + * Exception occurs when we have no active socket + * connection to whatsapp + */ +class ConnectionException extends Exception{} diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index 0a0b6cbd..019d7fc2 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -611,7 +611,7 @@ public function loginWithPassword($password) public function pollMessage($autoReceipt = true, $type = "read") { if(!$this->isConnected()) { - throw new Exception('Connection Closed!'); + throw new ConnectionException('Connection Closed!'); } $r = array($this->socket); @@ -3574,7 +3574,7 @@ public function readStanza() } if(strlen($header) != 3) { - throw new Exception("Failed to read stanza header"); + throw new ConnectionException("Failed to read stanza header"); } $treeLength = (ord($header[0]) & 0x0F) << 16; $treeLength |= ord($header[1]) << 8; @@ -3598,7 +3598,7 @@ public function readStanza() } if (strlen($buff) != $treeLength) { - throw new Exception("Tree length did not match received length (buff = " . strlen($buff) . " & treeLength = $treeLength)"); + throw new ConnectionException("Tree length did not match received length (buff = " . strlen($buff) . " & treeLength = $treeLength)"); } $buff = $header . $buff; } From 7e248c11e3ca2d946eb02e06606df271efe4f966 Mon Sep 17 00:00:00 2001 From: lucamemini Date: Wed, 28 Jan 2015 22:46:27 +0100 Subject: [PATCH 187/436] Update whatsprot.class.php --- src/whatsprot.class.php | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index 019d7fc2..da422b14 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -2610,10 +2610,22 @@ protected function processInboundDataNode(ProtocolNode $node, $autoReceipt = tru } elseif ($node->getTag() == "success") { - $this->loginStatus = static::CONNECTED_STATUS; - $challengeData = $node->getData(); - file_put_contents($this->challengeFilename, $challengeData); - $this->writer->setKey($this->outputKey); + if ($node->getAttribute("status") == "active") { + $this->loginStatus = static::CONNECTED_STATUS; + $challengeData = $node->getData(); + file_put_contents($this->challengeFilename, $challengeData); + $this->writer->setKey($this->outputKey); + } elseif ($node->getAttribute("status") == "expired") + { + $this->eventManager()->fire("onAccountExpired", + array( + $this->phoneNumber, + $node->getAttribute("kind"), + $node->getAttribute("status"), + $node->getAttribute("creation"), + $node->getAttribute("expiration") + )); + } } elseif($node->getTag() == "failure") { $this->eventManager()->fire("onLoginFailed", From 30c97c0ecae19ad966a51bbcc2a26334350b7486 Mon Sep 17 00:00:00 2001 From: lucamemini Date: Wed, 28 Jan 2015 22:47:31 +0100 Subject: [PATCH 188/436] Update AllEvents.php --- src/events/AllEvents.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/events/AllEvents.php b/src/events/AllEvents.php index 6907c6d1..2a060ad8 100644 --- a/src/events/AllEvents.php +++ b/src/events/AllEvents.php @@ -88,6 +88,7 @@ public function onGroupsParticipantsAdd( $mynumber, $groupId, $jid ){} public function onGroupsParticipantsRemove( $mynumber, $groupId, $jid){} public function onLogin( $mynumber ){} public function onLoginFailed( $mynumber, $data ){} + public function onAccountExpired( $mynumber, $kind, $status, $creation, $expiration ){} public function onMediaMessageSent( $mynumber, $to, $id, $filetype, $url, $filename, $filesize, $filehash, $caption, $icon ){} public function onMediaUploadFailed( $mynumber, $id, $node, $messageNode, $statusMessage ){} public function onMessageComposing( $mynumber, $from, $id, $type, $time ){} From 834fe08189ec00ecbb5bf4dd0ecbb6d66d9aacfe Mon Sep 17 00:00:00 2001 From: mgp25 Date: Thu, 29 Jan 2015 01:38:34 +0100 Subject: [PATCH 189/436] Now you can save sent and received messages The user can choose to save or not the messages being sent or received in a Sqlite db --- src/SqliteMessageStore.php | 45 ++++++++++++++++++++++++++++++++++++++ src/whatsprot.class.php | 16 ++++++++++++++ 2 files changed, 61 insertions(+) create mode 100644 src/SqliteMessageStore.php diff --git a/src/SqliteMessageStore.php b/src/SqliteMessageStore.php new file mode 100644 index 00000000..3a1fd0a9 --- /dev/null +++ b/src/SqliteMessageStore.php @@ -0,0 +1,45 @@ +db = new \PDO("sqlite:" . $fileName, null, null, array(PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC, PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION)); + if ($createTable) + { + $this->db->exec('CREATE TABLE messages (`from` TEXT, `to` TEXT, message TEXT, id TEXT, t TEXT)'); + + } + + } + + public function saveMessage($from, $to, $txt, $id, $t) + { + $sql = 'INSERT INTO messages (`from`, `to`, message, id, t) VALUES (:from, :to, :message, :messageId, :t)'; + $query = $this->db->prepare($sql); + + $query->execute( + array( + ':from' => $from, + ':to' => $to, + ':message' => $txt, + ':messageId' => $id, + ':t' => $t + ) + ); + + } +} + +?> diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index 019d7fc2..d13e1b7a 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -7,6 +7,7 @@ require_once 'keystream.class.php'; require_once 'tokenmap.class.php'; require_once 'events/WhatsApiEventsManager.php'; +require_once 'SqliteMessageStore.php'; class SyncResult { @@ -78,6 +79,7 @@ class WhatsProt protected $serverReceivedId; // Confirm that the *server* has received your command. protected $socket; // A socket to connect to the WhatsApp network. protected $writer; // An instance of the BinaryTreeNodeWriter class. + protected $messageStore; /** * Default class constructor. @@ -1530,6 +1532,11 @@ public function sendMessage($to, $txt, $id = null) $bodyNode = new ProtocolNode("body", null, null, $txt); $id = $this->sendMessageNode($to, $bodyNode, $id); $this->waitForServer($id); + + if ($this->messageStore !== null) { + $this->messageStore->saveMessage($this->phoneNumber, $to, $txt, $id, time()); + } + return $id; } @@ -2426,6 +2433,11 @@ public function sendSync(array $numbers, array $deletedNumbers = null, $syncType return $id; } + public function setMessageStore(MessageStoreInterface $messageStore) + { + $this->messageStore = $messageStore; + } + /** * Process number/jid and turn it into a JID if necessary * @@ -2677,6 +2689,10 @@ protected function processInboundDataNode(ProtocolNode $node, $autoReceipt = tru $node->getAttribute("notify"), $node->getChild("body")->getData() )); + + if ($this->messageStore !== null) { + $this->messageStore->saveMessage($node->getAttribute('from'), $this->phoneNumber, $node->getChild("body")->getData(), $node->getAttribute('id'), $node->getAttribute('t')); + } } else { From 2ee22cc576c13789e5333dbcd73e90d5dc60e822 Mon Sep 17 00:00:00 2001 From: mgp25 Date: Sat, 31 Jan 2015 17:48:31 +0100 Subject: [PATCH 190/436] Identity fix (bug while register) --- src/whatsprot.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index 87faef9c..ce9af5a2 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -2327,8 +2327,8 @@ protected function buildIdentity($identity) else { $id = fopen($identity.".dat", "w"); - $bytes = openssl_random_pseudo_bytes(20); - fwrite($id, strtolower(urlencode($bytes))); + $bytes = strtolower(openssl_random_pseudo_bytes(20)); + fwrite($id, urlencode($bytes)); fclose($id); return $bytes; From 6d88e609e580c04d0a9f7ae9c0ee25a53c5891c8 Mon Sep 17 00:00:00 2001 From: mgp25 Date: Mon, 2 Feb 2015 10:31:28 +0100 Subject: [PATCH 191/436] sendSync for sid updated --- src/whatsprot.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index ce9af5a2..013eaebf 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -2948,7 +2948,7 @@ protected function processInboundDataNode(ProtocolNode $node, $autoReceipt = tru $index = $sync->getAttribute("index"); - $result = new SyncResult($index, $sync->getAttribute("sync"), $existingUsers, $failedNumbers); + $result = new SyncResult($index, $sync->getAttribute("sid"), $existingUsers, $failedNumbers); $this->eventManager()->fire("onGetSyncResult", array( From 08d9016e26325e1882db35e39f04116ef5157e65 Mon Sep 17 00:00:00 2001 From: mgp25 Date: Tue, 3 Feb 2015 22:48:46 +0100 Subject: [PATCH 192/436] send Media without adding pollMessage after --- src/whatsprot.class.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index 013eaebf..35ecf2a7 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -3797,6 +3797,8 @@ protected function sendMessageNode($to, $node, $id = null) $messageHash["id"], $node )); + $this->waitForServer($messageHash["id"]); + return $messageHash["id"]; } From 4682f2e8cb2760e201bffd18127fa681a008ae3a Mon Sep 17 00:00:00 2001 From: mgp25 Date: Wed, 4 Feb 2015 00:49:00 +0100 Subject: [PATCH 193/436] onMessageReceivedClient when receiving list node Credits to @BartS23 --- src/whatsprot.class.php | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index 35ecf2a7..eaccd4bf 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -2647,6 +2647,19 @@ protected function processInboundDataNode(ProtocolNode $node, $autoReceipt = tru } elseif($node->getTag() == 'receipt') { + if ($node->hasChild("list")) { + foreach ($node->getChild("list")->getChildren() as $child) { + $this->eventManager()->fire("onMessageReceivedClient", + array( + $this->phoneNumber, + $node->getAttribute('from'), + $child->getAttribute('id'), + $node->getAttribute('type'), + $node->getAttribute('t') + )); + } + } + $this->eventManager()->fire("onMessageReceivedClient", array( $this->phoneNumber, @@ -3797,7 +3810,7 @@ protected function sendMessageNode($to, $node, $id = null) $messageHash["id"], $node )); - $this->waitForServer($messageHash["id"]); + $this->waitForServer($messageHash["id"]); return $messageHash["id"]; } From e53886c4b190a245e12b26e81c399b5e6b04be9a Mon Sep 17 00:00:00 2001 From: mgp25 Date: Wed, 4 Feb 2015 01:00:09 +0100 Subject: [PATCH 194/436] Update token (not related with registration) --- src/token.php | 2 +- src/whatsprot.class.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/token.php b/src/token.php index 4690b955..02b327ac 100755 --- a/src/token.php +++ b/src/token.php @@ -20,7 +20,7 @@ function generateRequestToken($country, $phone) // return base64_encode($output); - $token = md5("PdA2DJyKoUrwLw1Bg6EIhzh502dF9noR9uFCllGk1418865329241".$phone); + $token = md5("PdA2DJyKoUrwLw1Bg6EIhzh502dF9noR9uFCllGk1419900749520".$phone); return $token; } diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index eaccd4bf..86cb8bc1 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -48,7 +48,7 @@ class WhatsProt const WHATSAPP_UPLOAD_HOST = 'https://mms.whatsapp.net/client/iphone/upload.php'; // The upload host. const WHATSAPP_DEVICE = 'iPhone'; // The device name. const WHATSAPP_VER = '2.11.14'; // The WhatsApp version. - const WHATSAPP_USER_AGENT = 'WhatsApp/2.12.60 S40Version/14.26 Device/Nokia302'; // User agent used in request/registration code. + const WHATSAPP_USER_AGENT = 'WhatsApp/2.12.61 S40Version/14.26 Device/Nokia302'; // User agent used in request/registration code. const WHATSAPP_VER_CHECKER = 'https://coderus.openrepos.net/whitesoft/whatsapp_version'; // Check WhatsApp version /** From 13acbfb648803552be3b3305481eb221c1204099 Mon Sep 17 00:00:00 2001 From: lucamemini Date: Wed, 4 Feb 2015 16:06:00 +0100 Subject: [PATCH 195/436] Update WhatsAppEvent.php --- src/WhatsAppEvent.php | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/WhatsAppEvent.php b/src/WhatsAppEvent.php index f0a524c9..53e8b37c 100755 --- a/src/WhatsAppEvent.php +++ b/src/WhatsAppEvent.php @@ -609,6 +609,19 @@ function fireLoginFailed( }; $this->fireCallback($callbackEvent); } + +function fireAccountExpired( + $phone, + $kind, + $status, + $creation, + $expiration + ) { + $callbackEvent = function(WhatsAppEventListener $listener) use ($phone, $kind, $status, $creation, $expiration) { + $listener->onAccountExpired($phone, $kind, $status, $creation, $expiration); + }; + $this->fireCallback($callbackEvent); + } function fireMessageComposing( $phone, From 40279e8b5067d8bf18b4d7ee965b3cb0a9308df0 Mon Sep 17 00:00:00 2001 From: lucamemini Date: Wed, 4 Feb 2015 16:08:16 +0100 Subject: [PATCH 196/436] Update whatsprot.class.php --- src/whatsprot.class.php | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index da422b14..a7bedf63 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -2610,22 +2610,22 @@ protected function processInboundDataNode(ProtocolNode $node, $autoReceipt = tru } elseif ($node->getTag() == "success") { - if ($node->getAttribute("status") == "active") { + if ($node->getAttribute("status") == "active") { $this->loginStatus = static::CONNECTED_STATUS; $challengeData = $node->getData(); file_put_contents($this->challengeFilename, $challengeData); $this->writer->setKey($this->outputKey); - } elseif ($node->getAttribute("status") == "expired") - { - $this->eventManager()->fire("onAccountExpired", - array( - $this->phoneNumber, - $node->getAttribute("kind"), - $node->getAttribute("status"), - $node->getAttribute("creation"), - $node->getAttribute("expiration") - )); - } + } elseif ($node->getAttribute("status") == "expired") + { + $this->eventManager()->fire("onAccountExpired", + array( + $this->phoneNumber, + $node->getAttribute("kind"), + $node->getAttribute("status"), + $node->getAttribute("creation"), + $node->getAttribute("expiration") + )); + } } elseif($node->getTag() == "failure") { $this->eventManager()->fire("onLoginFailed", From dd22e01c20c12cfd95f590d58b71f665b906e5ce Mon Sep 17 00:00:00 2001 From: lucamemini Date: Wed, 4 Feb 2015 16:09:08 +0100 Subject: [PATCH 197/436] Update MyEvents.php --- src/events/MyEvents.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/events/MyEvents.php b/src/events/MyEvents.php index 19ad494f..f1b458b9 100644 --- a/src/events/MyEvents.php +++ b/src/events/MyEvents.php @@ -54,6 +54,7 @@ class MyEvents extends AllEvents // 'onGroupsParticipantsRemove', // 'onLogin', // 'onLoginFailed', +// 'onAccountExpired', // 'onMediaMessageSent', // 'onMediaUploadFailed', // 'onMessageComposing', @@ -85,4 +86,4 @@ public function onDisconnect($mynumber, $socket) echo "

Booo!, Phone number $mynumber is disconnected!

"; } -} \ No newline at end of file +} From 543c8760b9efbb3ccff3636d0cceb13d2078ea8b Mon Sep 17 00:00:00 2001 From: mgp25 Date: Thu, 5 Feb 2015 10:14:35 +0100 Subject: [PATCH 198/436] sendGetPrivacyBlockedList fixed --- src/whatsprot.class.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index 2a68af50..f770c74b 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -935,11 +935,10 @@ public function sendGetPrivacyBlockedList() $child = new ProtocolNode("list", array( "name" => "default" ), null, null); - $child2 = new ProtocolNode("query", array( - "xmlns" => "jabber:iq:privacy" - ), array($child), null); + $child2 = new ProtocolNode("query", array(), array($child), null); $node = new ProtocolNode("iq", array( "id" => $msgId, + "xmlns" => "jabber:iq:privacy", "type" => "get" ), array($child2), null); $this->sendNode($node); From 79a298bcd49edd292c08761fc1d0d8457b3183ed Mon Sep 17 00:00:00 2001 From: mgp25 Date: Thu, 5 Feb 2015 10:26:40 +0100 Subject: [PATCH 199/436] Fixed $null var --- src/whatsprot.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index f770c74b..75508af2 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -1037,7 +1037,7 @@ public function sendGetProfilePhotoIds($numbers) $i = 0; for($i; $i $this->getJID($numbers[$i])), null, $null); + $userNode[$i] = new ProtocolNode("user", array("jid" => $this->getJID($numbers[$i])), null, null); } $listNode = new ProtocolNode("list", null, $userNode, null); @@ -2626,7 +2626,7 @@ protected function processInboundDataNode(ProtocolNode $node, $autoReceipt = tru $challengeData = $node->getData(); file_put_contents($this->challengeFilename, $challengeData); $this->writer->setKey($this->outputKey); - } elseif ($node->getAttribute("status") == "expired") + } elseif ($node->getAttribute("status") == "expired") { $this->eventManager()->fire("onAccountExpired", array( From dfa2a8d436a37d0c0b7056a0d753c02415046bc5 Mon Sep 17 00:00:00 2001 From: mgp25 Date: Thu, 5 Feb 2015 11:50:56 +0100 Subject: [PATCH 200/436] Fixed codeRequest issues --- src/whatsprot.class.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index 75508af2..13a56d67 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -370,14 +370,14 @@ public function codeRequest($method = 'sms', $carrier = "T-Mobile5", $countryCod 'id' => $this->identity, 'lg' => $langCode, 'lc' => $countryCode, - 'mcc' => '000', - 'mnc' => '000', + //'mcc' => '000', + //'mnc' => '000', 'sim_mcc' => $phone['mcc'], 'sim_mnc' => $mnc, 'method' => $method, - 'reason' => "self-send-jailbroken", + //'reason' => "self-send-jailbroken", 'token' => $token, - 'network_radio_type' => "1" + //'network_radio_type' => "1" ); if ($this->debug) { From 588455111cd781e6ca8100f096e0476d270e8f11 Mon Sep 17 00:00:00 2001 From: mgp25 Date: Thu, 5 Feb 2015 13:33:01 +0100 Subject: [PATCH 201/436] codeRegister fixed --- src/whatsprot.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index 13a56d67..f8851cc4 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -276,7 +276,7 @@ public function codeRegister($code) 'code' => $code, 'lg' => $langCode, 'lc' => $countryCode, - 'network_radio_type' => "1" + //'network_radio_type' => "1" ); $response = $this->getResponse($host, $query); From 1c4cbfa11d9ebad57f05fd4dcd1e8e3ddc9fec31 Mon Sep 17 00:00:00 2001 From: mgp25 Date: Thu, 5 Feb 2015 15:07:08 +0100 Subject: [PATCH 202/436] GetGroupV2Info update --- src/events/AllEvents.php | 2 +- src/whatsprot.class.php | 45 ++++++++++++++++++++++------------------ 2 files changed, 26 insertions(+), 21 deletions(-) diff --git a/src/events/AllEvents.php b/src/events/AllEvents.php index 2a060ad8..3f145e6b 100644 --- a/src/events/AllEvents.php +++ b/src/events/AllEvents.php @@ -63,7 +63,7 @@ public function onGetGroupMessage( $mynumber, $from_group_jid, $from_user_jid, $ public function onGetGroupParticipants( $mynumber, $groupId, $groupList ){} public function onGetGroups( $mynumber, $groupList ){} public function onGetGroupsInfo( $mynumber, $groupList ){} - public function onGetGroupV2Info( $mynumber, $type, $groupList ){} + public function onGetGroupV2Info( $mynumber, $creator, $creation, $subject, $participants, $admin ){} public function onGetGroupsSubject( $mynumber, $group_jid, $time, $author, $name, $subject ){} public function onGetImage( $mynumber, $from, $id, $type, $time, $name, $size, $url, $file, $mimeType, $fileHash, $width, $height, $preview, $caption ){} public function onGetKeysLeft( $mynumber, $keysLeft){} diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index f8851cc4..48054edc 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -3084,27 +3084,32 @@ protected function processInboundDataNode(ProtocolNode $node, $autoReceipt = tru } } if($node->nodeIdContains('get_groupv2_info')){ - $groupId = self::parseJID($node->getAttribute('from')); - - $type = ""; - $groupList = array(); - $groupChild = $node->getChild(0); - if ($groupChild != null) { - $type = $groupChild->getAttribute('type'); - - if ($groupChild->getChild(0) != null) { - foreach ($groupChild->getChildren() as $child) { - $groupList[] = $child->getAttributes(); - } - } - } + $groupId = self::parseJID($node->getAttribute('from')); - $this->eventManager()->fire("onGetGroupV2Info", - array( - $this->phoneNumber, - $type, - $groupList - )); + $groupList = array(); + $groupChild = $node->getChild(0); + if ($groupChild != null) { + $creator = $groupChild->getAttribute('creator'); + $creation = $groupChild->getAttribute('creation'); + $subject = $groupChild->getAttribute('subject'); + if ($groupChild->getChild(0) != null) { + foreach ($groupChild->getChildren() as $child) { + $participants[] = $child->getAttribute('jid'); + if($child->getAttribute('type') != null) + $admin = $child->getAttribute('jid'); + } + } + } + + $this->eventManager()->fire("onGetGroupV2Info", + array( + $this->phoneNumber, + $creator, + $creation, + $subject, + $participants, + $admin + )); } if ($node->nodeIdContains("get_lists")) { $broadcastLists = array(); From 5637f435afe78da007f51d0be836c4d8ad187281 Mon Sep 17 00:00:00 2001 From: mgp25 Date: Thu, 5 Feb 2015 15:41:14 +0100 Subject: [PATCH 203/436] Update README.md --- README.md | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 51e844a1..b0c14b86 100644 --- a/README.md +++ b/README.md @@ -10,16 +10,13 @@ Interface to WhatsApp Messenger ### Special thanks -I would like to thank all those who have made this project goes forward. First I have to thank [@shirioko](https://github.com/shirioko/) aka hero, when I came to the project, i knew nothing and introduced me to the project. He has been responsible of the API for a long time and he always be a hero! Now it's my turn and i hope to do as good as i can to make this API better. - -And I also want to thank all the users that are collaborating with me and are making such good work: - - [CODeRUS](https://github.com/CODeRUS) - [tgalal](https://github.com/tgalal) - [SikiFn](https://github.com/SikiFn) - [0xTryCatch](https://github.com/0xTryCatch) +- [Shirioko](https://github.com/shirioko) -[![Paypal](https://www.paypalobjects.com/es_XC/i/btn/btn_donate_SM.gif)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=KN6L7WMU7VM56) +[![Paypal](https://www.paypalobjects.com/en_US/i/btn/btn_donate_SM.gif)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=KN6L7WMU7VM56) **Bitcoin:** 15NejBDahfe1eLAPSJh4iMfYLHYuKDrwJ2 From 6f7e88e1f3d8cffbddd20bd0d661c06134a69af6 Mon Sep 17 00:00:00 2001 From: mgp25 Date: Sat, 7 Feb 2015 10:25:25 +0100 Subject: [PATCH 204/436] codeRegister update --- src/whatsprot.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index 48054edc..27fd0692 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -274,8 +274,8 @@ public function codeRegister($code) 'in' => $phone['phone'], 'id' => $this->identity, 'code' => $code, - 'lg' => $langCode, - 'lc' => $countryCode, + //'lg' => $langCode, + //'lc' => $countryCode, //'network_radio_type' => "1" ); From ff076e73020574cfd6375f472faa5e1bb27163df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ferm=C3=ADn=20Olaiz?= Date: Mon, 9 Feb 2015 22:43:12 -0300 Subject: [PATCH 205/436] Delete WhatsAppEvent.php --- src/WhatsAppEvent.php | 923 ------------------------------------------ 1 file changed, 923 deletions(-) delete mode 100755 src/WhatsAppEvent.php diff --git a/src/WhatsAppEvent.php b/src/WhatsAppEvent.php deleted file mode 100755 index 53e8b37c..00000000 --- a/src/WhatsAppEvent.php +++ /dev/null @@ -1,923 +0,0 @@ -addEventListener(new WhatsAppEventListenerLegacyAdapter($event,$listener)); - } - - /** - * Executes all the binded callbacks when the event is fired. Don't this method, - * this is included for backwards compatibility only. - * - * @param string $event - * Name of the event. - * @param array $arguments - * The arguments to pass to each callback. - * - * @deprecated Fire events specifically by name. - */ - public function fire($event, $arguments = array()) - { - // For backwards compatibility only. - foreach( self::$event_listeners as $event_listener ) { - call_user_func_array(array($event_listener, $event), $arguments); - } - } - - /** - * Fires the callback for each listener. - * - * @param callable $callbackEvent - */ - private function fireCallback($callbackEvent) { - array_map($callbackEvent, self::$event_listeners); - } - - // The supported events: - function fireClose( - $phone, - $error - ) { - $callbackEvent = function(WhatsAppEventListener $listener) use ($phone, $error) { - $listener->onClose($phone, $error); - }; - $this->fireCallback($callbackEvent); - } - - function fireCodeRegister( - $phone, - $login, - $pw, - $type, - $expiration, - $kind, - $price, - $cost, - $currency, - $price_expiration - ) { - $callbackEvent = function(WhatsAppEventListener $listener) use ($phone, $login, $pw, $type, $expiration, $kind, $price, $cost, $currency, $price_expiration) { - $listener->onCodeRegister($phone, $login, $pw, $type, $expiration, $kind, $price, $cost, $currency, $price_expiration); - }; - $this->fireCallback($callbackEvent); - } - - function fireCodeRegisterFailed( - $phone, - $status, - $reason, - $retry_after - ) { - $callbackEvent = function(WhatsAppEventListener $listener) use ($phone, $status, $reason, $retry_after) { - $listener->onCodeRegisterFailed($phone, $status, $reason, $retry_after); - }; - $this->fireCallback($callbackEvent); - } - - function fireCodeRequest( - $phone, - $method, - $length - ) { - $callbackEvent = function(WhatsAppEventListener $listener) use ($phone, $method, $length) { - $listener->onCodeRequest($phone, $method, $length); - }; - $this->fireCallback($callbackEvent); - } - - function fireCodeRequestFailed( - $phone, - $method, - $reason, - $value - ) { - $callbackEvent = function(WhatsAppEventListener $listener) use ($phone, $method, $reason, $value) { - $listener->onCodeRequestFailed($phone, $method, $reason, $value); - }; - $this->fireCallback($callbackEvent); - } - - function fireCodeRequestFailedTooRecent( - $phone, - $method, - $reason, - $retry_after - ) { - $callbackEvent = function(WhatsAppEventListener $listener) use ($phone, $method, $reason, $retry_after){ - $listener->onCodeRequestFailedTooRecent($phone, $method, $reason, $retry_after); - }; - $this->fireCallback($callbackEvent); - } - - function fireConnect( - $phone, - $socket - ) { - $callbackEvent = function(WhatsAppEventListener $listener) use ($phone, $socket) { - $listener->onConnect($phone, $socket); - }; - $this->fireCallback($callbackEvent); - } - - function fireConnectError( - $phone, - $socket - ) { - $callbackEvent = function(WhatsAppEventListener $listener) use ($phone, $socket){ - $listener->onConnectError($phone, $socket); - }; - $this->fireCallback($callbackEvent); - } - - function fireCredentialsBad( - $phone, - $status, - $reason - ) { - $callbackEvent = function(WhatsAppEventListener $listener) use ($phone, $status, $reason) { - $listener->onCredentialsBad($phone, $status, $reason); - }; - $this->fireCallback($callbackEvent); - } - - function fireCredentialsGood( - $phone, - $login, - $pw, - $type, - $expiration, - $kind, - $price, - $cost, - $currency, - $price_expiration - ) { - $callbackEvent = function(WhatsAppEventListener $listener) use ($phone, $login, $pw, $type, $expiration, $kind, $price, $cost, $currency, $price_expiration) { - $listener->onCredentialsGood($phone, $login, $pw, $type, $expiration, $kind, $price, $cost, $currency, $price_expiration); - }; - $this->fireCallback($callbackEvent); - } - - function fireDisconnect( - $phone, - $socket - ) { - $callbackEvent = function(WhatsAppEventListener $listener) use ($phone, $socket) { - $listener->onDisconnect($phone, $socket); - }; - $this->fireCallback($callbackEvent); - } - - function fireDissectPhone( - $phone, - $country, - $cc, - $mcc, - $lc, - $lg, - $mnc - ) { - $callbackEvent = function(WhatsAppEventListener $listener) use ($phone, $country, $cc, $mcc, $lc, $lg, $mnc) { - $listener->onDissectPhone($phone, $country, $cc, $mcc, $lc, $lg, $mnc); - }; - $this->fireCallback($callbackEvent); - } - - function fireDissectPhoneFailed( - $phone - ) { - $callbackEvent = function(WhatsAppEventListener $listener) use ($phone) { - $listener->onDissectPhoneFailed($phone); - }; - $this->fireCallback($callbackEvent); - } - - function fireGetAudio( - $phone, - $from, - $msgid, - $type, - $time, - $name, - $size, - $url, - $file, - $mimetype, - $filehash, - $duration, - $acodec - ) { - $callbackEvent = function(WhatsAppEventListener $listener) use ($phone, $from, $msgid, $type, $time, $name, $size, $url, $file, $mimetype, $filehash, $duration, $acodec) { - $listener->onGetAudio($phone, $from, $msgid, $type, $time, $name, $size, $url, $file, $mimetype, $filehash, $duration, $acodec); - }; - $this->fireCallback($callbackEvent); - } - - function fireGetError( - $phone, - $from, - $id, - $error - ) { - $callbackEvent = function(WhatsAppEventListener $listener) use ($phone, $from, $id, $error) { - $listener->onGetError($phone, $from, $id, $error); - }; - $this->fireCallback($callbackEvent); - } - - function fireGetFeature( - $phone, - $from, - $encrypt - ) { - $callbackEvent = function(WhatsAppEventListener $listener) use ($phone, $from, $encrypt) { - $listener->onGetFeature($phone, $from, $encrypt); - }; - $this->fireCallback($callbackEvent); - } - - function fireGetGroups( - $phone, - $groupList - ) { - $callbackEvent = function(WhatsAppEventListener $listener) use ($phone, $groupList) { - $listener->onGetGroups($phone, $groupList); - }; - $this->fireCallback($callbackEvent); - } - - function fireGroupCreate( - $phone, - $groupList - ) { - $callbackEvent = function(WhatsAppEventListener $listener) use ($phone, $groupList) { - $listener->onGroupsChatCreate($phone, $groupList); - }; - $this->fireCallback($callbackEvent); - } - - function fireGroupisCreated( - $phone, - $creator, - $gId, - $subject - ) { - $callbackEvent = function(WhatsAppEventListener $listener) use ($phone, $creator, $gId, $subject) { - $listener->onGroupsChatisCreated($phone, $creator, $gId, $subject); - }; - $this->fireCallback($callbackEvent); - } - - function fireGetGroupsInfo( - $phone, - $groupList - ) { - $callbackEvent = function(WhatsAppEventListener $listener) use ($phone, $groupList) { - $listener->onGetGroupsInfo($phone, $groupList); - }; - $this->fireCallback($callbackEvent); - } - - function fireGetGroupsSubject( - $phone, - $gId, - $time, - $author, - $participant, - $name, - $subject - ) { - $callbackEvent = function(WhatsAppEventListener $listener) use ($phone, $gId, $time, $author, $participant, $name, $subject) { - $listener->onGetGroupsSubject($phone, $gId, $time, $author, $participant, $name, $subject); - }; - $this->fireCallback($callbackEvent); - } - - function fireGetImage( - $phone, - $from, - $msgid, - $type, - $time, - $name, - $size, - $url, - $file, - $mimetype, - $filehash, - $width, - $height, - $thumbnail, - $caption - ) { - $callbackEvent = function(WhatsAppEventListener $listener) use ($phone, $from, $msgid, $type, $time, $name, $size, $url, $file, $mimetype, $filehash, $width, $height, $thumbnail, $caption) { - $listener->onGetImage($phone, $from, $msgid, $type, $time, $name, $size, $url, $file, $mimetype, $filehash, $width, $height, $thumbnail, $caption); - }; - $this->fireCallback($callbackEvent); - } - - function fireGetLocation( - $phone, - $from, - $msgid, - $type, - $time, - $name, - $place_name, - $longitude, - $latitude, - $url, - $thumbnail - ) { - $callbackEvent = function(WhatsAppEventListener $listener) use ($phone, $from, $msgid, $type, $time, $name, $place_name, $longitude, $latitude, $url, $thumbnail) { - $listener->onGetLocation($phone, $from, $msgid, $type, $time, $name, $place_name, $longitude, $latitude, $url, $thumbnail); - }; - $this->fireCallback($callbackEvent); - } - - function fireGetMessage( - $phone, - $from, - $msgid, - $type, - $time, - $name, - $message - ) { - $callbackEvent = function(WhatsAppEventListener $listener) use ($phone, $from, $msgid, $type, $time, $name, $message) { - $listener->onGetMessage($phone, $from, $msgid, $type, $time, $name, $message); - }; - $this->fireCallback($callbackEvent); - } - - function fireGetGroupMessage( - $phone, - $from, - $author, - $msgid, - $type, - $time, - $name, - $message - ) { - $callbackEvent = function(WhatsAppEventListener $listener) use ($phone, $from, $author, $msgid, $type, $time, $name, $message) { - $listener->onGetGroupMessage($phone, $from, $author, $msgid, $type, $time, $name, $message); - }; - $this->fireCallback($callbackEvent); - } - - function fireGetGroupParticipants( - $phone, - $groupId, - $groupList - ) { - $callbackEvent = function(WhatsAppEventListener $listener) use ($phone, $groupId, $groupList) { - $listener->onGetGroupParticipants($phone, $groupId, $groupList); - }; - $this->fireCallback($callbackEvent); - } - - function fireGetPrivacyBlockedList( - $phone, - $children - /* - $data, - $onGetProfilePicture, - $phone, - $from, - $type, - $thumbnail - */ - ) { - $callbackEvent = function(WhatsAppEventListener $listener) use ($phone, $children) { - $listener->onGetPrivacyBlockedList($phone, $children); - }; - $this->fireCallback($callbackEvent); - } - - function fireGetProfilePicture( - $phone, - $from, - $type, - $thumbnail - ) { - $callbackEvent = function(WhatsAppEventListener $listener) use ($phone, $from, $type, $thumbnail) { - $listener->onGetProfilePicture($phone, $from, $type, $thumbnail); - }; - $this->fireCallback($callbackEvent); - } - - function fireGetRequestLastSeen( - $phone, - $from, - $msgid, - $sec - ) { - $callbackEvent = function(WhatsAppEventListener $listener) use ($phone, $from, $msgid, $sec) { - $listener->onGetRequestLastSeen($phone, $from, $msgid, $sec); - }; - $this->fireCallback($callbackEvent); - } - - function fireGetServerProperties( - $phone, - $version, - $properties - ) { - $callbackEvent = function(WhatsAppEventListener $listener) use ($phone, $version, $properties) { - $listener->onGetServerProperties($phone, $version, $properties); - }; - $this->fireCallback($callbackEvent); - } - - function fireGetStatus( - $phone, - $from, - $type, - $id, - $t, - $status - ) { - $callbackEvent = function(WhatsAppEventListener $listener) use ($phone, $from, $type, $id, $t, $status) { - $listener->onGetStatus($phone, $from, $type, $id, $t, $status); - }; - $this->fireCallback($callbackEvent); - } - - function fireGetvCard( - $phone, - $from, - $msgid, - $type, - $time, - $name, - $contact, - $vcard - ) { - $callbackEvent = function(WhatsAppEventListener $listener) use ($phone, $from, $msgid, $type, $time, $name, $contact, $vcard){ - $listener->onGetvCard($phone, $from, $msgid, $type, $time, $name, $contact, $vcard); - }; - $this->fireCallback($callbackEvent); - } - - function fireGetVideo( - $phone, - $from, - $msgid, - $type, - $time, - $name, - $url, - $file, - $size, - $mimetype, - $filehash, - $duration, - $vcodec, - $acodec, - $thumbnail, - $caption - ) { - $callbackEvent = function(WhatsAppEventListener $listener) use ($phone, $from, $msgid, $type, $time, $name, $url, $file, $size, $mimetype, $filehash, $duration, $vcodec, $acodec, $thumbnail, $caption){ - $listener->onGetVideo($phone, $from, $msgid, $type, $time, $name, $url, $file, $size, $mimetype, $filehash, $duration, $vcodec, $acodec, $thumbnail, $caption); - }; - $this->fireCallback($callbackEvent); - } - - function fireGroupsChatCreate( - $phone, - $gId - ) { - $callbackEvent = function(WhatsAppEventListener $listener) use ($phone, $gId) { - $listener->onGroupsChatCreate($phone, $gId); - }; - $this->fireCallback($callbackEvent); - } - - function fireGroupsChatEnd( - $phone, - $gId - ) { - $callbackEvent = function(WhatsAppEventListener $listener) use ($phone, $gId) { - $listener->onGroupsChatEnd($phone, $gId); - }; - $this->fireCallback($callbackEvent); - } - - function fireGroupsParticipantsAdd( - $phone, - $groupId, - $participant - ) { - $callbackEvent = function(WhatsAppEventListener $listener) use ($phone, $groupId, $participant) { - $listener->onGroupsParticipantsAdd($phone, $groupId, $participant); - }; - $this->fireCallback($callbackEvent); - } - - function fireGroupsParticipantsRemove( - $phone, - $groupId, - $participant - ) { - $callbackEvent = function(WhatsAppEventListener $listener) use ($phone, $groupId, $participant) { - $listener->onGroupsParticipantsRemove($phone, $groupId, $participant); - }; - $this->fireCallback($callbackEvent); - } - - function fireLogin( - $phone - ) { - $callbackEvent = function(WhatsAppEventListener $listener) use ($phone) { - $listener->onLogin($phone); - }; - $this->fireCallback($callbackEvent); - } - - function fireLoginFailed( - $phone, - $tag - ) { - $callbackEvent = function(WhatsAppEventListener $listener) use ($phone, $tag) { - $listener->onLoginFailed($phone, $tag); - }; - $this->fireCallback($callbackEvent); - } - -function fireAccountExpired( - $phone, - $kind, - $status, - $creation, - $expiration - ) { - $callbackEvent = function(WhatsAppEventListener $listener) use ($phone, $kind, $status, $creation, $expiration) { - $listener->onAccountExpired($phone, $kind, $status, $creation, $expiration); - }; - $this->fireCallback($callbackEvent); - } - - function fireMessageComposing( - $phone, - $from, - $msgid, - $type, - $time - ) { - $callbackEvent = function(WhatsAppEventListener $listener) use ($phone, $from, $msgid, $type, $time) { - $listener->onMessageComposing($phone, $from, $msgid, $type, $time); - }; - $this->fireCallback($callbackEvent); - } - - function fireMediaMessageSent( - $phone, - $to, - $id, - $filetype, - $url, - $filename, - $filesize, - $filehash, - $caption, - $icon - ) { - $callbackEvent = function(WhatsAppEventListener $listener) use ($phone, $to, $id, $filetype, $url, $filename, $filesize, $filehash, $caption, $icon) { - $listener->onMediaMessageSent($phone, $to, $id, $filetype, $url, $filename, $filesize, $filehash, $caption, $icon); - }; - $this->fireCallback($callbackEvent); - } - - function fireMediaUploadFailed( - $phone, - $id, - $node, - $messageNode, - $reason - ) { - $callbackEvent = function(WhatsAppEventListener $listener) use ($phone, $id, $node, $messageNode, $reason) { - $listener->onMediaUploadFailed($phone, $id, $node, $messageNode, $reason); - }; - $this->fireCallback($callbackEvent); - } - - function fireMessagePaused( - $phone, - $from, - $msgid, - $type, - $time - ) { - $callbackEvent = function(WhatsAppEventListener $listener) use ($phone, $from, $msgid, $type, $time) { - $listener->onMessagePaused($phone, $from, $msgid, $type, $time); - }; - $this->fireCallback($callbackEvent); - } - - function fireMessageReceivedClient( - $phone, - $from, - $msgid, - $type, - $time - ) { - $callbackEvent = function(WhatsAppEventListener $listener) use ($phone, $from, $msgid, $type, $time) { - $listener->onMessageReceivedClient($phone, $from, $msgid, $type, $time); - }; - $this->fireCallback($callbackEvent); - } - - function fireMessageReceivedServer( - $phone, - $from, - $msgid, - $type, - $time - ) { - $callbackEvent = function(WhatsAppEventListener $listener) use ($phone, $from, $msgid, $type, $time) { - $listener->onMessageReceivedServer($phone, $from, $msgid, $type, $time); - }; - $this->fireCallback($callbackEvent); - } - - function firePing( - $phone, - $msgid - ) { - $callbackEvent = function(WhatsAppEventListener $listener) use ($phone, $msgid) { - $listener->onPing($phone, $msgid); - }; - $this->fireCallback($callbackEvent); - } - - function firePresence( - $phone, - $from, - $type - ) { - $callbackEvent = function(WhatsAppEventListener $listener) use ($phone, $from, $type) { - $listener->onPresence($phone, $from, $type); - }; - $this->fireCallback($callbackEvent); - } - - function fireProfilePictureChanged( - $phone, - $from, - $id, - $t - ) { - $callbackEvent = function(WhatsAppEventListener $listener) use ($phone, $from, $id, $t) { - $listener->onProfilePictureChanged($phone, $from, $id, $t); - }; - $this->fireCallback($callbackEvent); - } - - function fireProfilePictureDeleted( - $phone, - $from, - $id, - $t - ) { - $callbackEvent = function(WhatsAppEventListener $listener) use ($phone, $from, $id, $t) { - $listener->onProfilePictureDeleted($phone, $from, $id, $t); - }; - $this->fireCallback($callbackEvent); - } - - function fireSendMessageReceived( - $phone, - $id, - $from, - $type - ) { - $callbackEvent = function(WhatsAppEventListener $listener) use ($phone, $id, $from, $type) { - $listener->onSendMessageReceived($phone, $id, $from, $type); - }; - $this->fireCallback($callbackEvent); - } - - function fireSendPong( - $phone, - $msgid - ) { - $callbackEvent = function(WhatsAppEventListener $listener) use ($phone, $msgid) { - $listener->onSendPong($phone, $msgid); - }; - $this->fireCallback($callbackEvent); - } - - function fireSendMessage( - $phone, - $targets, - $id, - $node - ) { - $callbackEvent = function(WhatsAppEventListener $listener) use ($phone, $targets, $id, $node) { - $listener->onSendMessage($phone, $targets, $id, $node); - }; - $this->fireCallback($callbackEvent); - } - - function fireSendPresence( - $phone, - $type, - $name - ) { - $callbackEvent = function(WhatsAppEventListener $listener) use ($phone, $type, $name) { - $listener->onSendPresence($phone, $type, $name); - }; - $this->fireCallback($callbackEvent); - } - - function fireSendStatusUpdate( - $phone, - $msg - ) { - $callbackEvent = function(WhatsAppEventListener $listener) use ($phone, $msg) { - $listener->onSendStatusUpdate($phone, $msg); - }; - $this->fireCallback($callbackEvent); - } - - function fireStreamError( - $tag - ) { - $callbackEvent = function(WhatsAppEventListener $listener) use ($tag) { - $listener->onStreamError($tag); - }; - $this->fireCallback($callbackEvent); - } - - function fireUploadFile( - $phone, - $name, - $url - ) { - $callbackEvent = function(WhatsAppEventListener $listener) use ($phone, $name, $url) { - $listener->onUploadFile($phone, $name, $url); - }; - $this->fireCallback($callbackEvent); - } - - function fireUploadFileFailed( - $phone, - $name - ) { - $callbackEvent = function(WhatsAppEventListener $listener) use ($phone, $name) { - $listener->onUploadFileFailed($phone, $name); - }; - $this->fireCallback($callbackEvent); - } - - /** - * @param $result SyncResult - */ - function fireGetSyncResult( - $result - ) { - $callbackEvent = function(WhatsAppEventListener $listener) use ($result) { - $listener->onGetSyncResult($result); - }; - $this->fireCallback($callbackEvent); - } - - function fireGetReceipt( - $from, - $id, - $offline, - $retry - ) { - $callbackEvent = function(WhatsAppEventListener $listener) use ($from, $id, $offline, $retry) { - $listener->onGetReceipt($from, $id, $offline, $retry); - }; - $this->fireCallback($callbackEvent); - } - - function firePaidAccount( - $phone, - $author, - $kind, - $status, - $creation, - $expiration - ) { - $callbackEvent = function(WhatsAppEventListener $listener) use ($phone, $author, $kind, $status, $creation, $expiration) { - $listener->onPaidAccount($phone, $author, $kind, $status, $creation, $expiration); - }; - $this->fireCallback($callbackEvent); - } - - function fireGetServicePricing( - $phone, - $price, - $cost, - $currency, - $expiration - ) { - $callbackEvent = function(WhatsAppEventListener $listener) use ($phone, $price, $cost, $currency, $expiration) { - $listener->onGetServicePricing($phone, $price, $cost, $currency, $expiration); - }; - $this->fireCallback($callbackEvent); - } - - function fireGetExtendAccount( - $phone, - $kind, - $status, - $creation, - $expiration - ) { - $callbackEvent = function(WhatsAppEventListener $listener) use ($phone, $kind, $status, $creation, $expiration) { - $listener->onGetExtendAccount($phone, $kind, $status, $creation, $expiration); - }; - $this->fireCallback($callbackEvent); - } - - function fireGetNormalizedJid( - $phone, - $result - ) { - $callbackEvent = function(WhatsAppEventListener $listener) use ($phone, $result) { - $listener->onGetNormalizedJid($phone, $result); - }; - $this->fireCallback($callbackEvent); - } - - function fireGetBroadcastLists( - $phone, - $broadcastLists - ) { - $callbackEvent = function(WhatsAppEventListener $listener) use ($phone, $broadcastLists) { - $listener->onGetBroadcastLists($phone, $broadcastLists); - }; - $this->fireCallback($callbackEvent); - } - -} From 79ec78c2d2318a807092dfdc09fe7ed97c0f28a2 Mon Sep 17 00:00:00 2001 From: Trevor Kimenye Date: Tue, 10 Feb 2015 21:41:09 +0300 Subject: [PATCH 206/436] Added getGroupImage and getGroupVideo --- src/events/AllEvents.php | 2 + src/whatsprot.class.php | 122 +++++++++++++++++++++++++++------------ 2 files changed, 87 insertions(+), 37 deletions(-) diff --git a/src/events/AllEvents.php b/src/events/AllEvents.php index 3f145e6b..bda2fa42 100644 --- a/src/events/AllEvents.php +++ b/src/events/AllEvents.php @@ -66,6 +66,8 @@ public function onGetGroupsInfo( $mynumber, $groupList ){} public function onGetGroupV2Info( $mynumber, $creator, $creation, $subject, $participants, $admin ){} public function onGetGroupsSubject( $mynumber, $group_jid, $time, $author, $name, $subject ){} public function onGetImage( $mynumber, $from, $id, $type, $time, $name, $size, $url, $file, $mimeType, $fileHash, $width, $height, $preview, $caption ){} + public function onGetGroupImage( $mynumber, $from_group_jid, $from_user_jid, $id, $type, $time, $name, $size, $url, $file, $mimeType, $fileHash, $width, $height, $preview, $caption ){} + public function onGetGroupVideo( $mynumber, $from_group_jid, $from_user_jid, $id, $type, $time, $name, $url, $file, $size, $mimeType, $fileHash, $duration, $vcodec, $acodec, $preview, $caption ){} public function onGetKeysLeft( $mynumber, $keysLeft){} public function onGetLocation( $mynumber, $from, $id, $type, $time, $name, $name, $longitude, $latitude, $url, $preview ){} public function onGetMessage( $mynumber, $from, $id, $type, $time, $name, $body ){} diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index 27fd0692..0df23b9a 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -2748,44 +2748,92 @@ protected function processInboundDataNode(ProtocolNode $node, $autoReceipt = tru } if ($node->getAttribute("type") == "media" && $node->getChild('media') != null) { if ($node->getChild("media")->getAttribute('type') == 'image') { - $this->eventManager()->fire("onGetImage", - array( - $this->phoneNumber, - $node->getAttribute('from'), - $node->getAttribute('id'), - $node->getAttribute('type'), - $node->getAttribute('t'), - $node->getAttribute('notify'), - $node->getChild("media")->getAttribute('size'), - $node->getChild("media")->getAttribute('url'), - $node->getChild("media")->getAttribute('file'), - $node->getChild("media")->getAttribute('mimetype'), - $node->getChild("media")->getAttribute('filehash'), - $node->getChild("media")->getAttribute('width'), - $node->getChild("media")->getAttribute('height'), - $node->getChild("media")->getData(), - $node->getChild("media")->getAttribute('caption') - )); + + if ($node->getAttribute("participant") == null) { + $this->eventManager()->fire("onGetImage", + array( + $this->phoneNumber, + $node->getAttribute('from'), + $node->getAttribute('id'), + $node->getAttribute('type'), + $node->getAttribute('t'), + $node->getAttribute('notify'), + $node->getChild("media")->getAttribute('size'), + $node->getChild("media")->getAttribute('url'), + $node->getChild("media")->getAttribute('file'), + $node->getChild("media")->getAttribute('mimetype'), + $node->getChild("media")->getAttribute('filehash'), + $node->getChild("media")->getAttribute('width'), + $node->getChild("media")->getAttribute('height'), + $node->getChild("media")->getData(), + $node->getChild("media")->getAttribute('caption') + )); + } else { + $this->eventManager()->fire("onGetGroupImage", + array( + $this->phoneNumber, + $node->getAttribute('from'), + $node->getAttribute('participant'), + $node->getAttribute('id'), + $node->getAttribute('type'), + $node->getAttribute('t'), + $node->getAttribute('notify'), + $node->getChild("media")->getAttribute('size'), + $node->getChild("media")->getAttribute('url'), + $node->getChild("media")->getAttribute('file'), + $node->getChild("media")->getAttribute('mimetype'), + $node->getChild("media")->getAttribute('filehash'), + $node->getChild("media")->getAttribute('width'), + $node->getChild("media")->getAttribute('height'), + $node->getChild("media")->getData(), + $node->getChild("media")->getAttribute('caption') + )); + } + } elseif ($node->getChild("media")->getAttribute('type') == 'video') { - $this->eventManager()->fire("onGetVideo", - array( - $this->phoneNumber, - $node->getAttribute('from'), - $node->getAttribute('id'), - $node->getAttribute('type'), - $node->getAttribute('t'), - $node->getAttribute('notify'), - $node->getChild("media")->getAttribute('url'), - $node->getChild("media")->getAttribute('file'), - $node->getChild("media")->getAttribute('size'), - $node->getChild("media")->getAttribute('mimetype'), - $node->getChild("media")->getAttribute('filehash'), - $node->getChild("media")->getAttribute('duration'), - $node->getChild("media")->getAttribute('vcodec'), - $node->getChild("media")->getAttribute('acodec'), - $node->getChild("media")->getData(), - $node->getChild("media")->getAttribute('caption') - )); + + if ($node->getAttribute("participant") == null) { + $this->eventManager()->fire("onGetVideo", + array( + $this->phoneNumber, + $node->getAttribute('from'), + $node->getAttribute('id'), + $node->getAttribute('type'), + $node->getAttribute('t'), + $node->getAttribute('notify'), + $node->getChild("media")->getAttribute('url'), + $node->getChild("media")->getAttribute('file'), + $node->getChild("media")->getAttribute('size'), + $node->getChild("media")->getAttribute('mimetype'), + $node->getChild("media")->getAttribute('filehash'), + $node->getChild("media")->getAttribute('duration'), + $node->getChild("media")->getAttribute('vcodec'), + $node->getChild("media")->getAttribute('acodec'), + $node->getChild("media")->getData(), + $node->getChild("media")->getAttribute('caption') + )); + } else { + $this->eventManager()->fire("onGetGroupVideo", + array( + $this->phoneNumber, + $node->getAttribute('from'), + $node->getAttribute('participant'), + $node->getAttribute('id'), + $node->getAttribute('type'), + $node->getAttribute('t'), + $node->getAttribute('notify'), + $node->getChild("media")->getAttribute('url'), + $node->getChild("media")->getAttribute('file'), + $node->getChild("media")->getAttribute('size'), + $node->getChild("media")->getAttribute('mimetype'), + $node->getChild("media")->getAttribute('filehash'), + $node->getChild("media")->getAttribute('duration'), + $node->getChild("media")->getAttribute('vcodec'), + $node->getChild("media")->getAttribute('acodec'), + $node->getChild("media")->getData(), + $node->getChild("media")->getAttribute('caption') + )); + } } elseif ($node->getChild("media")->getAttribute('type') == 'audio') { $this->eventManager()->fire("onGetAudio", array( From bdecbec293ec70226c6b9b884f0c6bdc5901be74 Mon Sep 17 00:00:00 2001 From: mgp25 Date: Tue, 10 Feb 2015 19:45:42 +0100 Subject: [PATCH 207/436] Add emoji for caption in images and videos #368 --- src/whatsprot.class.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index 27fd0692..d40dd040 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -1605,6 +1605,7 @@ public function sendMessageComposing($to) */ public function sendMessageImage($to, $filepath, $storeURLmedia = false, $fsize = 0, $fhash = "", $caption = "") { + $caption = $this->parseMessageForEmojis($caption); if ($fsize==0 || $fhash == "") { $allowedExtensions = array('jpg', 'jpeg', 'gif', 'png'); @@ -1682,6 +1683,7 @@ protected function sendChatState($to, $state) */ public function sendMessageVideo($to, $filepath, $storeURLmedia = false, $fsize = 0, $fhash = "", $caption = "") { + $caption = $this->parseMessageForEmojis($caption); if ($fsize==0 || $fhash == "") { $allowedExtensions = array('3gp', 'mp4', 'mov', 'avi'); From 5ab80ec90e15b5440b82126bb024a2b388e4e879 Mon Sep 17 00:00:00 2001 From: derpue Date: Wed, 11 Feb 2015 15:16:42 +0100 Subject: [PATCH 208/436] let connect() always return a boolean status removing small inconsistency with return value --- src/whatsprot.class.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index d40dd040..c07e16b2 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -451,6 +451,7 @@ public function codeRequest($method = 'sms', $carrier = "T-Mobile5", $countryCod /** * Connect (create a socket) to the WhatsApp network. + * @return bool */ public function connect() { @@ -460,8 +461,7 @@ public function connect() //http://ie2.php.net/manual/en/function.socket-read.php#115903 //https://bugs.php.net/bug.php?id=47918 //http://stackoverflow.com/questions/20334366/php-fsockopen-how-to-know-if-connection-is-alive - if ($this->isConnected()) - { + if ($this->isConnected()) { return true; } @@ -499,7 +499,7 @@ public function connect() $this->socket ) ); - + return true; } else { if ($this->debug) { print_r("Firing onConnectError\n"); @@ -510,6 +510,7 @@ public function connect() $this->socket ) ); + return false; } } From 96964daa868e70cf5c772149e372738ec453d337 Mon Sep 17 00:00:00 2001 From: mgp25 Date: Sun, 15 Feb 2015 15:36:56 +0100 Subject: [PATCH 209/436] Update exampleFunctional.php --- examples/exampleFunctional.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/exampleFunctional.php b/examples/exampleFunctional.php index bcecdf4f..ca57caf4 100755 --- a/examples/exampleFunctional.php +++ b/examples/exampleFunctional.php @@ -13,8 +13,8 @@ ///////////////////////CONFIGURATION/////////////////////// ////////////////////////////////////////////////////////// $username = "**your phone number**"; // Telephone number including the country code without '+' or '00'. -$password = "**server generated whatsapp password**"; // A server generated Password you received from WhatsApp. This can NOT be manually created -$identity = "**unique ID generated by WhatsApp client**"; // Obtained during registration with this API or using MissVenom (https://github.com/shirioko/MissVenom) to sniff from your phone. +$password = "**server generated whatsapp password**"; // Use registerTool.php or exampleRegister.php to obtain your password +$identity = "myIdentity"; // Name of the file where the identity will be stored. In this exaple, a file called myIdentity.dat will be created $nickname = "**your nickname**"; // This is the username (or nickname) displayed by WhatsApp clients. $target = "**contact's phone number**"; // Destination telephone number including the country code without '+' or '00'. $debug = false; // Set this to true, to see debug mode. From af92b60e6453b3704e0c89513ce604d6b26a794f Mon Sep 17 00:00:00 2001 From: mgp25 Date: Sun, 15 Feb 2015 15:38:37 +0100 Subject: [PATCH 210/436] Update exampleRegister.php --- examples/exampleRegister.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/exampleRegister.php b/examples/exampleRegister.php index f7122800..eff2ad91 100755 --- a/examples/exampleRegister.php +++ b/examples/exampleRegister.php @@ -17,7 +17,7 @@ $debug = true; $username = '34666554433'; // Telephone number including the country code without '+' or '00'. -$identity = 'e807f1fcf82d132f9bb018ca6738a19f'; // Obtained during registration with this API or using MissVenom (https://github.com/shirioko/MissVenom) to sniff from your phone. +$identity = 'myIdentity'; // Name of the file where the identity will be stored. In this exaple, a file called myIdentity.dat will be created $nickname = 'John Doe'; // This is the username displayed by WhatsApp clients. From b704a9e246244623122688216f82d6a083a8d0e3 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 16 Feb 2015 12:53:02 +0100 Subject: [PATCH 211/436] adding GroupMembers to onGroupIsCreated Event --- src/events/AllEvents.php | 2 +- src/whatsprot.class.php | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/events/AllEvents.php b/src/events/AllEvents.php index 3f145e6b..327a14f7 100644 --- a/src/events/AllEvents.php +++ b/src/events/AllEvents.php @@ -81,7 +81,7 @@ public function onGetSyncResult( $result ){} public function onGetVideo( $mynumber, $from, $id, $type, $time, $name, $url, $file, $size, $mimeType, $fileHash, $duration, $vcodec, $acodec, $preview, $caption ){} public function onGetvCard( $mynumber, $from, $id, $type, $time, $name, $vcardname, $vcard ){} public function onGroupCreate( $mynumber, $groupId ){} - public function onGroupisCreated( $mynumber, $creator, $gid, $subject, $admin, $creation ){} + public function onGroupisCreated( $mynumber, $creator, $gid, $subject, $admin, $creation, $members = array()){} public function onGroupsChatCreate( $mynumber, $gid ){} public function onGroupsChatEnd( $mynumber, $gid ){} public function onGroupsParticipantsAdd( $mynumber, $groupId, $jid ){} diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index d40dd040..1fd2997e 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -3301,6 +3301,10 @@ protected function processInboundDataNode(ProtocolNode $node, $autoReceipt = tru )); } else if ($node->hasChild('create')) { + $groupMembers = array(); + foreach ($node->getChild(0)->getChild(0)->getChildren() AS $cn) { + $groupMembers[] = $cn->getAttribute('jid'); + } $this->eventManager()->fire("onGroupisCreated", array( $this->phoneNumber, @@ -3308,7 +3312,8 @@ protected function processInboundDataNode(ProtocolNode $node, $autoReceipt = tru $node->getChild(0)->getChild(0)->getAttribute('id'), $node->getChild(0)->getChild(0)->getAttribute('subject'), $node->getAttribute('participant'), - $node->getChild(0)->getChild(0)->getAttribute('creation') + $node->getChild(0)->getChild(0)->getAttribute('creation'), + $groupMembers )); } else if ($node->hasChild('subject')) { From 602be31d39dddcdf268bfeb157ab1ed2c7c9f2f2 Mon Sep 17 00:00:00 2001 From: mgp25 Date: Mon, 16 Feb 2015 14:25:40 +0100 Subject: [PATCH 212/436] read Receipt on group messages --- src/whatsprot.class.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index 28fba0cf..ce955881 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -2732,6 +2732,7 @@ protected function processInboundDataNode(ProtocolNode $node, $autoReceipt = tru $node->getAttribute('id'), $node->getAttribute('type'), $node->getAttribute('t'), + $node->getAttribute('participant'), $node->getAttribute("notify"), $node->getChild("body")->getData() )); @@ -2739,7 +2740,7 @@ protected function processInboundDataNode(ProtocolNode $node, $autoReceipt = tru if($autoReceipt) { - $this->sendMessageReceived($node, $type); + $this->sendMessageReceived($node, $type, $node->getAttribute('participant')); } } if ($node->getAttribute("type") == "text" && $node->getChild(0)->getTag() == 'enc') { @@ -3893,14 +3894,14 @@ protected function sendMessageNode($to, $node, $id = null) * @param ProtocolNode $msg The ProtocolTreeNode that contains the message. * @param null $type */ - protected function sendMessageReceived($msg, $type = "read") + protected function sendMessageReceived($msg, $type = "read", $participant = null) { $messageHash = array(); if($type == "read") - { $messageHash["type"] = $type; - } + if($participant != null) + $messageHash["participant"] = $participant; $messageHash["to"] = $msg->getAttribute("from"); $messageHash["id"] = $msg->getAttribute("id"); $messageHash["t"] = time(); From 4cc7c5954a2ea45a701cb41b2cc54db46df7e621 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 17 Feb 2015 09:49:27 +0100 Subject: [PATCH 213/436] adding missing Participant (Author in Group) to Audio-, Location- and vCard MessageEvents --- src/events/AllEvents.php | 6 +++--- src/whatsprot.class.php | 12 +++++++++--- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/src/events/AllEvents.php b/src/events/AllEvents.php index 26273bfb..0a73cd43 100644 --- a/src/events/AllEvents.php +++ b/src/events/AllEvents.php @@ -54,7 +54,7 @@ public function onCredentialsGood( $mynumber, $login, $password, $type, $expirat public function onDisconnect( $mynumber, $socket ) {} public function onDissectPhone( $mynumber, $phonecountry, $phonecc, $phone, $phonemcc, $phoneISO3166, $phoneISO639, $phonemnc ) {} public function onDissectPhoneFailed( $mynumber ){} - public function onGetAudio( $mynumber, $from, $id, $type, $time, $name, $size, $url, $file, $mimeType, $fileHash, $duration, $acodec ){} + public function onGetAudio( $mynumber, $from, $id, $type, $time, $name, $size, $url, $file, $mimeType, $fileHash, $duration, $acodec, $fromJID_ifGroup = null){} public function onGetBroadcastLists( $mynumber, $broadcastLists ){} public function onGetError( $mynumber, $from, $id, $data ){} public function onGetExtendAccount( $mynumber, $kind, $status, $creation, $expiration ){} @@ -69,7 +69,7 @@ public function onGetImage( $mynumber, $from, $id, $type, $time, $name, $size, $ public function onGetGroupImage( $mynumber, $from_group_jid, $from_user_jid, $id, $type, $time, $name, $size, $url, $file, $mimeType, $fileHash, $width, $height, $preview, $caption ){} public function onGetGroupVideo( $mynumber, $from_group_jid, $from_user_jid, $id, $type, $time, $name, $url, $file, $size, $mimeType, $fileHash, $duration, $vcodec, $acodec, $preview, $caption ){} public function onGetKeysLeft( $mynumber, $keysLeft){} - public function onGetLocation( $mynumber, $from, $id, $type, $time, $name, $name, $longitude, $latitude, $url, $preview ){} + public function onGetLocation( $mynumber, $from, $id, $type, $time, $name, $name, $longitude, $latitude, $url, $preview, $fromJID_ifGroup = null){} public function onGetMessage( $mynumber, $from, $id, $type, $time, $name, $body ){} public function onGetNormalizedJid( $mynumber, $data ){} public function onGetPrivacyBlockedList( $mynumber, $data ){} @@ -81,7 +81,7 @@ public function onGetServicePricing( $mynumber, $price, $cost, $currency, $expir public function onGetStatus( $mynumber, $from, $requested, $id, $time, $data ){} public function onGetSyncResult( $result ){} public function onGetVideo( $mynumber, $from, $id, $type, $time, $name, $url, $file, $size, $mimeType, $fileHash, $duration, $vcodec, $acodec, $preview, $caption ){} - public function onGetvCard( $mynumber, $from, $id, $type, $time, $name, $vcardname, $vcard ){} + public function onGetvCard( $mynumber, $from, $id, $type, $time, $name, $vcardname, $vcard, $fromJID_ifGroup = null){} public function onGroupCreate( $mynumber, $groupId ){} public function onGroupisCreated( $mynumber, $creator, $gid, $subject, $admin, $creation, $members = array()){} public function onGroupsChatCreate( $mynumber, $gid ){} diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index ce955881..0bdee9b7 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -2839,6 +2839,7 @@ protected function processInboundDataNode(ProtocolNode $node, $autoReceipt = tru )); } } elseif ($node->getChild("media")->getAttribute('type') == 'audio') { + $author = $node->getAttribute("participant"); $this->eventManager()->fire("onGetAudio", array( $this->phoneNumber, @@ -2853,7 +2854,8 @@ protected function processInboundDataNode(ProtocolNode $node, $autoReceipt = tru $node->getChild("media")->getAttribute('mimetype'), $node->getChild("media")->getAttribute('filehash'), $node->getChild("media")->getAttribute('seconds'), - $node->getChild("media")->getAttribute('acodec') + $node->getChild("media")->getAttribute('acodec'), + $author, )); } elseif ($node->getChild("media")->getAttribute('type') == 'vcard') { if($node->getChild("media")->hasChild('vcard')) { @@ -2863,6 +2865,7 @@ protected function processInboundDataNode(ProtocolNode $node, $autoReceipt = tru $name = "NO_NAME"; $data = $node->getChild("media")->getData(); } + $author = $node->getAttribute("participant"); $this->eventManager()->fire("onGetvCard", array( @@ -2873,11 +2876,13 @@ protected function processInboundDataNode(ProtocolNode $node, $autoReceipt = tru $node->getAttribute('t'), $node->getAttribute('notify'), $name, - $data + $data, + $author )); } elseif ($node->getChild("media")->getAttribute('type') == 'location') { $url = $node->getChild("media")->getAttribute('url'); $name = $node->getChild("media")->getAttribute('name'); + $author = $node->getAttribute("participant"); $this->eventManager()->fire("onGetLocation", array( @@ -2891,7 +2896,8 @@ protected function processInboundDataNode(ProtocolNode $node, $autoReceipt = tru $node->getChild("media")->getAttribute('longitude'), $node->getChild("media")->getAttribute('latitude'), $url, - $node->getChild("media")->getData() + $node->getChild("media")->getData(), + $author )); } From c4daff92bebc70ec91f82aa0480262cbbf3f8351 Mon Sep 17 00:00:00 2001 From: derpue Date: Tue, 17 Feb 2015 11:46:29 +0100 Subject: [PATCH 214/436] Fixes #389 --- src/whatsprot.class.php | 1 - 1 file changed, 1 deletion(-) diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index ce955881..67382ed1 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -2732,7 +2732,6 @@ protected function processInboundDataNode(ProtocolNode $node, $autoReceipt = tru $node->getAttribute('id'), $node->getAttribute('type'), $node->getAttribute('t'), - $node->getAttribute('participant'), $node->getAttribute("notify"), $node->getChild("body")->getData() )); From afb1db3cebf631241186458f444f4e071ea456be Mon Sep 17 00:00:00 2001 From: mgp25 Date: Tue, 17 Feb 2015 14:08:38 +0100 Subject: [PATCH 215/436] update group read receipt --- src/whatsprot.class.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index fe1ec7d9..6118679d 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -2739,7 +2739,7 @@ protected function processInboundDataNode(ProtocolNode $node, $autoReceipt = tru if($autoReceipt) { - $this->sendMessageReceived($node, $type, $node->getAttribute('participant')); + $this->sendMessageReceived($node, $type, $author); } } if ($node->getAttribute("type") == "text" && $node->getChild(0)->getTag() == 'enc') { @@ -2756,7 +2756,7 @@ protected function processInboundDataNode(ProtocolNode $node, $autoReceipt = tru $this->eventManager()->fire("onGetImage", array( $this->phoneNumber, - $node->getAttribute('from'), + $node->getAttribute('from'), $node->getAttribute('id'), $node->getAttribute('type'), $node->getAttribute('t'), @@ -2770,12 +2770,12 @@ protected function processInboundDataNode(ProtocolNode $node, $autoReceipt = tru $node->getChild("media")->getAttribute('height'), $node->getChild("media")->getData(), $node->getChild("media")->getAttribute('caption') - )); + )); } else { $this->eventManager()->fire("onGetGroupImage", array( $this->phoneNumber, - $node->getAttribute('from'), + $node->getAttribute('from'), $node->getAttribute('participant'), $node->getAttribute('id'), $node->getAttribute('type'), @@ -2792,9 +2792,9 @@ protected function processInboundDataNode(ProtocolNode $node, $autoReceipt = tru $node->getChild("media")->getAttribute('caption') )); } - + } elseif ($node->getChild("media")->getAttribute('type') == 'video') { - + if ($node->getAttribute("participant") == null) { $this->eventManager()->fire("onGetVideo", array( From 35bda846ab4aaa031d0263b505ef8471b58c2d57 Mon Sep 17 00:00:00 2001 From: mgp25 Date: Thu, 19 Feb 2015 20:44:22 +0100 Subject: [PATCH 216/436] fixes #395 --- src/whatsprot.class.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index 6118679d..ebb5146e 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -3804,7 +3804,13 @@ protected function sendData($data) { if($this->socket != null) { - socket_write($this->socket, $data, strlen($data)); + if (socket_write($this->socket, $data, strlen($data)) === false) + { + + $this->disconnect(); + throw new ConnectionException('Connection Closed!'); + + } } } From 3e6d3252ecbed7cb15d22e09bc0698f24c0f15ee Mon Sep 17 00:00:00 2001 From: Siki Fn Date: Sat, 21 Feb 2015 09:28:45 +0200 Subject: [PATCH 217/436] Fix AjaxDemo --- examples/ajaxDemo/socket.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/ajaxDemo/socket.php b/examples/ajaxDemo/socket.php index 08046217..bb19da94 100755 --- a/examples/ajaxDemo/socket.php +++ b/examples/ajaxDemo/socket.php @@ -75,7 +75,7 @@ function onGetImage($mynumber, $from, $id, $type, $t, $name, $size, $url, $file, session_write_close(); } -require_once '../whatsprot.class.php'; +require_once '../../src/whatsprot.class.php'; $target = @$_POST["target"]; $username = "************"; $password = "******************************"; From 36fa98c6644f55b8843609934f5f5a68952d46a5 Mon Sep 17 00:00:00 2001 From: mgp25 Date: Sat, 21 Feb 2015 10:25:29 +0100 Subject: [PATCH 218/436] initial format PSR-1/PSR-2 standard --- src/whatsprot.class.php | 1451 +++++++++++++++++++++------------------ 1 file changed, 795 insertions(+), 656 deletions(-) diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index ebb5146e..568744cb 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -75,11 +75,11 @@ class WhatsProt protected $outQueue = array(); // Queue for outgoing messages. protected $password; // The user password. protected $phoneNumber; // The user phone number including the country code without '+' or '00'. - public $reader; // An instance of the BinaryTreeNodeReader class. protected $serverReceivedId; // Confirm that the *server* has received your command. protected $socket; // A socket to connect to the WhatsApp network. protected $writer; // An instance of the BinaryTreeNodeWriter class. protected $messageStore; + public $reader; // An instance of the BinaryTreeNodeReader class. /** * Default class constructor. @@ -100,6 +100,7 @@ public function __construct($number, $identity, $nickname, $debug = false) $this->reader = new BinTreeNodeReader(); $this->debug = $debug; $this->phoneNumber = $number; + if (!$this->checkIdentity($identity)) { //compute identity with pseudo_random_bytes $this->identity = $this->buildIdentity($identity); @@ -107,8 +108,8 @@ public function __construct($number, $identity, $nickname, $debug = false) //use provided identity hash $this->identity = urldecode(file_get_contents($identity.'.dat')); } - $this->name = $nickname; - $this->loginStatus = static::DISCONNECTED_STATUS; + $this->name = $nickname; + $this->loginStatus = static::DISCONNECTED_STATUS; $this->eventManager = new WhatsApiEventsManager(); } @@ -117,7 +118,8 @@ public function __construct($number, $identity, $nickname, $debug = false) * * @param string $filename */ - public function setChallengeName($filename){ + public function setChallengeName($filename) + { $this->challengeFilename = $filename; } @@ -159,7 +161,7 @@ public function checkCredentials() } $countryCode = null; - $langCode = null; + $langCode = null; if ($countryCode == null && $phone['ISO3166'] != '') { $countryCode = $phone['ISO3166']; @@ -181,7 +183,7 @@ public function checkCredentials() } // Build the url. - $host = 'https://' . static::WHATSAPP_CHECK_HOST; + $host = 'https://' . static::WHATSAPP_CHECK_HOST; $query = array( 'cc' => $phone['cc'], 'in' => $phone['phone'], @@ -252,7 +254,7 @@ public function codeRegister($code) } $countryCode = null; - $langCode = null; + $langCode = null; if ($countryCode == null && $phone['ISO3166'] != '') { $countryCode = $phone['ISO3166']; @@ -641,26 +643,28 @@ public function sendActiveStatus() $this->sendNode($messageNode); } - /** - * Send a request to get cipher keys from an user - * - * @param $number - * Phone number of the user you want to get the cipher keys. - */ + /** + * Send a request to get cipher keys from an user + * + * @param $number + * Phone number of the user you want to get the cipher keys. + */ public function sendGetCipherKeysFromUser($number) { $msgId = $this->createMsgId("cipher_keys_"); - $userNode = new ProtocolNode("user", array( - "jid" => $this->getJID($number) - ), null, null); + $userNode = new ProtocolNode("user", + array( + "jid" => $this->getJID($number) + ), null, null); $keyNode = new ProtocolNode("key", null, array($userNode), null); - $node = new ProtocolNode("iq", array( - "id" => $msgId, - "xmlns" => "encrypt", - "type" => "get", - "to" => static::WHATSAPP_SERVER - ), array($keyNode), null); + $node = new ProtocolNode("iq", + array( + "id" => $msgId, + "xmlns" => "encrypt", + "type" => "get", + "to" => static::WHATSAPP_SERVER + ), array($keyNode), null); $this->sendNode($node); } @@ -729,8 +733,6 @@ public function sendBroadcastImage($targets, $path, $storeURLmedia = false, $fsi * @param string $name (Optional) A name to describe the location * @param string $url (Optional) A URL to link location to web resource */ - - public function sendBroadcastLocation($targets, $long, $lat, $name = null, $url = null) { if (!is_array($targets)) { @@ -752,7 +754,7 @@ public function sendBroadcastLocation($targets, $long, $lat, $name = null, $url */ public function sendBroadcastMessage($targets, $message) { - $message = $this->parseMessageForEmojis($message); + $message = $this->parseMessageForEmojis($message); $bodyNode = new ProtocolNode("body", null, null, $message); $this->sendBroadcast($targets, $bodyNode, "text"); } @@ -800,12 +802,13 @@ public function sendDeleteBroadcastLists($lists) $listNode = null; } $deleteNode = new ProtocolNode("delete", null, $listNode, null); - $node = new ProtocolNode("iq", array( - "id" => $msgId, - "xmlns" => "w:b", - "type" => "set", - "to" => "s.whatsapp.net" - ), array($deleteNode), null); + $node = new ProtocolNode("iq", + array( + "id" => $msgId, + "xmlns" => "w:b", + "type" => "set", + "to" => "s.whatsapp.net" + ), array($deleteNode), null); $this->sendNode($node); } @@ -824,12 +827,14 @@ protected function sendClearDirty($categories) $catnode = new ProtocolNode("clean", array("type" => $category), null, null); $catnodes[] = $catnode; } - $node = new ProtocolNode("iq", array( - "id" => $msgId, - "type" => "set", - "to" => "s.whatsapp.net", - "xmlns" => "urn:xmpp:whatsapp:dirty" - ), $catnodes, null); + $node = new ProtocolNode("iq", + array( + "id" => $msgId, + "type" => "set", + "to" => "s.whatsapp.net", + "xmlns" => "urn:xmpp:whatsapp:dirty" + ), $catnodes, null); + $this->sendNode($node); } @@ -841,7 +846,14 @@ public function sendClientConfig() $attr["platform"] = static::WHATSAPP_DEVICE; $attr["version"] = static::WHATSAPP_VER; $child = new ProtocolNode("config", $attr, null, ""); - $node = new ProtocolNode("iq", array("id" => $this->createMsgId("config"), "type" => "set", "xmlns" => "urn:xmpp:whatsapp:push", "to" => static::WHATSAPP_SERVER), array($child), null); + $node = new ProtocolNode("iq", + array( + "id" => $this->createMsgId("config"), + "type" => "set", + "xmlns" => "urn:xmpp:whatsapp:push", + "to" => static::WHATSAPP_SERVER + ), array($child), null); + $this->sendNode($node); } @@ -849,22 +861,24 @@ public function sendGetClientConfig() { $msgId = $this->createMsgId("sendconfig"); $child = new ProtocolNode("config", null, null, null); - $node = new ProtocolNode("iq", array( - "id" => $msgId, - "xmlns" => "urn:xmpp:whatsapp:push", - "type" => "get", - "to" => static::WHATSAPP_SERVER - ), array($child), null); + $node = new ProtocolNode("iq", + array( + "id" => $msgId, + "xmlns" => "urn:xmpp:whatsapp:push", + "type" => "get", + "to" => static::WHATSAPP_SERVER + ), array($child), null); + $this->sendNode($node); $this->waitForServer($msgId); } - /** - * Transfer your number to new one - * - * @param string $number - * @param string $identity - */ + /** + * Transfer your number to new one + * + * @param string $number + * @param string $identity + */ public function sendChangeNumber($number, $identity) { $msgId = $this->createMsgId("change_number"); @@ -874,12 +888,13 @@ public function sendChangeNumber($number, $identity) $modifyNode = new ProtocolNode("modify", null, array($usernameNode, $passwordNode), null); - $iqNode = new ProtocolNode("iq", array( - "xmlns" => "urn:xmpp:whatsapp:account", - "id" => $msgId, - "type" => "get", - "to" => "c.us" - ), array($modifyNode), null); + $iqNode = new ProtocolNode("iq", + array( + "xmlns" => "urn:xmpp:whatsapp:account", + "id" => $msgId, + "type" => "get", + "to" => "c.us" + ), array($modifyNode), null); $this->sendNode($iqNode); } @@ -895,23 +910,28 @@ public function sendGetGroups() $this->sendGetGroupsFiltered("participating"); } - /** - * Send a request to get new Groups V2 info - * - * @param $groupID - * The group JID - */ + /** + * Send a request to get new Groups V2 info + * + * @param $groupID + * The group JID + */ public function sendGetGroupV2Info($groupID) { $msgId = $this->createMsgId("get_groupv2_info"); - $queryNode = new ProtocolNode("query", array("request" => "interactive"), null, null); - $node = new ProtocolNode("iq", array( - "id" => $msgId, - "xmlns" => "w:g2", - "type" => "get", - "to" => $this->getJID($groupID) - ), array($queryNode), null); + $queryNode = new ProtocolNode("query", + array( + "request" => "interactive" + ),null, null); + + $node = new ProtocolNode("iq", + array( + "id" => $msgId, + "xmlns" => "w:g2", + "type" => "get", + "to" => $this->getJID($groupID) + ), array($queryNode), null); $this->sendNode($node); } @@ -933,15 +953,19 @@ public function sendGetGroupsOwning() public function sendGetPrivacyBlockedList() { $msgId = $this->createMsgId("getprivacy"); - $child = new ProtocolNode("list", array( - "name" => "default" - ), null, null); + $child = new ProtocolNode("list", + array( + "name" => "default" + ), null, null); + $child2 = new ProtocolNode("query", array(), array($child), null); - $node = new ProtocolNode("iq", array( - "id" => $msgId, - "xmlns" => "jabber:iq:privacy", - "type" => "get" - ), array($child2), null); + $node = new ProtocolNode("iq", + array( + "id" => $msgId, + "xmlns" => "jabber:iq:privacy", + "type" => "get" + ), array($child2), null); + $this->sendNode($node); $this->waitForServer($msgId); } @@ -953,40 +977,44 @@ public function sendGetPrivacySettings() { $msgId = $this->createMsgId("get_privacy_settings_"); $privacyNode = new ProtocolNode("privacy", null, null, null); - $node = new ProtocolNode("iq", array( - "to" => static::WHATSAPP_SERVER, - "id" => $msgId, - "xmlns" => "privacy", - "type" => "get" - ), array($privacyNode), null); + $node = new ProtocolNode("iq", + array( + "to" => static::WHATSAPP_SERVER, + "id" => $msgId, + "xmlns" => "privacy", + "type" => "get" + ), array($privacyNode), null); $this->sendNode($node); $this->waitForServer($msgId); } - /** - * Set privacy of 'last seen', status or profile picture - * to All, contacts or none - * - * @param string $category - * Options: 'last', 'status' or 'profile' - * @param string $value - * Options: 'all', 'contacts' or 'none' - */ + /** + * Set privacy of 'last seen', status or profile picture + * to All, contacts or none + * + * @param string $category + * Options: 'last', 'status' or 'profile' + * @param string $value + * Options: 'all', 'contacts' or 'none' + */ public function sendSetPrivacySettings($category, $value) { $msgId = $this->createMsgId("send_privacy_settings_"); - $categoryNode = new ProtocolNode("category", array( - "name" => $category, - "value" => $value - ), null, null); + $categoryNode = new ProtocolNode("category", + array( + "name" => $category, + "value" => $value + ), null, null); + $privacyNode = new ProtocolNode("privacy", null, array($categoryNode), null); - $node = new ProtocolNode("iq", array( - "to" => static::WHATSAPP_SERVER, - "type" => "set", - "id" => $msgId, - "xmlns" => "privacy" - ), array($privacyNode), null); + $node = new ProtocolNode("iq", + array( + "to" => static::WHATSAPP_SERVER, + "type" => "set", + "id" => $msgId, + "xmlns" => "privacy" + ), array($privacyNode), null); $this->sendNode($node); $this->waitForServer($msgId); @@ -1003,6 +1031,8 @@ public function sendSetPrivacySettings($category, $value) */ public function sendGetProfilePicture($number, $large = false) { + $msgId = $this->createMsgId("getpicture"); + $hash = array(); $hash["type"] = "image"; if (!$large) { @@ -1010,25 +1040,27 @@ public function sendGetProfilePicture($number, $large = false) } $picture = new ProtocolNode("picture", $hash, null, null); - $hash = array(); - $hash["id"] = $this->createMsgId("getpicture"); - $hash["type"] = "get"; - $hash["xmlns"] = "w:profile:picture"; - $hash["to"] = $this->getJID($number); - $node = new ProtocolNode("iq", $hash, array($picture), null); + $node = new ProtocolNode("iq", + array( + "id" => $msgId, + "type" => "get", + "xmlns" => "w:profile:picture", + "to" => $this->getJID($number) + ), array($picture), null); + $this->sendNode($node); - $this->waitForServer($hash["id"]); + $this->waitForServer($msgId); } - /** - * - * @param string array $numbers - * Numbers of your contacts - */ + /** + * + * @param string array $numbers + * Numbers of your contacts + */ public function sendGetProfilePhotoIds($numbers) { - if(!is_array($numbers)) + if (!is_array($numbers)) { $numbers = array($numbers); } @@ -1038,21 +1070,25 @@ public function sendGetProfilePhotoIds($numbers) $i = 0; for($i; $i $this->getJID($numbers[$i])), null, null); + $userNode[$i] = new ProtocolNode("user", + array( + "jid" => $this->getJID($numbers[$i]) + ), null, null); } $listNode = new ProtocolNode("list", null, $userNode, null); - $iqNode = new ProtocolNode("iq", array( - "id" => $msgId, - "xmlns" => "w:profile:picture", - "type" => "get" + $iqNode = new ProtocolNode("iq", + array( + "id" => $msgId, + "xmlns" => "w:profile:picture", + "type" => "get" ), array($listNode), null); $this->sendNode($iqNode); } - /** + /** * Request to retrieve the last online time of specific user. * * @param string $to @@ -1060,201 +1096,225 @@ public function sendGetProfilePhotoIds($numbers) */ public function sendGetRequestLastSeen($to) { + $msgId = $this->createMsgId("lastseen"); + $queryNode = new ProtocolNode("query", null, null, null); - $messageHash = array(); - $messageHash["to"] = $this->getJID($to); - $messageHash["type"] = "get"; - $messageHash["id"] = $this->createMsgId("lastseen"); - $messageHash["xmlns"] = "jabber:iq:last"; + $messageNode = new ProtocolNode("iq", + array( + "to" => $this->getJID($to), + "type" => "get", + "id" => $msgId, + "xmlns" => "jabber:iq:last" + ), array($queryNode), ""); - $messageNode = new ProtocolNode("iq", $messageHash, array($queryNode), ""); $this->sendNode($messageNode); - $this->waitForServer($messageHash["id"]); + $this->waitForServer($msgId); } - /** + /** * Send a request to get the current server properties */ public function sendGetServerProperties() { $id = $this->createMsgId("getproperties"); $child = new ProtocolNode("props", null, null, null); - $node = new ProtocolNode("iq", array( - "id" => $id, - "type" => "get", - "xmlns" => "w", - "to" => "s.whatsapp.net" - ), array($child), null); + $node = new ProtocolNode("iq", + array( + "id" => $id, + "type" => "get", + "xmlns" => "w", + "to" => "s.whatsapp.net" + + ), array($child), null); + $this->sendNode($node); } - /** - * Send a request to get the current service pricing - * - * @param string $lg - * Language - * @param string $lc - * Country - */ - public function sendGetServicePricing($lg, $lc) - { - $msgId = $this->createMsgId("get_service_pricing_"); - $pricingNode = new ProtocolNode("pricing", array( - "lg" => $lg, - "lc" => $lc - ), null, null); - $node = new ProtocolNode("iq", array( - "id" => $msgId, - "xmlns" => "urn:xmpp:whatsapp:account", - "type" => "get", - "to" => "s.whatsapp.net" - ), array($pricingNode), null); - $this->sendNode($node); - } - - /** - * Send a request to extend the account - */ - public function sendExtendAccount() - { - $msgId = $this->createMsgId("extend_account_"); - $extendingNode = new ProtocolNode("extend", null, null, null); - $node = new ProtocolNode("iq", array( - "id" => $msgId, - "xmlns" => "urn:xmpp:whatsapp:account", - "type" => "set", - "to" => "s.whatsapp.net" - ), array($extendingNode), null); - $this->sendNode($node); - } - - /** - * Gets all the broadcast lists for an account - */ - public function sendGetBroadcastLists() - { - $msgId = $this->createMsgId("get_lists_"); - $listsNode = new ProtocolNode("lists", null, null, null); - $node = new ProtocolNode("iq", array( - "id" => $msgId, - "xmlns" => "w:b", - "type" => "get", - "to" => "s.whatsapp.net" - ), array($listsNode), null); - $this->sendNode($node); - } - - /** - * Send a request to get the normalized mobile number respresenting the JID - * - * @param string $countryCode - * Contry Code - * @param string $number - * Mobile Number - */ - public function sendGetNormalizedJid($countryCode, $number) - { - $msgId = $this->createMsgId("get_normalized_jid_"); - $ccNode = new ProtocolNode("cc", null, null, $countryCode); - $inNode = new ProtocolNode("in", null, null, $number); - $normalizeNode = new ProtocolNode("normalize", null, array($ccNode, $inNode), null); - $node = new ProtocolNode("iq", array( - "id" => $msgId, - "xmlns" => "urn:xmpp:whatsapp:account", - "type" => "get", - "to" => "s.whatsapp.net" - ), array($normalizeNode), null); - $this->sendNode($node); - } - - /** - * Removes an account from WhatsApp - * - * @param string $lg - * Language - * @param string $lc - * Country - * @param string $feedback - * User Feedback - */ - public function sendRemoveAccount($lg = null, $lc = null, $feedback = null) - { - $msgId = $this->createMsgId("removeaccount_"); - if($feedback != null && strlen($feedback) > 0) - { - if($lg == null) { - $lg = ""; - } - - if($lc == null) { - $lc = ""; - } + /** + * Send a request to get the current service pricing + * + * @param string $lg + * Language + * @param string $lc + * Country + */ + public function sendGetServicePricing($lg, $lc) + { + + $msgId = $this->createMsgId("get_service_pricing_"); + $pricingNode = new ProtocolNode("pricing", + array( + "lg" => $lg, + "lc" => $lc + ), null, null); + $node = new ProtocolNode("iq", + array( + "id" => $msgId, + "xmlns" => "urn:xmpp:whatsapp:account", + "type" => "get", + "to" => "s.whatsapp.net" + ), array($pricingNode), null); - $child = new ProtocolNode("body", array( - "lg" => $lg, - "lc" => $lc - ), null, $feedback); - $childNode = array($child); - }else{ - $childNode = null; + $this->sendNode($node); } - $removeNode = new ProtocolNode("remove", null, $childNode, null); - $node = new ProtocolNode("iq", array( - "to" => "s.whatsapp.net", - "xmlns" => "urn:xmpp:whatsapp:account", - "type" => "get", - "id" => $msgId - ), array($removeNode), null); + /** + * Send a request to extend the account + */ + public function sendExtendAccount() + { - $this->sendNode($node); - } - - /** - * Send a ping to the server - */ - public function sendPing() - { - $msgId = $this->createMsgId("ping_"); - $pingNode = new ProtocolNode("ping", null, null, null); - $node = new ProtocolNode("iq", array( - "id" => $msgId, - "xmlns" => "w:p", - "type" => "get", - "to" => "s.whatsapp.net" - ), array($pingNode), null); - $this->sendNode($node); - } + $msgId = $this->createMsgId("extend_account_"); + $extendingNode = new ProtocolNode("extend", null, null, null); + $node = new ProtocolNode("iq", + array( + "id" => $msgId, + "xmlns" => "urn:xmpp:whatsapp:account", + "type" => "set", + "to" => "s.whatsapp.net" + ), array($extendingNode), null); + + $this->sendNode($node); + } - /** - * Get voip info. of a number/s - * - * @param string $jids - */ - public function sendGetHasVoipEnabled($jids) - { - $msgId = $this->createMsgId("voip_"); + /** + * Gets all the broadcast lists for an account + */ + public function sendGetBroadcastLists() + { + $msgId = $this->createMsgId("get_lists_"); + $listsNode = new ProtocolNode("lists", null, null, null); + $node = new ProtocolNode("iq", + array( + "id" => $msgId, + "xmlns" => "w:b", + "type" => "get", + "to" => "s.whatsapp.net" + ), array($listsNode), null); + + $this->sendNode($node); + } + + /** + * Send a request to get the normalized mobile number respresenting the JID + * + * @param string $countryCode + * Contry Code + * @param string $number + * Mobile Number + */ + public function sendGetNormalizedJid($countryCode, $number) + { + $msgId = $this->createMsgId("get_normalized_jid_"); + $ccNode = new ProtocolNode("cc", null, null, $countryCode); + $inNode = new ProtocolNode("in", null, null, $number); + $normalizeNode = new ProtocolNode("normalize", null, array($ccNode, $inNode), null); + $node = new ProtocolNode("iq", + array( + "id" => $msgId, + "xmlns" => "urn:xmpp:whatsapp:account", + "type" => "get", + "to" => "s.whatsapp.net" + ), array($normalizeNode), null); - if(!is_array($jids)) + $this->sendNode($node); + } + + /** + * Removes an account from WhatsApp + * + * @param string $lg + * Language + * @param string $lc + * Country + * @param string $feedback + * User Feedback + */ + public function sendRemoveAccount($lg = null, $lc = null, $feedback = null) { - $jids = array($jids); + $msgId = $this->createMsgId("removeaccount_"); + if ($feedback != null && strlen($feedback) > 0) + { + if ($lg == null) { + $lg = ""; + } + + if ($lc == null) { + $lc = ""; + } + + $child = new ProtocolNode("body", + array( + "lg" => $lg, + "lc" => $lc + ), null, $feedback); + $childNode = array($child); + } else { + $childNode = null; + } + + $removeNode = new ProtocolNode("remove", null, $childNode, null); + $node = new ProtocolNode("iq", + array( + "to" => "s.whatsapp.net", + "xmlns" => "urn:xmpp:whatsapp:account", + "type" => "get", + "id" => $msgId + ), array($removeNode), null); + + $this->sendNode($node); } - $userNode = array(); - foreach($jids as $jid) + + /** + * Send a ping to the server + */ + public function sendPing() { - $userNode[] = new ProtocolNode("user", array('jid' => $this->getJID($jid)), null, null); + $msgId = $this->createMsgId("ping_"); + $pingNode = new ProtocolNode("ping", null, null, null); + $node = new ProtocolNode("iq", + array( + "id" => $msgId, + "xmlns" => "w:p", + "type" => "get", + "to" => "s.whatsapp.net" + ), array($pingNode), null); + + $this->sendNode($node); } - $eligibleNode = new ProtocolNode("eligible", null, $userNode, null); - $node = new ProtocolNode("iq", array( - "id" => $msgId, - "xmlns" => "voip", - "type" => "get", - "to" => static::WHATSAPP_SERVER - ), array($eligibleNode), null); - $this->sendNode($node); - } + /** + * Get voip info. of a number/s + * + * @param string $jids + */ + public function sendGetHasVoipEnabled($jids) + { + + $msgId = $this->createMsgId("voip_"); + + if (!is_array($jids)) + { + $jids = array($jids); + } + $userNode = array(); + foreach ($jids as $jid) + { + $userNode[] = new ProtocolNode("user", array('jid' => $this->getJID($jid)), null, null); + } + + $eligibleNode = new ProtocolNode("eligible", null, $userNode, null); + $node = new ProtocolNode("iq", + array( + "id" => $msgId, + "xmlns" => "voip", + "type" => "get", + "to" => static::WHATSAPP_SERVER + ), array($eligibleNode), null); + + $this->sendNode($node); + } /** * Get the current status message of a specific user. @@ -1263,37 +1323,39 @@ public function sendGetHasVoipEnabled($jids) */ public function sendGetStatuses($jids) { - if(!is_array($jids)) + if (!is_array($jids)) { $jids = array($jids); } $children = array(); - foreach($jids as $jid) + foreach ($jids as $jid) { $children[] = new ProtocolNode("user", array("jid" => $this->getJID($jid)), null, null); } - $node = new ProtocolNode("iq", array( - "to" => "s.whatsapp.net", - "type" => "get", - "xmlns" => "status", - "id" => $this->createMsgId("getstatus") - ), array( + $node = new ProtocolNode("iq", + array( + "to" => "s.whatsapp.net", + "type" => "get", + "xmlns" => "status", + "id" => $this->createMsgId("getstatus") + ), array( new ProtocolNode("status", null, $children, null) ), null); + $this->sendNode($node); } - /** - * Create a group chat. - * - * @param string $subject - * The group Subject - * @param array $participants - * An array with the participants numbers. - * - * @return string - * The group ID. - */ + /** + * Create a group chat. + * + * @param string $subject + * The group Subject + * @param array $participants + * An array with the participants numbers. + * + * @return string + * The group ID. + */ public function sendGroupsChatCreate($subject, $participants) { if (!is_array($participants)) { @@ -1308,16 +1370,18 @@ public function sendGroupsChatCreate($subject, $participants) $id = $this->createMsgId("creategroup"); - $createNode = new ProtocolNode("create", array( - "subject" => $subject - ), $participantNode, null); + $createNode = new ProtocolNode("create", + array( + "subject" => $subject + ), $participantNode, null); - $iqNode = new ProtocolNode("iq", array( - "xmlns" => "w:g2", - "id" => $id, - "type" => "set", - "to" => "g.us" - ), array($createNode), null); + $iqNode = new ProtocolNode("iq", + array( + "xmlns" => "w:g2", + "id" => $id, + "type" => "set", + "to" => "g.us" + ), array($createNode), null); $this->sendNode($iqNode); $this->waitForServer($id); @@ -1325,8 +1389,8 @@ public function sendGroupsChatCreate($subject, $participants) $this->eventManager()->fire("onGroupCreate", array( - $this->phoneNumber, - $groupId + $this->phoneNumber, + $groupId )); return $groupId; @@ -1343,12 +1407,14 @@ public function sendGroupsChatCreate($subject, $participants) public function sendSetGroupSubject($gjid, $subject) { $child = new ProtocolNode("subject", null, null, $subject); - $node = new ProtocolNode("iq", array( - "id" => $this->createMsgId("set_group_subject"), - "type" => "set", - "to" => $this->getJID($gjid), - "xmlns" => "w:g2" - ), array($child), null); + $node = new ProtocolNode("iq", + array( + "id" => $this->createMsgId("set_group_subject"), + "type" => "set", + "to" => $this->getJID($gjid), + "xmlns" => "w:g2" + ), array($child), null); + $this->sendNode($node); } @@ -1362,20 +1428,23 @@ public function sendGroupsChatEnd($gjid) $gjid = $this->getJID($gjid); $msgID = $this->createMsgId("endgroup"); - $groupData = array(); - $groupData['id'] = $gjid; - $groupNode = new ProtocolNode('group', $groupData, null, null); + $groupNode = new ProtocolNode('group', + array( + "id" => $gjid + ), null, null); - $leaveData = array(); - $leaveData["action"] = "delete"; - $leaveNode = new ProtocolNode("leave", $leaveData, array($groupNode), null); + $leaveNode = new ProtocolNode("leave", + array( + "action" => "delete" + ), array($groupNode), null); - $iqData = array(); - $iqData["id"] = $msgID; - $iqData["type"] = "set"; - $iqData["xmlns"] = "w:g2"; - $iqData["to"] = static::WHATSAPP_GROUP_SERVER; - $iqNode = new ProtocolNode("iq", $iqData, array($leaveNode), null); + $iqNode = new ProtocolNode("iq", + array( + "id" => $msgID, + "type" => "set", + "xmlns" => "w:g2", + "to" => static::WHATSAPP_GROUP_SERVER + ), array($leaveNode), null); $this->sendNode($iqNode); $this->waitForServer($msgID); @@ -1388,22 +1457,33 @@ public function sendGroupsChatEnd($gjid) */ public function sendGroupsLeave($gjids) { + $msgId = $this->createMsgId("leavegroups"); + if (!is_array($gjids)) { $gjids = array($this->getJID($gjids)); } $nodes = array(); foreach ($gjids as $gjid) { - $nodes[] = new ProtocolNode("group", array("id" => $this->getJID($gjid)), null, null); + $nodes[] = new ProtocolNode("group", + array( + "id" => $this->getJID($gjid) + ), null, null); } - $leave = new ProtocolNode("leave", array('action'=>'delete'), $nodes, null); - $hash = array(); - $hash["id"] = $this->createMsgId("leavegroups"); - $hash["to"] = static::WHATSAPP_GROUP_SERVER; - $hash["type"] = "set"; - $hash["xmlns"] = "w:g2"; - $node = new ProtocolNode("iq", $hash, array($leave), null); + $leave = new ProtocolNode("leave", + array( + 'action'=>'delete' + ), $nodes, null); + + $node = new ProtocolNode("iq", + array( + "id" => $msgId, + "to" => static::WHATSAPP_GROUP_SERVER, + "type" => "set", + "xmlns" => "w:g2" + ), array($leave), null); + $this->sendNode($node); - $this->waitForServer($hash["id"]); + $this->waitForServer($msgId); } /** @@ -1417,7 +1497,7 @@ public function sendGroupsLeave($gjids) public function sendGroupsParticipantsAdd($groupId, $participants) { $msgId = $this->createMsgId("add_group_participants_"); - if(!is_array($participants)) { + if (!is_array($participants)) { $participants = array($participants); } $this->sendGroupsChangeParticipants($groupId, $participants, 'add', $msgId); @@ -1434,7 +1514,7 @@ public function sendGroupsParticipantsAdd($groupId, $participants) public function sendGroupsParticipantsRemove($groupId, $participants) { $msgId = $this->createMsgId("remove_group_participants_"); - if(!is_array($participants)) { + if (!is_array($participants)) { $participants = array($participants); } $this->sendGroupsChangeParticipants($groupId, $participants, 'remove', $msgId); @@ -1450,7 +1530,7 @@ public function sendGroupsParticipantsRemove($groupId, $participants) public function sendPromoteParticipants($gId, $participants) { $msgId = $this->createMsgId("promote_group_participants_"); - if(!is_array($participants)) { + if (!is_array($participants)) { $participants = array($participants); } $this->sendGroupsChangeParticipants($gId, $participants, "promote", $msgId); @@ -1466,34 +1546,35 @@ public function sendPromoteParticipants($gId, $participants) public function sendDemoteParticipants($gId, $participants) { $msgId = $this->createMsgId("demote_group_participants_"); - if(!is_array($participants)) { + if (!is_array($participants)) { $participants = array($participants); } $this->sendGroupsChangeParticipants($gId, $participants, "demote", $msgId); } - /** - * Lock group: Paritipants cant change group subject or - * profile picture except admin - * - * @param string $gId The group ID. - */ + /** + * Lock group: Paritipants cant change group subject or + * profile picture except admin + * + * @param string $gId The group ID. + */ public function sendLockGroup($gId) { $msgId = $this->createMsgId("lock_group_"); $lockedNode = new ProtocolNode("locked", null, null, null); - $node = new ProtocolNode("iq", array( - "id" => $msgId, - "xmlns" => "w:g2", - "type" => "set", - "to" => $this->getJID($gId) - ), array($lockedNode), null); + $node = new ProtocolNode("iq", + array( + "id" => $msgId, + "xmlns" => "w:g2", + "type" => "set", + "to" => $this->getJID($gId) + ), array($lockedNode), null); $this->sendNode($node); $this->waitForServer($msgId); } - /** + /** * Unlock group: Any participant can change * group subject or profile picture * @@ -1504,12 +1585,13 @@ public function sendUnlockGroup($gId) { $msgId = $this->createMsgId("unlock_group_"); $unlockedNode = new ProtocolNode("unlocked", null, null, null); - $node = new ProtocolNode("iq", array( - "id" => $msgId, - "xmlns" => "w:g2", - "type" => "set", - "to" => $this->getJID($gId) - ), array($unlockedNode), null); + $node = new ProtocolNode("iq", + array( + "id" => $msgId, + "xmlns" => "w:g2", + "type" => "set", + "to" => $this->getJID($gId) + ), array($unlockedNode), null); $this->sendNode($node); $this->waitForServer($msgId); @@ -1549,12 +1631,14 @@ public function sendMessage($to, $txt, $id = null) */ public function sendMessageRead($to, $id) { - $messageHash = array(); - $messageHash["type"] = "read"; - $messageHash["to"] = $to; - $messageHash["id"] = $id; - $messageHash["t"] = time(); - $messageNode = new ProtocolNode("receipt", $messageHash, null, null); + $messageNode = new ProtocolNode("receipt", + array( + "type" => "read", + "to" => $to, + "id" => $id, + "t" => time() + ), null, null); + $this->sendNode($messageNode); } @@ -1575,11 +1659,11 @@ public function sendMessageAudio($to, $filepath, $storeURLmedia = false, $fsize $allowedExtensions = array('3gp', 'caf', 'wav', 'mp3', 'wma', 'ogg', 'aif', 'aac', 'm4a'); $size = 10 * 1024 * 1024; // Easy way to set maximum file size for this media type. return $this->sendCheckAndSendMedia($filepath, $size, $to, 'audio', $allowedExtensions, $storeURLmedia); - } - else{ - $this->sendRequestFileUpload($fhash, 'audio', $fsize, $filepath, $to); - return true; - } + + } else { + $this->sendRequestFileUpload($fhash, 'audio', $fsize, $filepath, $to); + return true; + } } /** @@ -1612,11 +1696,10 @@ public function sendMessageImage($to, $filepath, $storeURLmedia = false, $fsize $allowedExtensions = array('jpg', 'jpeg', 'gif', 'png'); $size = 5 * 1024 * 1024; // Easy way to set maximum file size for this media type. return $this->sendCheckAndSendMedia($filepath, $size, $to, 'image', $allowedExtensions, $storeURLmedia, $caption); - } - else{ - $this->sendRequestFileUpload($fhash, 'image', $fsize, $filepath, $to, $caption); - return true; - } + } else { + $this->sendRequestFileUpload($fhash, 'image', $fsize, $filepath, $to, $caption); + return true; + } } /** @@ -1643,13 +1726,22 @@ public function sendMessageLocation($to, $long, $lat, $name = null, $url = null) $mediaHash['name'] = $name; $mediaHash['url'] = $url; - $mediaNode = new ProtocolNode("media", $mediaHash, null, null); + $mediaNode = new ProtocolNode("media", + array( + "type" => "location", + "encoding" => "raw", + "latitude" => $lat, + "longitude" => $long, + "name" => $name, + "url" => $url + ), null, null); if (is_array($to)) { $id = $this->sendBroadcast($to, $mediaNode, "media"); } else { $id = $this->sendMessageNode($to, $mediaNode); } + $this->waitForServer($id); } @@ -1666,7 +1758,11 @@ public function sendMessagePaused($to) protected function sendChatState($to, $state) { - $node = new ProtocolNode("chatstate", array("to" => $this->getJID($to)), array(new ProtocolNode($state, null, null, null)), null); + $node = new ProtocolNode("chatstate", + array( + "to" => $this->getJID($to) + ), array(new ProtocolNode($state, null, null, null)), null); + $this->sendNode($node); } @@ -1690,10 +1786,11 @@ public function sendMessageVideo($to, $filepath, $storeURLmedia = false, $fsize $allowedExtensions = array('3gp', 'mp4', 'mov', 'avi'); $size = 20 * 1024 * 1024; // Easy way to set maximum file size for this media type. return $this->sendCheckAndSendMedia($filepath, $size, $to, 'video', $allowedExtensions, $storeURLmedia, $caption); - } - else{ - $this->sendRequestFileUpload($fhash, 'video', $fsize, $filepath, $to, $caption); - return true; + } + else + { + $this->sendRequestFileUpload($fhash, 'video', $fsize, $filepath, $to, $caption); + return true; } } @@ -1729,12 +1826,13 @@ public function sendOfflineStatus() */ public function sendPong($msgid) { - $messageHash = array(); - $messageHash["to"] = static::WHATSAPP_SERVER; - $messageHash["id"] = $msgid; - $messageHash["type"] = "result"; + $messageNode = new ProtocolNode("iq", + array( + "to" => static::WHATSAPP_SERVER, + "id" => $msgid, + "type" => "result" + ), null, ""); - $messageNode = new ProtocolNode("iq", $messageHash, null, ""); $this->sendNode($messageNode); $this->eventManager()->fire("onSendPong", array( @@ -1746,7 +1844,7 @@ public function sendPong($msgid) public function sendAvailableForChat($nickname = null) { $presence = array(); - if($nickname) + if ($nickname) { //update nickname $this->name = $nickname; @@ -1764,14 +1862,16 @@ public function sendAvailableForChat($nickname = null) */ public function sendPresence($type = "active") { - $presence = array(); - $presence['type'] = $type; - $node = new ProtocolNode("presence", $presence, null, ""); + $node = new ProtocolNode("presence", + array( + "type" => $type + ), null, ""); + $this->sendNode($node); $this->eventManager()->fire("onSendPresence", array( $this->phoneNumber, - $presence['type'], + $type, $this->name )); } @@ -1800,7 +1900,7 @@ public function sendPresenceUnsubscription($to) $this->sendNode($node); } - /** + /** * Set the picture for the group * * @param string $gjid The groupID @@ -1823,25 +1923,32 @@ public function sendSetPrivacyBlockedList($blockedJids = array()) } $items = array(); foreach ($blockedJids as $index => $jid) { - $item = new ProtocolNode("item", array( - "type" => "jid", - "value" => $this->getJID($jid), - "action" => "deny", - "order" => $index + 1//WhatsApp stream crashes on zero index - ), null, null); + $item = new ProtocolNode("item", + array( + "type" => "jid", + "value" => $this->getJID($jid), + "action" => "deny", + "order" => $index + 1//WhatsApp stream crashes on zero index + ), null, null); $items[] = $item; } - $child = new ProtocolNode("list", array("name" => "default"), $items, null); + $child = new ProtocolNode("list", + array( + "name" => "default" + ), $items, null); + $child2 = new ProtocolNode("query", null, array($child), null); - $node = new ProtocolNode("iq", array( - "id" => $this->createMsgId("setprivacy"), - "xmlns" => "jabber:iq:privacy", - "type" => "set" - ), array($child2), null); + $node = new ProtocolNode("iq", + array( + "id" => $this->createMsgId("setprivacy"), + "xmlns" => "jabber:iq:privacy", + "type" => "set" + ), array($child2), null); + $this->sendNode($node); } - /** + /** * Set your profile picture * * @param string $path URL/URI of image @@ -1851,38 +1958,50 @@ public function sendSetProfilePicture($path) $this->sendSetPicture($this->phoneNumber, $path); } - /* - * Removes the profile photo - */ - public function sendRemoveProfilePicture() { - $picture = new ProtocolNode("picture", null, null, null); + /* + * Removes the profile photo + */ + public function sendRemoveProfilePicture() + { + $msgId = $this->createMsgId("setphoto"); - $thumb = new ProtocolNode("picture", array("type" => "preview"), null, null); + $picture = new ProtocolNode("picture", null, null, null); + + $thumb = new ProtocolNode("picture", + array( + "type" => "preview" + ), null, null); - $hash = array(); - $nodeID = $this->createMsgId("setphoto"); - $hash["id"] = $nodeID; - $hash["to"] = $this->getJID($this->phoneNumber); - $hash["type"] = "set"; - $hash["xmlns"] = "w:profile:picture"; - $node = new ProtocolNode("iq", $hash, array($picture, $thumb), null); + $node = new ProtocolNode("iq", + array( + "id" => $msgId, + "to" => $this->getJID($this->phoneNumber), + "type" => "set", + "xmlns" => "w:profile:picture" + ), array($picture, $thumb), null); - $this->sendNode($node); - } + $this->sendNode($node); + } - /** + /** * Set the recovery token for your account to allow you to * retrieve your password at a later stage. * @param string $token A user generated token. */ public function sendSetRecoveryToken($token) { - $child = new ProtocolNode("pin", array("xmlns" => "w:ch:p"), null, $token); - $node = new ProtocolNode("iq", array( - "id" => $this->createMsgId("settoken"), - "type" => "set", - "to" => "s.whatsapp.net" - ), array($child), null); + $child = new ProtocolNode("pin", + array( + "xmlns" => "w:ch:p" + ), null, $token); + + $node = new ProtocolNode("iq", + array( + "id" => $this->createMsgId("settoken"), + "type" => "set", + "to" => "s.whatsapp.net" + ), array($child), null); + $this->sendNode($node); } @@ -1895,12 +2014,13 @@ public function sendSetRecoveryToken($token) public function sendStatusUpdate($txt) { $child = new ProtocolNode("status", null, null, $txt); - $node = new ProtocolNode("iq", array( - "to" => "s.whatsapp.net", - "type" => "set", - "id" => $this->createMsgId("sendstatus"), - "xmlns" => "status" - ), array($child), null); + $node = new ProtocolNode("iq", + array( + "to" => "s.whatsapp.net", + "type" => "set", + "id" => $this->createMsgId("sendstatus"), + "xmlns" => "status" + ), array($child), null); $this->sendNode($node); $this->eventManager()->fire("onSendStatusUpdate", @@ -1922,18 +2042,20 @@ public function sendStatusUpdate($txt) */ public function sendVcard($to, $name, $vCard) { - $vCardAttribs = array(); - $vCardAttribs['name'] = $name; - $vCardNode = new ProtocolNode("vcard", $vCardAttribs, null, $vCard); + $vCardNode = new ProtocolNode("vcard", + array( + "name" => $name + ), null, $vCard); - $mediaAttribs = array(); - $mediaAttribs["type"] = "vcard"; + $mediaNode = new ProtocolNode("media", + array( + "type" => "vcard" + ), array($vCardNode), ""); - $mediaNode = new ProtocolNode("media", $mediaAttribs, array($vCardNode), ""); $this->sendMessageNode($to, $mediaNode); } - /** + /** * Send a vCard to the user/group as Broadcast. * * @param $targets @@ -1943,20 +2065,22 @@ public function sendVcard($to, $name, $vCard) * @param $vCard * The contact vCard to send. */ - public function sendBroadcastVcard($targets, $name, $vCard) + public function sendBroadcastVcard($targets, $name, $vCard) { - $vCardAttribs = array(); - $vCardAttribs['name'] = $name; - $vCardNode = new ProtocolNode("vcard", $vCardAttribs, null, $vCard); + $vCardNode = new ProtocolNode("vcard", + array( + "name" => $name + ), null, $vCard); - $mediaAttribs = array(); - $mediaAttribs["type"] = "vcard"; + $mediaNode = new ProtocolNode("media", + array( + "type" => "vcard" + ), array($vCardNode), ""); - $mediaNode = new ProtocolNode("media", $mediaAttribs, array($vCardNode), ""); $this->sendBroadcast($targets, $mediaNode, "media"); } - /** + /** * Sets the bind of the new message. * @param $bind */ @@ -1965,7 +2089,7 @@ public function setNewMessageBind($bind) $this->newMsgBind = $bind; } - /** + /** * Upload file to WhatsApp servers. * * @param $file @@ -2081,7 +2205,7 @@ protected function createAuthNode() protected function createAuthBlob() { - if($this->challengeData) { + if ($this->challengeData) { $key = wa_pbkdf2('sha1', base64_decode($this->password), $this->challengeData, 16, 20, true); $this->inputKey = new KeyStream($key[2], $key[3]); $this->outputKey = new KeyStream($key[0], $key[1]); @@ -2178,22 +2302,24 @@ protected function dissectPhone() //hook: //fix country code for North America - if(substr($data[1], 0, 1) == "1") + if (substr($data[1], 0, 1) == "1") { $data[1] = "1"; } - $phone = array( - 'country' => $data[0], - 'cc' => $data[1], - 'phone' => substr($this->phoneNumber, strlen($data[1]), strlen($this->phoneNumber)), - 'mcc' => $mcc, - 'ISO3166' => @$data[3], - 'ISO639' => @$data[4], - 'mnc' => $data[5] - ); - - $this->eventManager()->fire("onDissectPhone", array( + $phone = + array( + 'country' => $data[0], + 'cc' => $data[1], + 'phone' => substr($this->phoneNumber, strlen($data[1]), strlen($this->phoneNumber)), + 'mcc' => $mcc, + 'ISO3166' => @$data[3], + 'ISO639' => @$data[4], + 'mnc' => $data[5] + ); + + $this->eventManager()->fire("onDissectPhone", + array( $this->phoneNumber, $phone['country'], $phone['cc'], @@ -2227,23 +2353,24 @@ protected function dissectPhone() * * Returns mnc value */ - protected function detectMnc ($lc, $carrierName) { - $fp = fopen(__DIR__ . DIRECTORY_SEPARATOR . 'networkinfo.csv', 'r'); - $mnc = null; + protected function detectMnc ($lc, $carrierName) + { + $fp = fopen(__DIR__ . DIRECTORY_SEPARATOR . 'networkinfo.csv', 'r'); + $mnc = null; - while ($data = fgetcsv($fp, 0, ',')) { - if (($data[4] === $lc) && ($data[7] === $carrierName)) { - $mnc = $data[2]; - break; + while ($data = fgetcsv($fp, 0, ',')) { + if (($data[4] === $lc) && ($data[7] === $carrierName)) { + $mnc = $data[2]; + break; + } } - } - if($mnc == null) - $mnc = '000'; + if ($mnc == null) + $mnc = '000'; - fclose($fp); + fclose($fp); - return $mnc; + return $mnc; } /** @@ -2272,7 +2399,7 @@ protected function doLogin() $this->pollMessage(); $this->pollMessage(); - if($this->challengeData != null) { + if ($this->challengeData != null) { $data = $this->createAuthResponseNode(); $this->sendNode($data); $this->reader->setKey($this->inputKey); @@ -2281,20 +2408,20 @@ protected function doLogin() } if(strcmp($this->loginStatus, static::DISCONNECTED_STATUS) == 0) - { - throw new Exception('Login Failure'); - } - else - { + { + throw new Exception('Login Failure'); + } + else + { $this->eventManager()->fire("onLogin", array( $this->phoneNumber )); $this->sendAvailableForChat(); - } + } } - /** + /** * Have we an active connection with WhatsAPP AND a valid login already? * @return bool */ @@ -2323,33 +2450,33 @@ protected function isLoggedIn(){ protected function buildIdentity($identity) { if (file_exists($identity.".dat")) - { - return urldecode(file_get_contents($identity.'.dat')); - } - else - { - $id = fopen($identity.".dat", "w"); - $bytes = strtolower(openssl_random_pseudo_bytes(20)); - fwrite($id, urlencode($bytes)); - fclose($id); - - return $bytes; - } + { + return urldecode(file_get_contents($identity.'.dat')); + } + else + { + $id = fopen($identity.".dat", "w"); + $bytes = strtolower(openssl_random_pseudo_bytes(20)); + fwrite($id, urlencode($bytes)); + fclose($id); + + return $bytes; + } } protected function checkIdentity($identity) { if (file_exists($identity.".dat")) { - $id = strlen(urldecode(file_get_contents($identity.'.dat'))); - if (($id == 20) || ($id == 16)) - { - return true; - } + $id = strlen(urldecode(file_get_contents($identity.'.dat'))); + if (($id == 20) || ($id == 16)) + { + return true; + } } else { - return false; + return false; } } @@ -2361,73 +2488,75 @@ public function sendSync(array $numbers, array $deletedNumbers = null, $syncType $users[$i] = new ProtocolNode("user", null, null, (substr($numbers[$i], 0, 1) != '+')?('+' . $numbers[$i]):($numbers[$i])); } - if(($deletedNumbers != null) || (count($deletedNumbers) != 0)) + if (($deletedNumbers != null) || (count($deletedNumbers) != 0)) { - $j = 0; - for ($j; $j $this->getJID($deletedNumbers[$j]), "type" => "delete"), null, null); - $i++; - } + $j = 0; + for ($j; $j $this->getJID($deletedNumbers[$j]), "type" => "delete"), null, null); + $i++; + } } switch($syncType) { case 0: - $mode = "full"; - $context = "registration"; - break; + $mode = "full"; + $context = "registration"; + break; case 1: - $mode = "full"; - $context = "interactive"; - break; + $mode = "full"; + $context = "interactive"; + break; case 2: - $mode = "full"; - $context = "background"; - break; + $mode = "full"; + $context = "background"; + break; case 3: - $mode = "delta"; - $context = "interactive"; - break; + $mode = "delta"; + $context = "interactive"; + break; case 4: - $mode = "delta"; - $context = "background"; - break; + $mode = "delta"; + $context = "background"; + break; case 5: - $mode = "query"; - $context = "interactive"; - break; + $mode = "query"; + $context = "interactive"; + break; case 6: - $mode = "chunked"; - $context = "registration"; - break; + $mode = "chunked"; + $context = "registration"; + break; case 7: - $mode = "chunked"; - $context = "interactive"; - break; + $mode = "chunked"; + $context = "interactive"; + break; case 8: - $mode = "chunked"; - $context = "background"; - break; + $mode = "chunked"; + $context = "background"; + break; default: - $mode = "delta"; - $context = "background"; + $mode = "delta"; + $context = "background"; } $id = $this->createMsgId("sendsync_"); - $node = new ProtocolNode("iq", array( - "id" => $id, - "xmlns" => "urn:xmpp:whatsapp:sync", - "type" => "get" - ), array( - new ProtocolNode("sync", array( - "mode" => $mode, - "context" => $context, - "sid" => "".((time() + 11644477200) * 10000000), - "index" => "".$index, - "last" => $last ? "true" : "false" - ), $users, null) - ), null); + $node = new ProtocolNode("iq", + array( + "id" => $id, + "xmlns" => "urn:xmpp:whatsapp:sync", + "type" => "get" + ), array( + new ProtocolNode("sync", + array( + "mode" => $mode, + "context" => $context, + "sid" => "".((time() + 11644477200) * 10000000), + "index" => "".$index, + "last" => $last ? "true" : "false" + ), $users, null) + ), null); $this->sendNode($node); $this->waitForServer($id); @@ -2440,7 +2569,7 @@ public function setMessageStore(MessageStoreInterface $messageStore) $this->messageStore = $messageStore; } - /** + /** * Process number/jid and turn it into a JID if necessary * * @param string $number @@ -2597,7 +2726,7 @@ protected function processChallenge($node) protected function processInboundData($data, $autoReceipt = true, $type = "read") { $node = $this->reader->nextTree($data); - if( $node != null ) { + if ( $node != null ) { $this->processInboundDataNode($node, $autoReceipt, $type); } } @@ -2617,36 +2746,35 @@ protected function processInboundDataNode(ProtocolNode $node, $autoReceipt = tru if ($node->getTag() == "challenge") { $this->processChallenge($node); } - elseif($node->getTag() == "failure" ) - { - - $this->loginStatus = static::DISCONNECTED_STATUS; + elseif ($node->getTag() == "failure" ) + { + $this->loginStatus = static::DISCONNECTED_STATUS; + } - } elseif ($node->getTag() == "success") { - if ($node->getAttribute("status") == "active") { - $this->loginStatus = static::CONNECTED_STATUS; - $challengeData = $node->getData(); - file_put_contents($this->challengeFilename, $challengeData); - $this->writer->setKey($this->outputKey); - } elseif ($node->getAttribute("status") == "expired") - { - $this->eventManager()->fire("onAccountExpired", - array( - $this->phoneNumber, - $node->getAttribute("kind"), - $node->getAttribute("status"), - $node->getAttribute("creation"), - $node->getAttribute("expiration") - )); - } + if ($node->getAttribute("status") == "active") { + $this->loginStatus = static::CONNECTED_STATUS; + $challengeData = $node->getData(); + file_put_contents($this->challengeFilename, $challengeData); + $this->writer->setKey($this->outputKey); + } elseif ($node->getAttribute("status") == "expired") + { + $this->eventManager()->fire("onAccountExpired", + array( + $this->phoneNumber, + $node->getAttribute("kind"), + $node->getAttribute("status"), + $node->getAttribute("creation"), + $node->getAttribute("expiration") + )); + } } elseif($node->getTag() == "failure") - { - $this->eventManager()->fire("onLoginFailed", - array( - $this->phoneNumber, - $node->getChild(0)->getTag() - )); + { + $this->eventManager()->fire("onLoginFailed", + array( + $this->phoneNumber, + $node->getChild(0)->getTag() + )); } elseif($node->getTag() == 'ack' && $node->getAttribute("class") == "message") { @@ -2662,16 +2790,16 @@ protected function processInboundDataNode(ProtocolNode $node, $autoReceipt = tru elseif($node->getTag() == 'receipt') { if ($node->hasChild("list")) { - foreach ($node->getChild("list")->getChildren() as $child) { - $this->eventManager()->fire("onMessageReceivedClient", - array( - $this->phoneNumber, - $node->getAttribute('from'), - $child->getAttribute('id'), - $node->getAttribute('type'), - $node->getAttribute('t') - )); - } + foreach ($node->getChild("list")->getChildren() as $child) { + $this->eventManager()->fire("onMessageReceivedClient", + array( + $this->phoneNumber, + $node->getAttribute('from'), + $child->getAttribute('id'), + $node->getAttribute('type'), + $node->getAttribute('t') + )); + } } $this->eventManager()->fire("onMessageReceivedClient", @@ -2683,12 +2811,13 @@ protected function processInboundDataNode(ProtocolNode $node, $autoReceipt = tru $node->getAttribute('t') )); - $ackNode = new ProtocolNode("ack", array( - "to" => $node->getAttribute('from'), - "id" => $node->getAttribute('id'), - "type" => $type, - "t" => time() - ), null, null); + $ackNode = new ProtocolNode("ack", + array( + "to" => $node->getAttribute('from'), + "id" => $node->getAttribute('id'), + "type" => $type, + "t" => time() + ), null, null); $this->sendNode($ackNode); } @@ -2744,10 +2873,10 @@ protected function processInboundDataNode(ProtocolNode $node, $autoReceipt = tru } if ($node->getAttribute("type") == "text" && $node->getChild(0)->getTag() == 'enc') { // TODO - if($autoReceipt) - { - $this->sendMessageReceived($node, $type); - } + if($autoReceipt) + { + $this->sendMessageReceived($node, $type); + } } if ($node->getAttribute("type") == "media" && $node->getChild('media') != null) { if ($node->getChild("media")->getAttribute('type') == 'image') { @@ -2927,7 +3056,7 @@ protected function processInboundDataNode(ProtocolNode $node, $autoReceipt = tru } $this->sendClearDirty($categories); } - if (strcmp($node->getTag(), "presence") == 0 + if (strcmp($node->getTag(), "presence") == 0 && strncmp($node->getAttribute('from'), $this->phoneNumber, strlen($this->phoneNumber)) != 0 && strpos($node->getAttribute('from'), "-") == false) { $presence = array(); @@ -3252,19 +3381,22 @@ protected function processInboundDataNode(ProtocolNode $node, $autoReceipt = tru if ($node->getTag() == "message" && $node->getAttribute('type') == "media" && $node->getChild(0)->getAttribute('type') == "image" ) { - $msgId = $this->createMsgId("ack-media"); + $msgId = $this->createMsgId("ack-media"); - $ackNode = new ProtocolNode("ack", array( - "url" => $node->getChild(0)->getAttribute('url') - ), null, null); + $ackNode = new ProtocolNode("ack", + array( + "url" => $node->getChild(0)->getAttribute('url') + ), null, null); + + $iqNode = new ProtocolNode("iq", + array( + "id" => $msgId, + "xmlns" => "w:m", + "type" => "set", + "to" => static::WHATSAPP_SERVER + ), array($ackNode), null); - $iqNode = new ProtocolNode("iq", array( - "id" => $msgId, - "xmlns" => "w:m", - "type" => "set", - "to" => static::WHATSAPP_SERVER - ), array($ackNode), null); - $this->sendNode($iqNode); + $this->sendNode($iqNode); } $children = $node->getChild(0); @@ -3327,14 +3459,14 @@ protected function processInboundDataNode(ProtocolNode $node, $autoReceipt = tru break; case "encrypt": $value = $node->getChild(0)->getAttribute('value'); - if (is_numeric($value)){ + if (is_numeric($value)) { $this->eventManager()->fire("onGetKeysLeft", array( $this->phoneNumber, $node->getChild(0)->getAttribute('value') )); } - else{ + else { echo "Corrupt Stream: value " . $value . "is not numeric"; } break; @@ -3383,7 +3515,7 @@ protected function processInboundDataNode(ProtocolNode $node, $autoReceipt = tru )); } break; - case "account": + case "account": if (($node->getChild(0)->getAttribute('author')) == "") $author = "Paypal"; else @@ -3398,7 +3530,7 @@ protected function processInboundDataNode(ProtocolNode $node, $autoReceipt = tru $node->getChild(0)->getChild(0)->getAttribute('expiration') )); break; - case "features": + case "features": if($node->getChild(0)->getChild(0) == "encrypt") { $this->eventManager()->fire("onGetFeature", @@ -3414,7 +3546,7 @@ protected function processInboundDataNode(ProtocolNode $node, $autoReceipt = tru } $this->sendNotificationAck($node); } - if($node->getTag() == "ib") + if ($node->getTag() == "ib") { foreach($node->getChildren() as $child) { @@ -3450,15 +3582,17 @@ protected function sendNotificationAck($node) $type = $node->getAttribute("type"); $attributes = array(); - if($to) + if ($to) $attributes["from"] = $to; - if($participant) + if ($participant) $attributes["participant"] = $participant; $attributes["to"] = $from; $attributes["class"] = "notification"; $attributes["id"] = $id; $attributes["type"] = $type; + $ack = new ProtocolNode("ack", $attributes, null, null); + $this->sendNode($ack); } @@ -3519,7 +3653,7 @@ protected function processProfilePicture($node) } } - /** + /** * If the media file was originally from a URL, this function either deletes it * or renames it depending on the user option. * @@ -3610,7 +3744,7 @@ protected function processUploadResponse($node) $mediaAttribs["file"] = $filename; $mediaAttribs["size"] = $filesize; if($this->mediaQueue[$id]['caption'] != '') - $mediaAttribs["caption"] = $this->mediaQueue[$id]['caption']; + $mediaAttribs["caption"] = $this->mediaQueue[$id]['caption']; $filepath = $this->mediaQueue[$id]['filePath']; $to = $this->mediaQueue[$id]['to']; @@ -3777,23 +3911,26 @@ protected function sendBroadcast($targets, $node, $type) $broadcastNode = new ProtocolNode("broadcast", null, $toNodes, null); - $messageHash = array(); - $messageHash["to"] = time()."@broadcast"; - $messageHash["type"] = $type; - $id = $this->createMsgId("broadcast"); - $messageHash["id"] = $id; + $msgId = $this->createMsgId("broadcast"); + + $messageNode = new ProtocolNode("message", + array( + "to" => time()."@broadcast", + "type" => $type, + "id" => $msgId + ), array($node, $broadcastNode), null); - $messageNode = new ProtocolNode("message", $messageHash, array($node, $broadcastNode), null); $this->sendNode($messageNode); //listen for response $this->eventManager()->fire("onSendMessage", array( $this->phoneNumber, $targets, - $messageHash["id"], + $msgId, $node )); - return $id; + + return $msgId; } /** @@ -3804,13 +3941,13 @@ protected function sendData($data) { if($this->socket != null) { - if (socket_write($this->socket, $data, strlen($data)) === false) - { + if (socket_write($this->socket, $data, strlen($data)) === false) + { - $this->disconnect(); - throw new ConnectionException('Connection Closed!'); + $this->disconnect(); + throw new ConnectionException('Connection Closed!'); - } + } } } @@ -3822,12 +3959,14 @@ protected function sendGetGroupsFiltered($type) { $msgID = $this->createMsgId("getgroups"); $child = new ProtocolNode($type, null, null, null); - $node = new ProtocolNode("iq", array( - "id" => $msgID, - "type" => "get", - "xmlns" => "w:g2", - "to" => "g.us" - ), array($child), null); + $node = new ProtocolNode("iq", + array( + "id" => $msgID, + "type" => "get", + "xmlns" => "w:g2", + "to" => "g.us" + ), array($child), null); + $this->sendNode($node); $this->waitForServer($msgID); } @@ -3850,16 +3989,16 @@ protected function sendGroupsChangeParticipants($groupId, $participants, $tag, $ $childHash = array(); $child = new ProtocolNode($tag, $childHash, $_participants, ""); - $setHash = array(); - $setHash["id"] = $id; - $setHash["type"] = "set"; - $setHash["xmlns"] = "w:g2"; - $setHash["to"] = $this->getJID($groupId); - - $node = new ProtocolNode("iq", $setHash, array($child), ""); + $node = new ProtocolNode("iq", + array( + "id" => $id, + "type" => "set", + "xmlns" => "w:g2", + "to" => $this->getJID($groupId) + ), array($child), ""); $this->sendNode($node); - $this->waitForServer($setHash["id"]); + $this->waitForServer($id); } /** From ce6984404ae94bb247c855973342e39934c30c57 Mon Sep 17 00:00:00 2001 From: ducch Date: Sat, 21 Feb 2015 17:53:39 +0200 Subject: [PATCH 219/436] fix typos --- src/vCard.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/vCard.php b/src/vCard.php index 3969c8e6..5d831952 100755 --- a/src/vCard.php +++ b/src/vCard.php @@ -7,7 +7,7 @@ class vCard { - // An array of this vcard's contact data. + // An array of this vCard's contact data. protected $data; // Filename for download file naming. protected $filename; @@ -15,7 +15,7 @@ class vCard protected $class; // vCard revision date. protected $revisionDate; - // The vCard gnerated. + // The vCard generated. protected $card; /** From 6da76797cb09708714f6fe546b34233b5e98ac1d Mon Sep 17 00:00:00 2001 From: ducch Date: Sat, 21 Feb 2015 17:48:07 +0200 Subject: [PATCH 220/436] apply PSR-1/PSR-2 standards --- src/SqliteMessageStore.php | 23 +- src/exception.php | 17 +- src/func.php | 6032 ++++++++++++++++++------------------ src/keystream.class.php | 4 +- src/mediauploader.php | 5 +- src/protocol.class.php | 96 +- src/rc4.php | 3 - src/token.php | 28 +- src/tokenmap.class.php | 933 +++--- src/vCard.php | 2 - src/whatsprot.class.php | 892 +++--- 11 files changed, 4000 insertions(+), 4035 deletions(-) diff --git a/src/SqliteMessageStore.php b/src/SqliteMessageStore.php index 3a1fd0a9..1be2e826 100644 --- a/src/SqliteMessageStore.php +++ b/src/SqliteMessageStore.php @@ -4,10 +4,8 @@ interface MessageStoreInterface public function saveMessage($from, $to, $txt, $id, $t); } - class SqliteMessageStore implements MessageStoreInterface { - private $db; public function __construct($number) @@ -18,10 +16,8 @@ public function __construct($number) $this->db = new \PDO("sqlite:" . $fileName, null, null, array(PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC, PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION)); if ($createTable) { - $this->db->exec('CREATE TABLE messages (`from` TEXT, `to` TEXT, message TEXT, id TEXT, t TEXT)'); - + $this->db->exec('CREATE TABLE messages (`from` TEXT, `to` TEXT, message TEXT, id TEXT, t TEXT)'); } - } public function saveMessage($from, $to, $txt, $id, $t) @@ -30,16 +26,13 @@ public function saveMessage($from, $to, $txt, $id, $t) $query = $this->db->prepare($sql); $query->execute( - array( - ':from' => $from, - ':to' => $to, - ':message' => $txt, - ':messageId' => $id, - ':t' => $t - ) + array( + ':from' => $from, + ':to' => $to, + ':message' => $txt, + ':messageId' => $id, + ':t' => $t + ) ); - } } - -?> diff --git a/src/exception.php b/src/exception.php index 88af347d..a85505c9 100755 --- a/src/exception.php +++ b/src/exception.php @@ -1,8 +1,6 @@ message}' in {$this->file}({$this->line})\n" . "{$this->getTraceAsString()}"; } - } - /* * Exception occurs when we have no active socket * connection to whatsapp diff --git a/src/func.php b/src/func.php index 999ccfe9..189beec9 100755 --- a/src/func.php +++ b/src/func.php @@ -76,13 +76,13 @@ function preprocessProfilePicture($path) { list($width, $height) = getimagesize($path); if ($width > $height) { - $y = 0; - $x = ($width - $height) / 2; - $smallestSide = $height; + $y = 0; + $x = ($width - $height) / 2; + $smallestSide = $height; } else { - $x = 0; - $y = ($height - $width) / 2; - $smallestSide = $width; + $x = 0; + $y = ($height - $width) / 2; + $smallestSide = $width; } $size = 639; @@ -189,7 +189,7 @@ function updateData($nameFile, $WAver, $classesMD5 = "") } else { if ($file == __DIR__ . '/whatsprot.class.php') { $content[48] = ' const WHATSAPP_VER = \'' . trim($WAver) . '\'; // The WhatsApp version.'; - // $content[49] = ' const WHATSAPP_USER_AGENT = \'WhatsApp/' . trim($WAver) . ' Android/4.3 Device/GalaxyS3\'; // User agent used in request/registration code.'; + // $content[49] = ' const WHATSAPP_USER_AGENT = \'WhatsApp/' . trim($WAver) . ' Android/4.3 Device/GalaxyS3\'; // User agent used in request/registration code.'; } } @@ -365,3013 +365,3013 @@ function ArrayEmojis() 'Hex' => '1F622' ), array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ˜‚', - 'iOS7' => '', - 'Hex' => '1F602' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ˜ญ', - 'iOS7' => '', - 'Hex' => '1F62D' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ˜ช', - 'iOS7' => '', - 'Hex' => '1F62A' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ˜ฅ', - 'iOS7' => '', - 'Hex' => '1F625' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ˜ฐ', - 'iOS7' => '', - 'Hex' => '1F630' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿ˜…', 'iOS7' => '', 'Hex' => '1F605'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ˜“', - 'iOS7' => '', - 'Hex' => '1F613' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿ˜ฉ', 'iOS7' => '', 'Hex' => '1F629'), - array('iOS2' => '', 'iOS5' => '๐Ÿ˜ซ', 'iOS7' => '', 'Hex' => '1F62B'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ˜จ', - 'iOS7' => '', - 'Hex' => '1F628' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ˜ฑ', - 'iOS7' => '', - 'Hex' => '1F631' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ˜ ', - 'iOS7' => '', - 'Hex' => '1F620' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ˜ก', - 'iOS7' => '', - 'Hex' => '1F621' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿ˜ค', 'iOS7' => '', 'Hex' => '1F624'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ˜–', - 'iOS7' => '', - 'Hex' => '1F616' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿ˜†', 'iOS7' => '', 'Hex' => '1F606'), - array('iOS2' => '', 'iOS5' => '๐Ÿ˜‹', 'iOS7' => '', 'Hex' => '1F60B'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ˜ท', - 'iOS7' => '', - 'Hex' => '1F637' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿ˜Ž', 'iOS7' => '', 'Hex' => '1F60E'), - array('iOS2' => '', 'iOS5' => '๐Ÿ˜ด', 'iOS7' => '', 'Hex' => '1F634'), - array('iOS2' => '', 'iOS5' => '๐Ÿ˜ต', 'iOS7' => '', 'Hex' => '1F635'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ˜ฒ', - 'iOS7' => '', - 'Hex' => '1F632' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿ˜Ÿ', 'iOS7' => '', 'Hex' => '1F61F'), - array('iOS2' => '', 'iOS5' => '๐Ÿ˜ฆ', 'iOS7' => '', 'Hex' => '1F626'), - array('iOS2' => '', 'iOS5' => '๐Ÿ˜ง', 'iOS7' => '', 'Hex' => '1F627'), - array('iOS2' => '', 'iOS5' => '๐Ÿ˜ˆ', 'iOS7' => '', 'Hex' => '1F608'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ‘ฟ', - 'iOS7' => '', - 'Hex' => '1F47F' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿ˜ฎ', 'iOS7' => '', 'Hex' => '1F62E'), - array('iOS2' => '', 'iOS5' => '๐Ÿ˜ฌ', 'iOS7' => '', 'Hex' => '1F62C'), - array('iOS2' => '', 'iOS5' => '๐Ÿ˜', 'iOS7' => '', 'Hex' => '1F610'), - array('iOS2' => '', 'iOS5' => '๐Ÿ˜•', 'iOS7' => '', 'Hex' => '1F615'), - array('iOS2' => '', 'iOS5' => '๐Ÿ˜ฏ', 'iOS7' => '', 'Hex' => '1F62F'), - array('iOS2' => '', 'iOS5' => '๐Ÿ˜ถ', 'iOS7' => '', 'Hex' => '1F636'), - array('iOS2' => '', 'iOS5' => '๐Ÿ˜‡', 'iOS7' => '', 'Hex' => '1F607'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ˜', - 'iOS7' => '', - 'Hex' => '1F60F' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿ˜‘', 'iOS7' => '', 'Hex' => '1F611'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ‘ฒ', - 'iOS7' => '', - 'Hex' => '1F472' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ‘ณ', - 'iOS7' => '', - 'Hex' => '1F473' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ‘ฎ', - 'iOS7' => '', - 'Hex' => '1F46E' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ‘ท', - 'iOS7' => '', - 'Hex' => '1F477' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ’‚', - 'iOS7' => '', - 'Hex' => '1F482' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ‘ถ', - 'iOS7' => '', - 'Hex' => '1F476' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ‘ฆ', - 'iOS7' => '', - 'Hex' => '1F466' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ‘ง', - 'iOS7' => '', - 'Hex' => '1F467' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ‘จ', - 'iOS7' => '', - 'Hex' => '1F468' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ‘ฉ', - 'iOS7' => '', - 'Hex' => '1F469' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ‘ด', - 'iOS7' => '', - 'Hex' => '1F474' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ‘ต', - 'iOS7' => '', - 'Hex' => '1F475' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ‘ฑ', - 'iOS7' => '', - 'Hex' => '1F471' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ‘ผ', - 'iOS7' => '', - 'Hex' => '1F47C' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ‘ธ', - 'iOS7' => '', - 'Hex' => '1F478' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿ˜บ', 'iOS7' => '', 'Hex' => '1F63A'), - array('iOS2' => '', 'iOS5' => '๐Ÿ˜ธ', 'iOS7' => '', 'Hex' => '1F638'), - array('iOS2' => '', 'iOS5' => '๐Ÿ˜ป', 'iOS7' => '', 'Hex' => '1F63B'), - array('iOS2' => '', 'iOS5' => '๐Ÿ˜ฝ', 'iOS7' => '', 'Hex' => '1F63D'), - array('iOS2' => '', 'iOS5' => '๐Ÿ˜ผ', 'iOS7' => '', 'Hex' => '1F63C'), - array('iOS2' => '', 'iOS5' => '๐Ÿ™€', 'iOS7' => '', 'Hex' => '1F640'), - array('iOS2' => '', 'iOS5' => '๐Ÿ˜ฟ', 'iOS7' => '', 'Hex' => '1F63F'), - array('iOS2' => '', 'iOS5' => '๐Ÿ˜น', 'iOS7' => '', 'Hex' => '1F639'), - array('iOS2' => '', 'iOS5' => '๐Ÿ˜พ', 'iOS7' => '', 'Hex' => '1F63E'), - array('iOS2' => '', 'iOS5' => '๐Ÿ‘น', 'iOS7' => '', 'Hex' => '1F479'), - array('iOS2' => '', 'iOS5' => '๐Ÿ‘บ', 'iOS7' => '', 'Hex' => '1F47A'), - array('iOS2' => '', 'iOS5' => '๐Ÿ™ˆ', 'iOS7' => '', 'Hex' => '1F648'), - array('iOS2' => '', 'iOS5' => '๐Ÿ™‰', 'iOS7' => '', 'Hex' => '1F649'), - array('iOS2' => '', 'iOS5' => '๐Ÿ™Š', 'iOS7' => '', 'Hex' => '1F64A'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ’€', - 'iOS7' => '', - 'Hex' => '1F480' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ‘ฝ', - 'iOS7' => '', - 'Hex' => '1F47D' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ’ฉ', - 'iOS7' => '', - 'Hex' => '1F4A9' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ”ฅ', - 'iOS7' => '', - 'Hex' => '1F525' - ), - array('iOS2' => '', 'iOS5' => 'โœจ', 'iOS7' => '', 'Hex' => '2728'), - array( - 'iOS2' => '', - 'iOS5' => '๐ŸŒŸ', - 'iOS7' => '', - 'Hex' => '1F31F' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿ’ซ', 'iOS7' => '', 'Hex' => '1F4AB'), - array('iOS2' => '', 'iOS5' => '๐Ÿ’ฅ', 'iOS7' => '', 'Hex' => '1F4A5'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ’ข', - 'iOS7' => '', - 'Hex' => '1F4A2' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ’ฆ', - 'iOS7' => '', - 'Hex' => '1F4A6' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿ’ง', 'iOS7' => '', 'Hex' => '1F4A7'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ’ค', - 'iOS7' => '', - 'Hex' => '1F4A4' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ’จ', - 'iOS7' => '', - 'Hex' => '1F4A8' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ‘‚', - 'iOS7' => '', - 'Hex' => '1F442' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ‘€', - 'iOS7' => '', - 'Hex' => '1F440' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ‘ƒ', - 'iOS7' => '', - 'Hex' => '1F443' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿ‘…', 'iOS7' => '', 'Hex' => '1F445'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ‘„', - 'iOS7' => '', - 'Hex' => '1F444' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ‘', - 'iOS7' => '', - 'Hex' => '1F44D' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ‘Ž', - 'iOS7' => '', - 'Hex' => '1F44E' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ‘Œ', - 'iOS7' => '', - 'Hex' => '1F44C' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ‘Š', - 'iOS7' => '', - 'Hex' => '1F44A' - ), - array('iOS2' => '', 'iOS5' => 'โœŠ', 'iOS7' => '', 'Hex' => '270A'), - array( - 'iOS2' => '', - 'iOS5' => 'โœŒ', - 'iOS7' => 'โœŒ๏ธ', - 'Hex' => '270C' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ‘‹', - 'iOS7' => '', - 'Hex' => '1F44B' - ), - array('iOS2' => '', 'iOS5' => 'โœ‹', 'iOS7' => '', 'Hex' => '270B'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ‘', - 'iOS7' => '', - 'Hex' => '1F450' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ‘†', - 'iOS7' => '', - 'Hex' => '1F446' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ‘‡', - 'iOS7' => '', - 'Hex' => '1F447' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ‘‰', - 'iOS7' => '', - 'Hex' => '1F449' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ‘ˆ', - 'iOS7' => '', - 'Hex' => '1F448' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ™Œ', - 'iOS7' => '', - 'Hex' => '1F64C' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ™', - 'iOS7' => '', - 'Hex' => '1F64F' - ), - array( - 'iOS2' => '', - 'iOS5' => 'โ˜', - 'iOS7' => 'โ˜๏ธ', - 'Hex' => '261D' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ‘', - 'iOS7' => '', - 'Hex' => '1F44F' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ’ช', - 'iOS7' => '', - 'Hex' => '1F4AA' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿšถ', - 'iOS7' => '', - 'Hex' => '1F6B6' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿƒ', - 'iOS7' => '', - 'Hex' => '1F3C3' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ’ƒ', - 'iOS7' => '', - 'Hex' => '1F483' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ‘ซ', - 'iOS7' => '', - 'Hex' => '1F46B' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿ‘ช', 'iOS7' => '', 'Hex' => '1F46A'), - array('iOS2' => '', 'iOS5' => '๐Ÿ‘ฌ', 'iOS7' => '', 'Hex' => '1F46C'), - array('iOS2' => '', 'iOS5' => '๐Ÿ‘ญ', 'iOS7' => '', 'Hex' => '1F46D'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ’', - 'iOS7' => '', - 'Hex' => '1F48F' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ’‘', - 'iOS7' => '', - 'Hex' => '1F491' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ‘ฏ', - 'iOS7' => '', - 'Hex' => '1F46F' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ™†', - 'iOS7' => '', - 'Hex' => '1F646' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ™…', - 'iOS7' => '', - 'Hex' => '1F645' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ’', - 'iOS7' => '', - 'Hex' => '1F481' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿ™‹', 'iOS7' => '', 'Hex' => '1F64B'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ’†', - 'iOS7' => '', - 'Hex' => '1F486' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ’‡', - 'iOS7' => '', - 'Hex' => '1F487' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ’…', - 'iOS7' => '', - 'Hex' => '1F485' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿ‘ฐ', 'iOS7' => '', 'Hex' => '1F470'), - array('iOS2' => '', 'iOS5' => '๐Ÿ™Ž', 'iOS7' => '', 'Hex' => '1F64E'), - array('iOS2' => '', 'iOS5' => '๐Ÿ™', 'iOS7' => '', 'Hex' => '1F64D'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ™‡', - 'iOS7' => '', - 'Hex' => '1F647' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐ŸŽฉ', - 'iOS7' => '', - 'Hex' => '1F3A9' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ‘‘', - 'iOS7' => '', - 'Hex' => '1F451' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ‘’', - 'iOS7' => '', - 'Hex' => '1F452' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ‘Ÿ', - 'iOS7' => '', - 'Hex' => '1F45F' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿ‘ž', 'iOS7' => '', 'Hex' => '1F45E'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ‘ก', - 'iOS7' => '', - 'Hex' => '1F461' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ‘ ', - 'iOS7' => '', - 'Hex' => '1F460' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ‘ข', - 'iOS7' => '', - 'Hex' => '1F462' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ‘•', - 'iOS7' => '', - 'Hex' => '1F455' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ‘”', - 'iOS7' => '', - 'Hex' => '1F454' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿ‘š', 'iOS7' => '', 'Hex' => '1F45A'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ‘—', - 'iOS7' => '', - 'Hex' => '1F457' - ), - array('iOS2' => '', 'iOS5' => '๐ŸŽฝ', 'iOS7' => '', 'Hex' => '1F3BD'), - array('iOS2' => '', 'iOS5' => '๐Ÿ‘–', 'iOS7' => '', 'Hex' => '1F456'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ‘˜', - 'iOS7' => '', - 'Hex' => '1F458' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ‘™', - 'iOS7' => '', - 'Hex' => '1F459' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ’ผ', - 'iOS7' => '', - 'Hex' => '1F4BC' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ‘œ', - 'iOS7' => '', - 'Hex' => '1F45C' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿ‘', 'iOS7' => '', 'Hex' => '1F45D'), - array('iOS2' => '', 'iOS5' => '๐Ÿ‘›', 'iOS7' => '', 'Hex' => '1F45B'), - array('iOS2' => '', 'iOS5' => '๐Ÿ‘“', 'iOS7' => '', 'Hex' => '1F453'), - array( - 'iOS2' => '', - 'iOS5' => '๐ŸŽ€', - 'iOS7' => '', - 'Hex' => '1F380' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐ŸŒ‚', - 'iOS7' => '', - 'Hex' => '1F302' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ’„', - 'iOS7' => '', - 'Hex' => '1F484' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ’›', - 'iOS7' => '', - 'Hex' => '1F49B' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ’™', - 'iOS7' => '', - 'Hex' => '1F499' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ’œ', - 'iOS7' => '', - 'Hex' => '1F49C' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ’š', - 'iOS7' => '', - 'Hex' => '1F49A' - ), - array( - 'iOS2' => '', - 'iOS5' => 'โค', - 'iOS7' => 'โค๏ธ', - 'Hex' => '2764' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ’”', - 'iOS7' => '', - 'Hex' => '1F494' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ’—', - 'iOS7' => '', - 'Hex' => '1F497' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ’“', - 'iOS7' => '', - 'Hex' => '1F493' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿ’•', 'iOS7' => '', 'Hex' => '1F495'), - array('iOS2' => '', 'iOS5' => '๐Ÿ’–', 'iOS7' => '', 'Hex' => '1F496'), - array('iOS2' => '', 'iOS5' => '๐Ÿ’ž', 'iOS7' => '', 'Hex' => '1F49E'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ’˜', - 'iOS7' => '', - 'Hex' => '1F498' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿ’Œ', 'iOS7' => '', 'Hex' => '1F48C'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ’‹', - 'iOS7' => '', - 'Hex' => '1F48B' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ’', - 'iOS7' => '', - 'Hex' => '1F48D' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ’Ž', - 'iOS7' => '', - 'Hex' => '1F48E' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿ‘ค', 'iOS7' => '', 'Hex' => '1F464'), - array('iOS2' => '', 'iOS5' => '๐Ÿ‘ฅ', 'iOS7' => '', 'Hex' => '1F465'), - array('iOS2' => '', 'iOS5' => '๐Ÿ’ฌ', 'iOS7' => '', 'Hex' => '1F4AC'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ‘ฃ', - 'iOS7' => '', - 'Hex' => '1F463' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿ’ญ', 'iOS7' => '', 'Hex' => '1F4AD'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ ', - 'iOS7' => '', - 'Hex' => '1F3E0' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿก', 'iOS7' => '', 'Hex' => '1F3E1'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿซ', - 'iOS7' => '', - 'Hex' => '1F3EB' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿข', - 'iOS7' => '', - 'Hex' => '1F3E2' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿฃ', - 'iOS7' => '', - 'Hex' => '1F3E3' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿฅ', - 'iOS7' => '', - 'Hex' => '1F3E5' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿฆ', - 'iOS7' => '', - 'Hex' => '1F3E6' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿช', - 'iOS7' => '', - 'Hex' => '1F3EA' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿฉ', - 'iOS7' => '', - 'Hex' => '1F3E9' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿจ', - 'iOS7' => '', - 'Hex' => '1F3E8' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ’’', - 'iOS7' => '', - 'Hex' => '1F492' - ), - array( - 'iOS2' => '', - 'iOS5' => 'โ›ช', - 'iOS7' => 'โ›ช๏ธ', - 'Hex' => '26EA' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿฌ', - 'iOS7' => '', - 'Hex' => '1F3EC' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿค', 'iOS7' => '', 'Hex' => '1F3E4'), - array( - 'iOS2' => '', - 'iOS5' => '๐ŸŒ‡', - 'iOS7' => '', - 'Hex' => '1F307' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐ŸŒ†', - 'iOS7' => '', - 'Hex' => '1F306' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿฏ', - 'iOS7' => '', - 'Hex' => '1F3EF' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿฐ', - 'iOS7' => '', - 'Hex' => '1F3F0' - ), - array( - 'iOS2' => '', - 'iOS5' => 'โ›บ', - 'iOS7' => 'โ›บ๏ธ', - 'Hex' => '26FA' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿญ', - 'iOS7' => '', - 'Hex' => '1F3ED' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ—ผ', - 'iOS7' => '', - 'Hex' => '1F5FC' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿ—พ', 'iOS7' => '', 'Hex' => '1F5FE'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ—ป', - 'iOS7' => '', - 'Hex' => '1F5FB' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐ŸŒ„', - 'iOS7' => '', - 'Hex' => '1F304' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐ŸŒ…', - 'iOS7' => '', - 'Hex' => '1F305' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐ŸŒƒ', - 'iOS7' => '', - 'Hex' => '1F303' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ—ฝ', - 'iOS7' => '', - 'Hex' => '1F5FD' - ), - array('iOS2' => '', 'iOS5' => '๐ŸŒ‰', 'iOS7' => '', 'Hex' => '1F309'), - array('iOS2' => '', 'iOS5' => '๐ŸŽ ', 'iOS7' => '', 'Hex' => '1F3A0'), - array( - 'iOS2' => '', - 'iOS5' => '๐ŸŽก', - 'iOS7' => '', - 'Hex' => '1F3A1' - ), - array( - 'iOS2' => '', - 'iOS5' => 'โ›ฒ', - 'iOS7' => 'โ›ฒ๏ธ', - 'Hex' => '26F2' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐ŸŽข', - 'iOS7' => '', - 'Hex' => '1F3A2' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿšข', - 'iOS7' => '', - 'Hex' => '1F6A2' - ), - array( - 'iOS2' => '', - 'iOS5' => 'โ›ต', - 'iOS7' => 'โ›ต๏ธ', - 'Hex' => '26F5' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿšค', - 'iOS7' => '', - 'Hex' => '1F6A4' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿšฃ', 'iOS7' => '', 'Hex' => '1F6A3'), - array('iOS2' => '', 'iOS5' => 'โš“', 'iOS7' => 'โš“๏ธ', 'Hex' => '2693'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿš€', - 'iOS7' => '', - 'Hex' => '1F680' - ), - array( - 'iOS2' => '', - 'iOS5' => 'โœˆ', - 'iOS7' => 'โœˆ๏ธ', - 'Hex' => '2708' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ’บ', - 'iOS7' => '', - 'Hex' => '1F4BA' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿš', 'iOS7' => '', 'Hex' => '1F681'), - array('iOS2' => '', 'iOS5' => '๐Ÿš‚', 'iOS7' => '', 'Hex' => '1F682'), - array('iOS2' => '', 'iOS5' => '๐ŸšŠ', 'iOS7' => '', 'Hex' => '1F68A'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿš‰', - 'iOS7' => '', - 'Hex' => '1F689' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿšž', 'iOS7' => '', 'Hex' => '1F69E'), - array('iOS2' => '', 'iOS5' => '๐Ÿš†', 'iOS7' => '', 'Hex' => '1F686'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿš„', - 'iOS7' => '', - 'Hex' => '1F684' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿš…', - 'iOS7' => '', - 'Hex' => '1F685' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿšˆ', 'iOS7' => '', 'Hex' => '1F688'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿš‡', - 'iOS7' => '', - 'Hex' => '1F687' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿš', 'iOS7' => '', 'Hex' => '1F69D'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿš‹', - 'iOS7' => '', - 'Hex' => '1F68B' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿšƒ', 'iOS7' => '', 'Hex' => '1F683'), - array('iOS2' => '', 'iOS5' => '๐ŸšŽ', 'iOS7' => '', 'Hex' => '1F68E'), - array( - 'iOS2' => '', - 'iOS5' => '๐ŸšŒ', - 'iOS7' => '', - 'Hex' => '1F68C' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿš', 'iOS7' => '', 'Hex' => '1F68D'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿš™', - 'iOS7' => '', - 'Hex' => '1F699' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿš˜', 'iOS7' => '', 'Hex' => '1F698'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿš—', - 'iOS7' => '', - 'Hex' => '1F697' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿš•', - 'iOS7' => '', - 'Hex' => '1F695' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿš–', 'iOS7' => '', 'Hex' => '1F696'), - array('iOS2' => '', 'iOS5' => '๐Ÿš›', 'iOS7' => '', 'Hex' => '1F69B'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿšš', - 'iOS7' => '', - 'Hex' => '1F69A' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿšจ', 'iOS7' => '', 'Hex' => '1F6A8'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿš“', - 'iOS7' => '', - 'Hex' => '1F693' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿš”', 'iOS7' => '', 'Hex' => '1F694'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿš’', - 'iOS7' => '', - 'Hex' => '1F692' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿš‘', - 'iOS7' => '', - 'Hex' => '1F691' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿš', 'iOS7' => '', 'Hex' => '1F690'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿšฒ', - 'iOS7' => '', - 'Hex' => '1F6B2' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿšก', 'iOS7' => '', 'Hex' => '1F6A1'), - array('iOS2' => '', 'iOS5' => '๐ŸšŸ', 'iOS7' => '', 'Hex' => '1F69F'), - array('iOS2' => '', 'iOS5' => '๐Ÿš ', 'iOS7' => '', 'Hex' => '1F6A0'), - array('iOS2' => '', 'iOS5' => '๐Ÿšœ', 'iOS7' => '', 'Hex' => '1F69C'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ’ˆ', - 'iOS7' => '', - 'Hex' => '1F488' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿš', - 'iOS7' => '', - 'Hex' => '1F68F' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐ŸŽซ', - 'iOS7' => '', - 'Hex' => '1F3AB' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿšฆ', 'iOS7' => '', 'Hex' => '1F6A6'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿšฅ', - 'iOS7' => '', - 'Hex' => '1F6A5' - ), - array( - 'iOS2' => '', - 'iOS5' => 'โš ', - 'iOS7' => 'โš ๏ธ', - 'Hex' => '26A0' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿšง', - 'iOS7' => '', - 'Hex' => '1F6A7' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ”ฐ', - 'iOS7' => '', - 'Hex' => '1F530' - ), - array( - 'iOS2' => '', - 'iOS5' => 'โ›ฝ', - 'iOS7' => 'โ›ฝ๏ธ', - 'Hex' => '26FD' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿฎ', 'iOS7' => '', 'Hex' => '1F3EE'), - array( - 'iOS2' => '', - 'iOS5' => '๐ŸŽฐ', - 'iOS7' => '', - 'Hex' => '1F3B0' - ), - array( - 'iOS2' => '', - 'iOS5' => 'โ™จ', - 'iOS7' => 'โ™จ๏ธ', - 'Hex' => '2668' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿ—ฟ', 'iOS7' => '', 'Hex' => '1F5FF'), - array('iOS2' => '', 'iOS5' => '๐ŸŽช', 'iOS7' => '', 'Hex' => '1F3AA'), - array('iOS2' => '', 'iOS5' => '๐ŸŽญ', 'iOS7' => '', 'Hex' => '1F3AD'), - array('iOS2' => '', 'iOS5' => '๐Ÿ“', 'iOS7' => '', 'Hex' => '1F4CD'), - array('iOS2' => '', 'iOS5' => '๐Ÿšฉ', 'iOS7' => '', 'Hex' => '1F6A9'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ‡ฏ๐Ÿ‡ต', - 'iOS7' => '', - 'Hex' => '1F1EF_1F1F5' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ‡ฐ๐Ÿ‡ท', - 'iOS7' => '', - 'Hex' => '1F1F0_1F1F7' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ‡ฉ๐Ÿ‡ช', - 'iOS7' => '', - 'Hex' => '1F1E9_1F1EA' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ‡จ๐Ÿ‡ณ', - 'iOS7' => '', - 'Hex' => '1F1E8_1F1F3' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ‡บ๐Ÿ‡ธ', - 'iOS7' => '', - 'Hex' => '1F1FA_1F1F8' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ‡ซ๐Ÿ‡ท', - 'iOS7' => '', - 'Hex' => '1F1EB_1F1F7' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ‡ช๐Ÿ‡ธ', - 'iOS7' => '', - 'Hex' => '1F1EA_1F1F8' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ‡ฎ๐Ÿ‡น', - 'iOS7' => '', - 'Hex' => '1F1EE_1F1F9' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ‡ท๐Ÿ‡บ', - 'iOS7' => '', - 'Hex' => '1F1F7_1F1FA' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ‡ฌ๐Ÿ‡ง', - 'iOS7' => '', - 'Hex' => '1F1EC_1F1E7' - ), - array( - 'iOS2' => '', - 'iOS5' => '', - 'iOS7' => '', - 'Hex' => '' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿถ', - 'iOS7' => '', - 'Hex' => '1F436' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿบ', - 'iOS7' => '', - 'Hex' => '1F43A' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿฑ', - 'iOS7' => '', - 'Hex' => '1F431' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿญ', - 'iOS7' => '', - 'Hex' => '1F42D' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿน', - 'iOS7' => '', - 'Hex' => '1F439' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿฐ', - 'iOS7' => '', - 'Hex' => '1F430' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿธ', - 'iOS7' => '', - 'Hex' => '1F438' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿฏ', - 'iOS7' => '', - 'Hex' => '1F42F' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿจ', - 'iOS7' => '', - 'Hex' => '1F428' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿป', - 'iOS7' => '', - 'Hex' => '1F43B' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿท', - 'iOS7' => '', - 'Hex' => '1F437' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿฝ', 'iOS7' => '', 'Hex' => '1F43D'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿฎ', - 'iOS7' => '', - 'Hex' => '1F42E' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ—', - 'iOS7' => '', - 'Hex' => '1F417' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿต', - 'iOS7' => '', - 'Hex' => '1F435' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ’', - 'iOS7' => '', - 'Hex' => '1F412' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿด', - 'iOS7' => '', - 'Hex' => '1F434' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ‘', - 'iOS7' => '', - 'Hex' => '1F411' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ˜', - 'iOS7' => '', - 'Hex' => '1F418' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿผ', 'iOS7' => '', 'Hex' => '1F43C'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿง', - 'iOS7' => '', - 'Hex' => '1F427' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿฆ', - 'iOS7' => '', - 'Hex' => '1F426' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿค', - 'iOS7' => '', - 'Hex' => '1F424' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿฅ', 'iOS7' => '', 'Hex' => '1F425'), - array('iOS2' => '', 'iOS5' => '๐Ÿฃ', 'iOS7' => '', 'Hex' => '1F423'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ”', - 'iOS7' => '', - 'Hex' => '1F414' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ', - 'iOS7' => '', - 'Hex' => '1F40D' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿข', 'iOS7' => '', 'Hex' => '1F422'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ›', - 'iOS7' => '', - 'Hex' => '1F41B' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿ', 'iOS7' => '', 'Hex' => '1F41D'), - array('iOS2' => '', 'iOS5' => '๐Ÿœ', 'iOS7' => '', 'Hex' => '1F41C'), - array('iOS2' => '', 'iOS5' => '๐Ÿž', 'iOS7' => '', 'Hex' => '1F41E'), - array('iOS2' => '', 'iOS5' => '๐ŸŒ', 'iOS7' => '', 'Hex' => '1F40C'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ™', - 'iOS7' => '', - 'Hex' => '1F419' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿš', - 'iOS7' => '', - 'Hex' => '1F41A' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ ', - 'iOS7' => '', - 'Hex' => '1F420' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐ŸŸ', - 'iOS7' => '', - 'Hex' => '1F41F' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿฌ', - 'iOS7' => '', - 'Hex' => '1F42C' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿณ', - 'iOS7' => '', - 'Hex' => '1F433' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿ‹', 'iOS7' => '', 'Hex' => '1F40B'), - array('iOS2' => '', 'iOS5' => '๐Ÿ„', 'iOS7' => '', 'Hex' => '1F404'), - array('iOS2' => '', 'iOS5' => '๐Ÿ', 'iOS7' => '', 'Hex' => '1F40F'), - array('iOS2' => '', 'iOS5' => '๐Ÿ€', 'iOS7' => '', 'Hex' => '1F400'), - array('iOS2' => '', 'iOS5' => '๐Ÿƒ', 'iOS7' => '', 'Hex' => '1F403'), - array('iOS2' => '', 'iOS5' => '๐Ÿ…', 'iOS7' => '', 'Hex' => '1F405'), - array('iOS2' => '', 'iOS5' => '๐Ÿ‡', 'iOS7' => '', 'Hex' => '1F407'), - array('iOS2' => '', 'iOS5' => '๐Ÿ‰', 'iOS7' => '', 'Hex' => '1F409'), - array( - 'iOS2' => '', - 'iOS5' => '๐ŸŽ', - 'iOS7' => '', - 'Hex' => '1F40E' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿ', 'iOS7' => '', 'Hex' => '1F410'), - array('iOS2' => '', 'iOS5' => '๐Ÿ“', 'iOS7' => '', 'Hex' => '1F413'), - array('iOS2' => '', 'iOS5' => '๐Ÿ•', 'iOS7' => '', 'Hex' => '1F415'), - array('iOS2' => '', 'iOS5' => '๐Ÿ–', 'iOS7' => '', 'Hex' => '1F416'), - array('iOS2' => '', 'iOS5' => '๐Ÿ', 'iOS7' => '', 'Hex' => '1F401'), - array('iOS2' => '', 'iOS5' => '๐Ÿ‚', 'iOS7' => '', 'Hex' => '1F402'), - array('iOS2' => '', 'iOS5' => '๐Ÿฒ', 'iOS7' => '', 'Hex' => '1F432'), - array('iOS2' => '', 'iOS5' => '๐Ÿก', 'iOS7' => '', 'Hex' => '1F421'), - array('iOS2' => '', 'iOS5' => '๐ŸŠ', 'iOS7' => '', 'Hex' => '1F40A'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿซ', - 'iOS7' => '', - 'Hex' => '1F42B' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿช', 'iOS7' => '', 'Hex' => '1F42A'), - array('iOS2' => '', 'iOS5' => '๐Ÿ†', 'iOS7' => '', 'Hex' => '1F406'), - array('iOS2' => '', 'iOS5' => '๐Ÿˆ', 'iOS7' => '', 'Hex' => '1F408'), - array('iOS2' => '', 'iOS5' => '๐Ÿฉ', 'iOS7' => '', 'Hex' => '1F429'), - array('iOS2' => '', 'iOS5' => '๐Ÿพ', 'iOS7' => '', 'Hex' => '1F43E'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ’', - 'iOS7' => '', - 'Hex' => '1F490' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐ŸŒธ', - 'iOS7' => '', - 'Hex' => '1F338' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐ŸŒท', - 'iOS7' => '', - 'Hex' => '1F337' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ€', - 'iOS7' => '', - 'Hex' => '1F340' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐ŸŒน', - 'iOS7' => '', - 'Hex' => '1F339' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐ŸŒป', - 'iOS7' => '', - 'Hex' => '1F33B' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐ŸŒบ', - 'iOS7' => '', - 'Hex' => '1F33A' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ', - 'iOS7' => '', - 'Hex' => '1F341' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿƒ', - 'iOS7' => '', - 'Hex' => '1F343' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ‚', - 'iOS7' => '', - 'Hex' => '1F342' - ), - array('iOS2' => '', 'iOS5' => '๐ŸŒฟ', 'iOS7' => '', 'Hex' => '1F33F'), - array( - 'iOS2' => '', - 'iOS5' => '๐ŸŒพ', - 'iOS7' => '', - 'Hex' => '1F33E' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿ„', 'iOS7' => '', 'Hex' => '1F344'), - array( - 'iOS2' => '', - 'iOS5' => '๐ŸŒต', - 'iOS7' => '', - 'Hex' => '1F335' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐ŸŒด', - 'iOS7' => '', - 'Hex' => '1F334' - ), - array('iOS2' => '', 'iOS5' => '๐ŸŒฒ', 'iOS7' => '', 'Hex' => '1F332'), - array('iOS2' => '', 'iOS5' => '๐ŸŒณ', 'iOS7' => '', 'Hex' => '1F333'), - array('iOS2' => '', 'iOS5' => '๐ŸŒฐ', 'iOS7' => '', 'Hex' => '1F330'), - array('iOS2' => '', 'iOS5' => '๐ŸŒฑ', 'iOS7' => '', 'Hex' => '1F331'), - array('iOS2' => '', 'iOS5' => '๐ŸŒผ', 'iOS7' => '', 'Hex' => '1F33C'), - array('iOS2' => '', 'iOS5' => '๐ŸŒ', 'iOS7' => '', 'Hex' => '1F310'), - array('iOS2' => '', 'iOS5' => '๐ŸŒž', 'iOS7' => '', 'Hex' => '1F31E'), - array('iOS2' => '', 'iOS5' => '๐ŸŒ', 'iOS7' => '', 'Hex' => '1F31D'), - array('iOS2' => '', 'iOS5' => '๐ŸŒš', 'iOS7' => '', 'Hex' => '1F31A'), - array('iOS2' => '', 'iOS5' => '๐ŸŒ‘', 'iOS7' => '', 'Hex' => '1F311'), - array('iOS2' => '', 'iOS5' => '๐ŸŒ’', 'iOS7' => '', 'Hex' => '1F312'), - array('iOS2' => '', 'iOS5' => '๐ŸŒ“', 'iOS7' => '', 'Hex' => '1F313'), - array('iOS2' => '', 'iOS5' => '๐ŸŒ”', 'iOS7' => '', 'Hex' => '1F314'), - array('iOS2' => '', 'iOS5' => '๐ŸŒ•', 'iOS7' => '', 'Hex' => '1F315'), - array('iOS2' => '', 'iOS5' => '๐ŸŒ–', 'iOS7' => '', 'Hex' => '1F316'), - array('iOS2' => '', 'iOS5' => '๐ŸŒ—', 'iOS7' => '', 'Hex' => '1F317'), - array('iOS2' => '', 'iOS5' => '๐ŸŒ˜', 'iOS7' => '', 'Hex' => '1F318'), - array('iOS2' => '', 'iOS5' => '๐ŸŒœ', 'iOS7' => '', 'Hex' => '1F31C'), - array('iOS2' => '', 'iOS5' => '๐ŸŒ›', 'iOS7' => '', 'Hex' => '1F31B'), - array( - 'iOS2' => '', - 'iOS5' => '๐ŸŒ™', - 'iOS7' => '', - 'Hex' => '1F319' - ), - array('iOS2' => '', 'iOS5' => '๐ŸŒ', 'iOS7' => '', 'Hex' => '1F30D'), - array('iOS2' => '', 'iOS5' => '๐ŸŒŽ', 'iOS7' => '', 'Hex' => '1F30E'), - array('iOS2' => '', 'iOS5' => '๐ŸŒ', 'iOS7' => '', 'Hex' => '1F30F'), - array('iOS2' => '', 'iOS5' => '๐ŸŒ‹', 'iOS7' => '', 'Hex' => '1F30B'), - array('iOS2' => '', 'iOS5' => '๐ŸŒŒ', 'iOS7' => '', 'Hex' => '1F30C'), - array('iOS2' => '', 'iOS5' => '๐ŸŒ ', 'iOS7' => '', 'Hex' => '1F320'), - array('iOS2' => '', 'iOS5' => 'โญ', 'iOS7' => 'โญ๏ธ', 'Hex' => '2B50'), - array( - 'iOS2' => '', - 'iOS5' => 'โ˜€', - 'iOS7' => 'โ˜€๏ธ', - 'Hex' => '2600' - ), - array('iOS2' => '', 'iOS5' => 'โ›…', 'iOS7' => 'โ›…๏ธ', 'Hex' => '26C5'), - array( - 'iOS2' => '', - 'iOS5' => 'โ˜', - 'iOS7' => 'โ˜๏ธ', - 'Hex' => '2601' - ), - array( - 'iOS2' => '', - 'iOS5' => 'โšก', - 'iOS7' => 'โšก๏ธ', - 'Hex' => '26A1' - ), - array( - 'iOS2' => '', - 'iOS5' => 'โ˜”', - 'iOS7' => 'โ˜”๏ธ', - 'Hex' => '2614' - ), - array('iOS2' => '', 'iOS5' => 'โ„', 'iOS7' => 'โ„๏ธ', 'Hex' => '2744'), - array( - 'iOS2' => '', - 'iOS5' => 'โ›„', - 'iOS7' => 'โ›„๏ธ', - 'Hex' => '26C4' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐ŸŒ€', - 'iOS7' => '๐ŸŒ€', - 'Hex' => '1F300' - ), - array('iOS2' => '', 'iOS5' => '๐ŸŒ', 'iOS7' => '', 'Hex' => '1F301'), - array( - 'iOS2' => '', - 'iOS5' => '๐ŸŒˆ', - 'iOS7' => '', - 'Hex' => '1F308' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐ŸŒŠ', - 'iOS7' => '', - 'Hex' => '1F30A' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐ŸŽ', - 'iOS7' => '', - 'Hex' => '1F38D' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ’', - 'iOS7' => '', - 'Hex' => '1F49D' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐ŸŽŽ', - 'iOS7' => '', - 'Hex' => '1F38E' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐ŸŽ’', - 'iOS7' => '', - 'Hex' => '1F392' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐ŸŽ“', - 'iOS7' => '', - 'Hex' => '1F393' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐ŸŽ', - 'iOS7' => '', - 'Hex' => '1F38F' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐ŸŽ†', - 'iOS7' => '', - 'Hex' => '1F386' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐ŸŽ‡', - 'iOS7' => '', - 'Hex' => '1F387' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐ŸŽ', - 'iOS7' => '', - 'Hex' => '1F390' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐ŸŽ‘', - 'iOS7' => '', - 'Hex' => '1F391' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐ŸŽƒ', - 'iOS7' => '', - 'Hex' => '1F383' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ‘ป', - 'iOS7' => '', - 'Hex' => '1F47B' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐ŸŽ…', - 'iOS7' => '', - 'Hex' => '1F385' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐ŸŽ„', - 'iOS7' => '', - 'Hex' => '1F384' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐ŸŽ', - 'iOS7' => '', - 'Hex' => '1F381' - ), - array('iOS2' => '', 'iOS5' => '๐ŸŽ‹', 'iOS7' => '', 'Hex' => '1F38B'), - array( - 'iOS2' => '', - 'iOS5' => '๐ŸŽ‰', - 'iOS7' => '', - 'Hex' => '1F389' - ), - array('iOS2' => '', 'iOS5' => '๐ŸŽŠ', 'iOS7' => '', 'Hex' => '1F38A'), - array( - 'iOS2' => '', - 'iOS5' => '๐ŸŽˆ', - 'iOS7' => '', - 'Hex' => '1F388' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐ŸŽŒ', - 'iOS7' => '', - 'Hex' => '1F38C' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿ”ฎ', 'iOS7' => '', 'Hex' => '1F52E'), - array( - 'iOS2' => '', - 'iOS5' => '๐ŸŽฅ', - 'iOS7' => '', - 'Hex' => '1F3A5' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ“ท', - 'iOS7' => '', - 'Hex' => '1F4F7' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿ“น', 'iOS7' => '', 'Hex' => '1F4F9'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ“ผ', - 'iOS7' => '', - 'Hex' => '1F4FC' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ’ฟ', - 'iOS7' => '', - 'Hex' => '1F4BF' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ“€', - 'iOS7' => '', - 'Hex' => '1F4C0' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ’ฝ', - 'iOS7' => '', - 'Hex' => '1F4BD' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿ’พ', 'iOS7' => '', 'Hex' => '1F4BE'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ’ป', - 'iOS7' => '', - 'Hex' => '1F4BB' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ“ฑ', - 'iOS7' => '', - 'Hex' => '1F4F1' - ), - array( - 'iOS2' => '', - 'iOS5' => 'โ˜Ž', - 'iOS7' => 'โ˜Ž๏ธ', - 'Hex' => '260E' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿ“ž', 'iOS7' => '', 'Hex' => '1F4DE'), - array('iOS2' => '', 'iOS5' => '๐Ÿ“Ÿ', 'iOS7' => '', 'Hex' => '1F4DF'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ“ ', - 'iOS7' => '', - 'Hex' => '1F4E0' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ“ก', - 'iOS7' => '', - 'Hex' => '1F4E1' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ“บ', - 'iOS7' => '', - 'Hex' => '1F4FA' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ“ป', - 'iOS7' => '', - 'Hex' => '1F4FB' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿ”Š', 'iOS7' => '', 'Hex' => '1F50A'), - array('iOS2' => '', 'iOS5' => '๐Ÿ”‰', 'iOS7' => '', 'Hex' => '1F509'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ”ˆ', - 'iOS7' => '', - 'Hex' => '1F508' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿ”‡', 'iOS7' => '', 'Hex' => '1F507'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ””', - 'iOS7' => '', - 'Hex' => '1F514' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿ”•', 'iOS7' => '', 'Hex' => '1F515'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ“ข', - 'iOS7' => '', - 'Hex' => '1F4E2' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ“ฃ', - 'iOS7' => '', - 'Hex' => '1F4E3' - ), - array('iOS2' => '', 'iOS5' => 'โณ', 'iOS7' => '', 'Hex' => '23F3'), - array('iOS2' => '', 'iOS5' => 'โŒ›', 'iOS7' => 'โŒ›๏ธ', 'Hex' => '231B'), - array('iOS2' => '', 'iOS5' => 'โฐ', 'iOS7' => 'โฐ', 'Hex' => '23F0'), - array('iOS2' => '', 'iOS5' => 'โŒš', 'iOS7' => 'โŒš๏ธ', 'Hex' => '231A'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ”“', - 'iOS7' => '', - 'Hex' => '1F513' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ”’', - 'iOS7' => '', - 'Hex' => '1F512' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿ”', 'iOS7' => '', 'Hex' => '1F50F'), - array('iOS2' => '', 'iOS5' => '๐Ÿ”', 'iOS7' => '', 'Hex' => '1F510'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ”‘', - 'iOS7' => '', - 'Hex' => '1F511' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿ”Ž', 'iOS7' => '', 'Hex' => '1F50E'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ’ก', - 'iOS7' => '', - 'Hex' => '1F4A1' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿ”ฆ', 'iOS7' => '', 'Hex' => '1F526'), - array('iOS2' => '', 'iOS5' => '๐Ÿ”†', 'iOS7' => '', 'Hex' => '1F506'), - array('iOS2' => '', 'iOS5' => '๐Ÿ”…', 'iOS7' => '', 'Hex' => '1F505'), - array('iOS2' => '', 'iOS5' => '๐Ÿ”Œ', 'iOS7' => '', 'Hex' => '1F50C'), - array('iOS2' => '', 'iOS5' => '๐Ÿ”‹', 'iOS7' => '', 'Hex' => '1F50B'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ”', - 'iOS7' => '', - 'Hex' => '1F50D' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿ›', 'iOS7' => '', 'Hex' => '1F6C1'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ›€', - 'iOS7' => '', - 'Hex' => '1F6C0' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿšฟ', 'iOS7' => '', 'Hex' => '1F6BF'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿšฝ', - 'iOS7' => '', - 'Hex' => '1F6BD' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿ”ง', 'iOS7' => '', 'Hex' => '1F527'), - array('iOS2' => '', 'iOS5' => '๐Ÿ”ฉ', 'iOS7' => '', 'Hex' => '1F529'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ”จ', - 'iOS7' => '', - 'Hex' => '1F528' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿšช', 'iOS7' => '', 'Hex' => '1F6AA'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿšฌ', - 'iOS7' => '', - 'Hex' => '1F6AC' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ’ฃ', - 'iOS7' => '', - 'Hex' => '1F4A3' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ”ซ', - 'iOS7' => '', - 'Hex' => '1F52B' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿ”ช', 'iOS7' => '', 'Hex' => '1F52A'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ’Š', - 'iOS7' => '', - 'Hex' => '1F48A' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ’‰', - 'iOS7' => '', - 'Hex' => '1F489' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ’ฐ', - 'iOS7' => '', - 'Hex' => '1F4B0' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿ’ด', 'iOS7' => '', 'Hex' => '1F4B4'), - array('iOS2' => '', 'iOS5' => '๐Ÿ’ต', 'iOS7' => '', 'Hex' => '1F4B5'), - array('iOS2' => '', 'iOS5' => '๐Ÿ’ท', 'iOS7' => '', 'Hex' => '1F4B7'), - array('iOS2' => '', 'iOS5' => '๐Ÿ’ถ', 'iOS7' => '', 'Hex' => '1F4B6'), - array('iOS2' => '', 'iOS5' => '๐Ÿ’ณ', 'iOS7' => '', 'Hex' => '1F4B3'), - array('iOS2' => '', 'iOS5' => '๐Ÿ’ธ', 'iOS7' => '', 'Hex' => '1F4B8'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ“ฒ', - 'iOS7' => '', - 'Hex' => '1F4F2' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿ“ง', 'iOS7' => '', 'Hex' => '1F4E7'), - array('iOS2' => '', 'iOS5' => '๐Ÿ“ฅ', 'iOS7' => '', 'Hex' => '1F4E5'), - array('iOS2' => '', 'iOS5' => '๐Ÿ“ค', 'iOS7' => '', 'Hex' => '1F4E4'), - array('iOS2' => '', 'iOS5' => 'โœ‰', 'iOS7' => 'โœ‰๏ธ', 'Hex' => '2709'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ“ฉ', - 'iOS7' => '', - 'Hex' => '1F4E9' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿ“จ', 'iOS7' => '', 'Hex' => '1F4E8'), - array('iOS2' => '', 'iOS5' => '๐Ÿ“ฏ', 'iOS7' => '', 'Hex' => '1F4EF'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ“ซ', - 'iOS7' => '', - 'Hex' => '1F4EB' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿ“ช', 'iOS7' => '', 'Hex' => '1F4EA'), - array('iOS2' => '', 'iOS5' => '๐Ÿ“ฌ', 'iOS7' => '', 'Hex' => '1F4EC'), - array('iOS2' => '', 'iOS5' => '๐Ÿ“ญ', 'iOS7' => '', 'Hex' => '1F4ED'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ“ฎ', - 'iOS7' => '', - 'Hex' => '1F4EE' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿ“ฆ', 'iOS7' => '', 'Hex' => '1F4E6'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ“', - 'iOS7' => '', - 'Hex' => '1F4DD' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿ“„', 'iOS7' => '', 'Hex' => '1F4C4'), - array('iOS2' => '', 'iOS5' => '๐Ÿ“ƒ', 'iOS7' => '', 'Hex' => '1F4C3'), - array('iOS2' => '', 'iOS5' => '๐Ÿ“‘', 'iOS7' => '', 'Hex' => '1F4D1'), - array('iOS2' => '', 'iOS5' => '๐Ÿ“Š', 'iOS7' => '', 'Hex' => '1F4CA'), - array('iOS2' => '', 'iOS5' => '๐Ÿ“ˆ', 'iOS7' => '', 'Hex' => '1F4C8'), - array('iOS2' => '', 'iOS5' => '๐Ÿ“‰', 'iOS7' => '', 'Hex' => '1F4C9'), - array('iOS2' => '', 'iOS5' => '๐Ÿ“œ', 'iOS7' => '', 'Hex' => '1F4DC'), - array('iOS2' => '', 'iOS5' => '๐Ÿ“‹', 'iOS7' => '', 'Hex' => '1F4CB'), - array('iOS2' => '', 'iOS5' => '๐Ÿ“…', 'iOS7' => '', 'Hex' => '1F4C5'), - array('iOS2' => '', 'iOS5' => '๐Ÿ“†', 'iOS7' => '', 'Hex' => '1F4C6'), - array('iOS2' => '', 'iOS5' => '๐Ÿ“‡', 'iOS7' => '', 'Hex' => '1F4C7'), - array('iOS2' => '', 'iOS5' => '๐Ÿ“', 'iOS7' => '', 'Hex' => '1F4C1'), - array('iOS2' => '', 'iOS5' => '๐Ÿ“‚', 'iOS7' => '', 'Hex' => '1F4C2'), - array( - 'iOS2' => '', - 'iOS5' => 'โœ‚', - 'iOS7' => 'โœ‚๏ธ', - 'Hex' => '2702' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿ“Œ', 'iOS7' => '', 'Hex' => '1F4CC'), - array('iOS2' => '', 'iOS5' => '๐Ÿ“Ž', 'iOS7' => '', 'Hex' => '1F4CE'), - array('iOS2' => '', 'iOS5' => 'โœ’', 'iOS7' => 'โœ’๏ธ', 'Hex' => '2712'), - array('iOS2' => '', 'iOS5' => 'โœ', 'iOS7' => 'โœ๏ธ', 'Hex' => '270F'), - array('iOS2' => '', 'iOS5' => '๐Ÿ“', 'iOS7' => '', 'Hex' => '1F4CF'), - array('iOS2' => '', 'iOS5' => '๐Ÿ“', 'iOS7' => '', 'Hex' => '1F4D0'), - array('iOS2' => '', 'iOS5' => '๐Ÿ“•', 'iOS7' => '', 'Hex' => '1F4D5'), - array('iOS2' => '', 'iOS5' => '๐Ÿ“—', 'iOS7' => '', 'Hex' => '1F4D7'), - array('iOS2' => '', 'iOS5' => '๐Ÿ“˜', 'iOS7' => '', 'Hex' => '1F4D8'), - array('iOS2' => '', 'iOS5' => '๐Ÿ“™', 'iOS7' => '', 'Hex' => '1F4D9'), - array('iOS2' => '', 'iOS5' => '๐Ÿ““', 'iOS7' => '', 'Hex' => '1F4D3'), - array('iOS2' => '', 'iOS5' => '๐Ÿ“”', 'iOS7' => '', 'Hex' => '1F4D4'), - array('iOS2' => '', 'iOS5' => '๐Ÿ“’', 'iOS7' => '', 'Hex' => '1F4D2'), - array('iOS2' => '', 'iOS5' => '๐Ÿ“š', 'iOS7' => '', 'Hex' => '1F4DA'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ“–', - 'iOS7' => '', - 'Hex' => '1F4D6' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿ”–', 'iOS7' => '', 'Hex' => '1F516'), - array('iOS2' => '', 'iOS5' => '๐Ÿ“›', 'iOS7' => '', 'Hex' => '1F4DB'), - array('iOS2' => '', 'iOS5' => '๐Ÿ”ฌ', 'iOS7' => '', 'Hex' => '1F52C'), - array('iOS2' => '', 'iOS5' => '๐Ÿ”ญ', 'iOS7' => '', 'Hex' => '1F52D'), - array('iOS2' => '', 'iOS5' => '๐Ÿ“ฐ', 'iOS7' => '', 'Hex' => '1F4F0'), - array( - 'iOS2' => '', - 'iOS5' => '๐ŸŽจ', - 'iOS7' => '', - 'Hex' => '1F3A8' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐ŸŽฌ', - 'iOS7' => '', - 'Hex' => '1F3AC' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐ŸŽค', - 'iOS7' => '', - 'Hex' => '1F3A4' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐ŸŽง', - 'iOS7' => '', - 'Hex' => '1F3A7' - ), - array('iOS2' => '', 'iOS5' => '๐ŸŽผ', 'iOS7' => '', 'Hex' => '1F3BC'), - array( - 'iOS2' => '', - 'iOS5' => '๐ŸŽต', - 'iOS7' => '', - 'Hex' => '1F3B5' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐ŸŽถ', - 'iOS7' => '', - 'Hex' => '1F3B6' - ), - array('iOS2' => '', 'iOS5' => '๐ŸŽน', 'iOS7' => '', 'Hex' => '1F3B9'), - array('iOS2' => '', 'iOS5' => '๐ŸŽป', 'iOS7' => '', 'Hex' => '1F3BB'), - array( - 'iOS2' => '', - 'iOS5' => '๐ŸŽบ', - 'iOS7' => '', - 'Hex' => '1F3BA' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐ŸŽท', - 'iOS7' => '', - 'Hex' => '1F3B7' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐ŸŽธ', - 'iOS7' => '', - 'Hex' => '1F3B8' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ‘พ', - 'iOS7' => '', - 'Hex' => '1F47E' - ), - array('iOS2' => '', 'iOS5' => '๐ŸŽฎ', 'iOS7' => '', 'Hex' => '1F3AE'), - array('iOS2' => '', 'iOS5' => '๐Ÿƒ', 'iOS7' => '', 'Hex' => '1F0CF'), - array('iOS2' => '', 'iOS5' => '๐ŸŽด', 'iOS7' => '', 'Hex' => '1F3B4'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ€„', - 'iOS7' => '๐Ÿ€„๏ธ', - 'Hex' => '1F004' - ), - array('iOS2' => '', 'iOS5' => '๐ŸŽฒ', 'iOS7' => '', 'Hex' => '1F3B2'), - array( - 'iOS2' => '', - 'iOS5' => '๐ŸŽฏ', - 'iOS7' => '', - 'Hex' => '1F3AF' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿˆ', - 'iOS7' => '', - 'Hex' => '1F3C8' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ€', - 'iOS7' => '', - 'Hex' => '1F3C0' - ), - array( - 'iOS2' => '', - 'iOS5' => 'โšฝ', - 'iOS7' => 'โšฝ๏ธ', - 'Hex' => '26BD' - ), - array( - 'iOS2' => '', - 'iOS5' => 'โšพ', - 'iOS7' => 'โšพ๏ธ', - 'Hex' => '26BE' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐ŸŽพ', - 'iOS7' => '', - 'Hex' => '1F3BE' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐ŸŽฑ', - 'iOS7' => '', - 'Hex' => '1F3B1' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿ‰', 'iOS7' => '', 'Hex' => '1F3C9'), - array('iOS2' => '', 'iOS5' => '๐ŸŽณ', 'iOS7' => '', 'Hex' => '1F3B3'), - array( - 'iOS2' => '', - 'iOS5' => 'โ›ณ', - 'iOS7' => 'โ›ณ๏ธ', - 'Hex' => '26F3' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿšต', 'iOS7' => '', 'Hex' => '1F6B5'), - array('iOS2' => '', 'iOS5' => '๐Ÿšด', 'iOS7' => '', 'Hex' => '1F6B4'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ', - 'iOS7' => '', - 'Hex' => '1F3C1' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿ‡', 'iOS7' => '', 'Hex' => '1F3C7'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ†', - 'iOS7' => '', - 'Hex' => '1F3C6' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐ŸŽฟ', - 'iOS7' => '', - 'Hex' => '1F3BF' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿ‚', 'iOS7' => '', 'Hex' => '1F3C2'), - array( - 'iOS2' => '', - 'iOS5' => '๐ŸŠ', - 'iOS7' => '', - 'Hex' => '1F3CA' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ„', - 'iOS7' => '', - 'Hex' => '1F3C4' - ), - array('iOS2' => '', 'iOS5' => '๐ŸŽฃ', 'iOS7' => '', 'Hex' => '1F3A3'), - array( - 'iOS2' => '', - 'iOS5' => 'โ˜•', - 'iOS7' => 'โ˜•๏ธ', - 'Hex' => '2615' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿต', - 'iOS7' => '', - 'Hex' => '1F375' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿถ', - 'iOS7' => '', - 'Hex' => '1F376' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿผ', 'iOS7' => '', 'Hex' => '1F37C'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿบ', - 'iOS7' => '', - 'Hex' => '1F37A' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿป', - 'iOS7' => '', - 'Hex' => '1F37B' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿธ', - 'iOS7' => '', - 'Hex' => '1F378' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿน', 'iOS7' => '', 'Hex' => '1F379'), - array('iOS2' => '', 'iOS5' => '๐Ÿท', 'iOS7' => '', 'Hex' => '1F377'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿด', - 'iOS7' => '', - 'Hex' => '1F374' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿ•', 'iOS7' => '', 'Hex' => '1F355'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ”', - 'iOS7' => '', - 'Hex' => '1F354' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐ŸŸ', - 'iOS7' => '', - 'Hex' => '1F35F' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿ—', 'iOS7' => '', 'Hex' => '1F357'), - array('iOS2' => '', 'iOS5' => '๐Ÿ–', 'iOS7' => '', 'Hex' => '1F356'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ', - 'iOS7' => '', - 'Hex' => '1F35D' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ›', - 'iOS7' => '', - 'Hex' => '1F35B' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿค', 'iOS7' => '', 'Hex' => '1F364'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿฑ', - 'iOS7' => '', - 'Hex' => '1F371' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿฃ', - 'iOS7' => '', - 'Hex' => '1F363' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿฅ', 'iOS7' => '', 'Hex' => '1F365'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ™', - 'iOS7' => '', - 'Hex' => '1F359' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ˜', - 'iOS7' => '', - 'Hex' => '1F358' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿš', - 'iOS7' => '', - 'Hex' => '1F35A' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿœ', - 'iOS7' => '', - 'Hex' => '1F35C' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿฒ', - 'iOS7' => '', - 'Hex' => '1F372' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿข', - 'iOS7' => '', - 'Hex' => '1F362' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿก', - 'iOS7' => '', - 'Hex' => '1F361' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿณ', - 'iOS7' => '', - 'Hex' => '1F373' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿž', - 'iOS7' => '', - 'Hex' => '1F35E' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿฉ', 'iOS7' => '', 'Hex' => '1F369'), - array('iOS2' => '', 'iOS5' => '๐Ÿฎ', 'iOS7' => '', 'Hex' => '1F36E'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿฆ', - 'iOS7' => '', - 'Hex' => '1F366' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿจ', 'iOS7' => '', 'Hex' => '1F368'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿง', - 'iOS7' => '', - 'Hex' => '1F367' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐ŸŽ‚', - 'iOS7' => '', - 'Hex' => '1F382' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿฐ', - 'iOS7' => '', - 'Hex' => '1F370' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿช', 'iOS7' => '', 'Hex' => '1F36A'), - array('iOS2' => '', 'iOS5' => '๐Ÿซ', 'iOS7' => '', 'Hex' => '1F36B'), - array('iOS2' => '', 'iOS5' => '๐Ÿฌ', 'iOS7' => '', 'Hex' => '1F36C'), - array('iOS2' => '', 'iOS5' => '๐Ÿญ', 'iOS7' => '', 'Hex' => '1F36D'), - array('iOS2' => '', 'iOS5' => '๐Ÿฏ', 'iOS7' => '', 'Hex' => '1F36F'), - array( - 'iOS2' => '', - 'iOS5' => '๐ŸŽ', - 'iOS7' => '', - 'Hex' => '1F34E' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿ', 'iOS7' => '', 'Hex' => '1F34F'), - array( - 'iOS2' => '', - 'iOS5' => '๐ŸŠ', - 'iOS7' => '', - 'Hex' => '1F34A' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿ‹', 'iOS7' => '', 'Hex' => '1F34B'), - array('iOS2' => '', 'iOS5' => '๐Ÿ’', 'iOS7' => '', 'Hex' => '1F352'), - array('iOS2' => '', 'iOS5' => '๐Ÿ‡', 'iOS7' => '', 'Hex' => '1F347'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ‰', - 'iOS7' => '', - 'Hex' => '1F349' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ“', - 'iOS7' => '', - 'Hex' => '1F353' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿ‘', 'iOS7' => '', 'Hex' => '1F351'), - array('iOS2' => '', 'iOS5' => '๐Ÿˆ', 'iOS7' => '', 'Hex' => '1F348'), - array('iOS2' => '', 'iOS5' => '๐ŸŒ', 'iOS7' => '', 'Hex' => '1F34C'), - array('iOS2' => '', 'iOS5' => '๐Ÿ', 'iOS7' => '', 'Hex' => '1F350'), - array('iOS2' => '', 'iOS5' => '๐Ÿ', 'iOS7' => '', 'Hex' => '1F34D'), - array('iOS2' => '', 'iOS5' => '๐Ÿ ', 'iOS7' => '', 'Hex' => '1F360'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ†', - 'iOS7' => '', - 'Hex' => '1F346' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ…', - 'iOS7' => '', - 'Hex' => '1F345' - ), - array('iOS2' => '', 'iOS5' => '๐ŸŒฝ', 'iOS7' => '', 'Hex' => '1F33D'), - array( - 'iOS2' => '', - 'iOS5' => '1โƒฃ', - 'iOS7' => '', - 'Hex' => '0031_20E3' - ), - array( - 'iOS2' => '', - 'iOS5' => '2โƒฃ', - 'iOS7' => '', - 'Hex' => '0032_20E3' - ), - array( - 'iOS2' => '', - 'iOS5' => '3โƒฃ', - 'iOS7' => '', - 'Heex' => '0034_20E3' - ), - array( - 'iOS2' => '', - 'iOS5' => '2โƒฃ', - 'iOS7' => '', - 'Hex' => '0032_20E3' - ), - array( - 'iOS2' => '', - 'iOS5' => '0โƒฃ', - 'iOS7' => '', - 'Hex' => '0030_20E3' - ), - array( - 'iOS2' => '', - 'iOS5' => '5โƒฃ', - 'iOS7' => '', - 'Hex' => '0035_20E3' - ), - array( - 'iOS2' => '', - 'iOS5' => '6โƒฃ', - 'iOS7' => '', - 'Hex' => '0036_20E3' - ), - array( - 'iOS2' => '', - 'iOS5' => '7โƒฃ', - 'iOS7' => '', - 'Hex' => '0037_20E3' - ), - array( - 'iOS2' => '', - 'iOS5' => '8โƒฃ', - 'iOS7' => '', - 'Hex' => '0038_20E3' - ), - array( - 'iOS2' => '', - 'iOS5' => '9โƒฃ', - 'iOS7' => '', - 'Hex' => '0039_20E3' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿ”Ÿ', 'iOS7' => '', 'Hex' => '1F51F'), - array('iOS2' => '', 'iOS5' => '๐Ÿ”ข', 'iOS7' => '', 'Hex' => '1F522'), - array( - 'iOS2' => '', - 'iOS5' => '#โƒฃ', - 'iOS7' => '', - 'Hex' => '0023_20E3' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿ”ฃ', 'iOS7' => '', 'Hex' => '1F523'), - array( - 'iOS2' => '', - 'iOS5' => 'โฌ†', - 'iOS7' => 'โฌ†๏ธ', - 'Hex' => '2B06' - ), - array( - 'iOS2' => '', - 'iOS5' => 'โฌ‡', - 'iOS7' => 'โฌ‡๏ธ', - 'Hex' => '2B07' - ), - array( - 'iOS2' => '', - 'iOS5' => 'โฌ…', - 'iOS7' => 'โฌ…๏ธ', - 'Hex' => '2B05' - ), - array( - 'iOS2' => '', - 'iOS5' => 'โžก', - 'iOS7' => 'โžก๏ธ', - 'Hex' => '27A1' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿ” ', 'iOS7' => '', 'Hex' => '1F520'), - array('iOS2' => '', 'iOS5' => '๐Ÿ”ก', 'iOS7' => '', 'Hex' => '1F521'), - array('iOS2' => '', 'iOS5' => '๐Ÿ”ค', 'iOS7' => '', 'Hex' => '1F524'), - array( - 'iOS2' => '', - 'iOS5' => 'โ†—', - 'iOS7' => 'โ†—๏ธ', - 'Hex' => '2197' - ), - array( - 'iOS2' => '', - 'iOS5' => 'โ†–', - 'iOS7' => 'โ†–๏ธ', - 'Hex' => '2196' - ), - array( - 'iOS2' => '', - 'iOS5' => 'โ†˜', - 'iOS7' => 'โ†˜๏ธ', - 'Hex' => '2198' - ), - array( - 'iOS2' => '', - 'iOS5' => 'โ†™', - 'iOS7' => 'โ†™๏ธ', - 'Hex' => '2199' - ), - array('iOS2' => '', 'iOS5' => 'โ†”', 'iOS7' => 'โ†”๏ธ', 'Hex' => '2194'), - array('iOS2' => '', 'iOS5' => 'โ†•', 'iOS7' => 'โ†•๏ธ', 'Hex' => '2195'), - array('iOS2' => '', 'iOS5' => '๐Ÿ”„', 'iOS7' => '', 'Hex' => '1F504'), - array( - 'iOS2' => '', - 'iOS5' => 'โ—€', - 'iOS7' => 'โ—€๏ธ', - 'Hex' => '25C0' - ), - array( - 'iOS2' => '', - 'iOS5' => 'โ–ถ', - 'iOS7' => 'โ–ถ๏ธ', - 'Hex' => '25B6' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿ”ผ', 'iOS7' => '', 'Hex' => '1F53C'), - array('iOS2' => '', 'iOS5' => '๐Ÿ”ฝ', 'iOS7' => '', 'Hex' => '1F53D'), - array('iOS2' => '', 'iOS5' => 'โ†ฉ', 'iOS7' => 'โ†ฉ๏ธ', 'Hex' => '21A9'), - array('iOS2' => '', 'iOS5' => 'โ†ช', 'iOS7' => 'โ†ช๏ธ', 'Hex' => '21AA'), - array('iOS2' => '', 'iOS5' => 'โ„น', 'iOS7' => 'โ„น๏ธ', 'Hex' => '2139'), - array('iOS2' => '', 'iOS5' => 'โช', 'iOS7' => '', 'Hex' => '23EA'), - array('iOS2' => '', 'iOS5' => 'โฉ', 'iOS7' => '', 'Hex' => '23E9'), - array('iOS2' => '', 'iOS5' => 'โซ', 'iOS7' => '', 'Hex' => '23EB'), - array('iOS2' => '', 'iOS5' => 'โฌ', 'iOS7' => '', 'Hex' => '23EC'), - array('iOS2' => '', 'iOS5' => 'โคต', 'iOS7' => 'โคต๏ธ', 'Hex' => '2935'), - array('iOS2' => '', 'iOS5' => 'โคด', 'iOS7' => 'โคด๏ธ', 'Hex' => '2934'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ†—', - 'iOS7' => '', - 'Hex' => '1F197' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿ”€', 'iOS7' => '', 'Hex' => '1F500'), - array('iOS2' => '', 'iOS5' => '๐Ÿ”', 'iOS7' => '', 'Hex' => '1F501'), - array('iOS2' => '', 'iOS5' => '๐Ÿ”‚', 'iOS7' => '', 'Hex' => '1F502'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ†•', - 'iOS7' => '', - 'Hex' => '1F195' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ†™', - 'iOS7' => '', - 'Hex' => '1F199' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ†’', - 'iOS7' => '', - 'Hex' => '1F192' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿ†“', 'iOS7' => '', 'Hex' => '1F193'), - array('iOS2' => '', 'iOS5' => '๐Ÿ†–', 'iOS7' => '', 'Hex' => '1F196'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ“ถ', - 'iOS7' => '', - 'Hex' => '1F4F6' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐ŸŽฆ', - 'iOS7' => '', - 'Hex' => '1F3A6' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿˆ', - 'iOS7' => '', - 'Hex' => '1F201' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿˆฏ', - 'iOS7' => '๐Ÿˆฏ๏ธ', - 'Hex' => '1F22F' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿˆณ', - 'iOS7' => '', - 'Hex' => '1F233' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿˆต', - 'iOS7' => '', - 'Hex' => '1F235' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿˆด', 'iOS7' => '', 'Hex' => '1F234'), - array('iOS2' => '', 'iOS5' => '๐Ÿˆฒ', 'iOS7' => '', 'Hex' => '1F232'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ‰', - 'iOS7' => '', - 'Hex' => '1F250' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿˆน', - 'iOS7' => '', - 'Hex' => '1F239' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿˆบ', - 'iOS7' => '', - 'Hex' => '1F23A' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿˆถ', - 'iOS7' => '', - 'Hex' => '1F236' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿˆš', - 'iOS7' => '๐Ÿˆš๏ธ', - 'Hex' => '1F21A' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿšป', - 'iOS7' => '', - 'Hex' => '1F6BB' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿšน', - 'iOS7' => '', - 'Hex' => '1F6B9' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿšบ', - 'iOS7' => '', - 'Hex' => '1F6BA' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿšผ', - 'iOS7' => '', - 'Hex' => '1F6BC' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿšพ', - 'iOS7' => '', - 'Hex' => '1F6BE' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿšฐ', 'iOS7' => '', 'Hex' => '1F6B0'), - array('iOS2' => '', 'iOS5' => '๐Ÿšฎ', 'iOS7' => '', 'Hex' => '1F6AE'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ…ฟ', - 'iOS7' => '๐Ÿ…ฟ๏ธ', - 'Hex' => '1F17F' - ), - array( - 'iOS2' => '', - 'iOS5' => 'โ™ฟ', - 'iOS7' => 'โ™ฟ๏ธ', - 'Hex' => '267F' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿšญ', - 'iOS7' => '', - 'Hex' => '1F6AD' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿˆท', - 'iOS7' => '', - 'Hex' => '1F237' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿˆธ', - 'iOS7' => '', - 'Hex' => '1F238' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿˆ‚', - 'iOS7' => '', - 'Hex' => '1F202' - ), - array('iOS2' => '', 'iOS5' => 'โ“‚', 'iOS7' => 'โ“‚๏ธ', 'Hex' => '24C2'), - array('iOS2' => '', 'iOS5' => '๐Ÿ›‚', 'iOS7' => '', 'Hex' => '1F6C2'), - array('iOS2' => '', 'iOS5' => '๐Ÿ›„', 'iOS7' => '', 'Hex' => '1F6C4'), - array('iOS2' => '', 'iOS5' => '๐Ÿ›…', 'iOS7' => '', 'Hex' => '1F6C5'), - array('iOS2' => '', 'iOS5' => '๐Ÿ›ƒ', 'iOS7' => '', 'Hex' => '1F6C3'), - array('iOS2' => '', 'iOS5' => '๐Ÿ‰‘', 'iOS7' => '', 'Hex' => '1F251'), - array( - 'iOS2' => '', - 'iOS5' => 'ใŠ™', - 'iOS7' => 'ใŠ™๏ธ', - 'Hex' => '3299' - ), - array( - 'iOS2' => '', - 'iOS5' => 'ใŠ—', - 'iOS7' => 'ใŠ—๏ธ', - 'Hex' => '3297' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿ†‘', 'iOS7' => '', 'Hex' => '1F191'), - array('iOS2' => '', 'iOS5' => '๐Ÿ†˜', 'iOS7' => '', 'Hex' => '1F198'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ†”', - 'iOS7' => '', - 'Hex' => '1F194' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿšซ', 'iOS7' => '', 'Hex' => '1F6AB'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ”ž', - 'iOS7' => '', - 'Hex' => '1F51E' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿ“ต', 'iOS7' => '', 'Hex' => '1F4F5'), - array('iOS2' => '', 'iOS5' => '๐Ÿšฏ', 'iOS7' => '', 'Hex' => '1F6AF'), - array('iOS2' => '', 'iOS5' => '๐Ÿšฑ', 'iOS7' => '', 'Hex' => '1F6B1'), - array('iOS2' => '', 'iOS5' => '๐Ÿšณ', 'iOS7' => '', 'Hex' => '1F6B3'), - array('iOS2' => '', 'iOS5' => '๐Ÿšท', 'iOS7' => '', 'Hex' => '1F6B7'), - array('iOS2' => '', 'iOS5' => '๐Ÿšธ', 'iOS7' => '', 'Hex' => '1F6B8'), - array('iOS2' => '', 'iOS5' => 'โ›”', 'iOS7' => 'โ›”๏ธ', 'Hex' => '26D4'), - array( - 'iOS2' => '', - 'iOS5' => 'โœณ', - 'iOS7' => 'โœณ๏ธ', - 'Hex' => '2733' - ), - array('iOS2' => '', 'iOS5' => 'โ‡', 'iOS7' => 'โ‡๏ธ', 'Hex' => '2747'), - array('iOS2' => '', 'iOS5' => 'โŽ', 'iOS7' => '', 'Hex' => '274E'), - array('iOS2' => '', 'iOS5' => 'โœ…', 'iOS7' => '', 'Hex' => '2705'), - array( - 'iOS2' => '', - 'iOS5' => 'โœด', - 'iOS7' => 'โœด๏ธ', - 'Hex' => '2734' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ’Ÿ', - 'iOS7' => '', - 'Hex' => '1F49F' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ†š', - 'iOS7' => '', - 'Hex' => '1F19A' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ“ณ', - 'iOS7' => '', - 'Hex' => '1F4F3' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ“ด', - 'iOS7' => '', - 'Hex' => '1F4F4' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ…ฐ', - 'iOS7' => '', - 'Hex' => '1F170' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ…ฑ', - 'iOS7' => '', - 'Hex' => '1F171' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ†Ž', - 'iOS7' => '', - 'Hex' => '1F18E' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ…พ', - 'iOS7' => '', - 'Hex' => '1F17E' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿ’ ', 'iOS7' => '', 'Hex' => '1F4A0'), - array('iOS2' => '', 'iOS5' => 'โžฟ', 'iOS7' => '', 'Hex' => '27BF'), - array('iOS2' => '', 'iOS5' => 'โ™ป', 'iOS7' => 'โ™ป๏ธ', 'Hex' => '267B'), - array( - 'iOS2' => '', - 'iOS5' => 'โ™ˆ', - 'iOS7' => 'โ™ˆ๏ธ', - 'Hex' => '2648' - ), - array( - 'iOS2' => '', - 'iOS5' => 'โ™‰', - 'iOS7' => 'โ™‰๏ธ', - 'Hex' => '2649' - ), - array( - 'iOS2' => '', - 'iOS5' => 'โ™Š', - 'iOS7' => 'โ™Š๏ธ', - 'Hex' => '264A' - ), - array( - 'iOS2' => '', - 'iOS5' => 'โ™‹', - 'iOS7' => 'โ™‹๏ธ', - 'Hex' => '264B' - ), - array( - 'iOS2' => '', - 'iOS5' => 'โ™Œ', - 'iOS7' => 'โ™Œ๏ธ', - 'Hex' => '264C' - ), - array( - 'iOS2' => '', - 'iOS5' => 'โ™', - 'iOS7' => 'โ™๏ธ', - 'Hex' => '264D' - ), - array( - 'iOS2' => '', - 'iOS5' => 'โ™Ž', - 'iOS7' => 'โ™Ž๏ธ', - 'Hex' => '264E' - ), - array( - 'iOS2' => '', - 'iOS5' => 'โ™', - 'iOS7' => 'โ™๏ธ', - 'Hex' => '264F' - ), - array( - 'iOS2' => '', - 'iOS5' => 'โ™', - 'iOS7' => 'โ™๏ธ', - 'Hex' => '2650' - ), - array( - 'iOS2' => '', - 'iOS5' => 'โ™‘', - 'iOS7' => 'โ™‘๏ธ', - 'Hex' => '2651' - ), - array( - 'iOS2' => '', - 'iOS5' => 'โ™’', - 'iOS7' => 'โ™’๏ธ', - 'Hex' => '2652' - ), - array( - 'iOS2' => '', - 'iOS5' => 'โ™“', - 'iOS7' => 'โ™“๏ธ', - 'Hex' => '2653' - ), - array('iOS2' => '', 'iOS5' => 'โ›Ž', 'iOS7' => '', 'Hex' => '26CE'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ”ฏ', - 'iOS7' => '', - 'Hex' => '1F52F' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿง', - 'iOS7' => '', - 'Hex' => '1F3E7' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ’น', - 'iOS7' => '', - 'Hex' => '1F4B9' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿ’ฒ', 'iOS7' => '', 'Hex' => '1F4B2'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ’ฑ', - 'iOS7' => '', - 'Hex' => '1F4B1' - ), - array('iOS2' => 'ยฉ', 'iOS5' => 'ยฉ', 'iOS7' => '', 'Hex' => '00A9'), - array('iOS2' => 'ยฎ', 'iOS5' => 'ยฎ', 'iOS7' => '', 'Hex' => '00AE'), - array('iOS2' => 'โ„ข', 'iOS5' => 'โ„ข', 'iOS7' => '', 'Hex' => '2122'), - array( - 'iOS2' => '', - 'iOS5' => 'ใ€ฝ', - 'iOS7' => 'ใ€ฝ๏ธ', - 'Hex' => '303D' - ), - array('iOS2' => '', 'iOS5' => 'ใ€ฐ', 'iOS7' => '', 'Hex' => '3030'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ”', - 'iOS7' => '', - 'Hex' => '1F51D' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿ”š', 'iOS7' => '', 'Hex' => '1F51A'), - array('iOS2' => '', 'iOS5' => '๐Ÿ”™', 'iOS7' => '', 'Hex' => '1F519'), - array('iOS2' => '', 'iOS5' => '๐Ÿ”›', 'iOS7' => '', 'Hex' => '1F51B'), - array('iOS2' => '', 'iOS5' => '๐Ÿ”œ', 'iOS7' => '', 'Hex' => '1F51C'), - array('iOS2' => '', 'iOS5' => 'โŒ', 'iOS7' => '', 'Hex' => '274C'), - array( - 'iOS2' => '', - 'iOS5' => 'โญ•', - 'iOS7' => 'โญ•๏ธ', - 'Hex' => '2B55' - ), - array('iOS2' => '', 'iOS5' => 'โ—', 'iOS7' => 'โ—๏ธ', 'Hex' => '2757'), - array('iOS2' => '', 'iOS5' => 'โ“', 'iOS7' => '', 'Hex' => '2753'), - array('iOS2' => '', 'iOS5' => 'โ•', 'iOS7' => '', 'Hex' => '2755'), - array('iOS2' => '', 'iOS5' => 'โ”', 'iOS7' => '', 'Hex' => '2754'), - array('iOS2' => '', 'iOS5' => '๐Ÿ”ƒ', 'iOS7' => '', 'Hex' => '1F503'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ•›', - 'iOS7' => '', - 'Hex' => '1F55B' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿ•ง', 'iOS7' => '', 'Hex' => '1F567'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ•', - 'iOS7' => '', - 'Hex' => '1F550' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿ•œ', 'iOS7' => '', 'Hex' => '1F55C'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ•‘', - 'iOS7' => '', - 'Hex' => '1F551' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿ•', 'iOS7' => '', 'Hex' => '1F55D'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ•’', - 'iOS7' => '', - 'Hex' => '1F552' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿ•ž', 'iOS7' => '', 'Hex' => '1F55E'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ•“', - 'iOS7' => '', - 'Hex' => '1F553' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿ•Ÿ', 'iOS7' => '', 'Hex' => '1F55F'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ•”', - 'iOS7' => '', - 'Hex' => '1F554' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿ• ', 'iOS7' => '', 'Hex' => '1F560'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ••', - 'iOS7' => '', - 'Hex' => '1F555' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ•–', - 'iOS7' => '', - 'Hex' => '1F556' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ•—', - 'iOS7' => '', - 'Hex' => '1F557' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ•˜', - 'iOS7' => '', - 'Hex' => '1F558' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ•™', - 'iOS7' => '', - 'Hex' => '1F559' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ•š', - 'iOS7' => '', - 'Hex' => '1F55A' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿ•ก', 'iOS7' => '', 'Hex' => '1F561'), - array('iOS2' => '', 'iOS5' => '๐Ÿ•ข', 'iOS7' => '', 'Hex' => '1F562'), - array('iOS2' => '', 'iOS5' => '๐Ÿ•ฃ', 'iOS7' => '', 'Hex' => '1F563'), - array('iOS2' => '', 'iOS5' => '๐Ÿ•ค', 'iOS7' => '', 'Hex' => '1F564'), - array('iOS2' => '', 'iOS5' => '๐Ÿ•ฅ', 'iOS7' => '', 'Hex' => '1F565'), - array('iOS2' => '', 'iOS5' => '๐Ÿ•ฆ', 'iOS7' => '', 'Hex' => '1F566'), - array('iOS2' => '', 'iOS5' => 'โœ–', 'iOS7' => 'โœ–๏ธ', 'Hex' => '2716'), - array('iOS2' => '', 'iOS5' => 'โž•', 'iOS7' => '', 'Hex' => '2795'), - array('iOS2' => '', 'iOS5' => 'โž–', 'iOS7' => '', 'Hex' => '2796'), - array('iOS2' => '', 'iOS5' => 'โž—', 'iOS7' => '', 'Hex' => '2797'), - array( - 'iOS2' => '', - 'iOS5' => 'โ™ ', - 'iOS7' => 'โ™ ๏ธ', - 'Hex' => '2660' - ), - array( - 'iOS2' => '', - 'iOS5' => 'โ™ฅ', - 'iOS7' => 'โ™ฅ๏ธ', - 'Hex' => '2665' - ), - array( - 'iOS2' => '', - 'iOS5' => 'โ™ฃ', - 'iOS7' => 'โ™ฃ๏ธ', - 'Hex' => '2663' - ), - array( - 'iOS2' => '', - 'iOS5' => 'โ™ฆ', - 'iOS7' => 'โ™ฆ๏ธ', - 'Hex' => '2666' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿ’ฎ', 'iOS7' => '', 'Hex' => '1F4AE'), - array('iOS2' => '', 'iOS5' => '๐Ÿ’ฏ', 'iOS7' => '', 'Hex' => '1F4AF'), - array('iOS2' => '', 'iOS5' => 'โœ”', 'iOS7' => 'โœ”๏ธ', 'Hex' => '2714'), - array('iOS2' => '', 'iOS5' => 'โ˜‘', 'iOS7' => 'โ˜‘๏ธ', 'Hex' => '2611'), - array('iOS2' => '', 'iOS5' => '๐Ÿ”˜', 'iOS7' => '', 'Hex' => '1F518'), - array('iOS2' => '', 'iOS5' => '๐Ÿ”—', 'iOS7' => '', 'Hex' => '1F517'), - array('iOS2' => '', 'iOS5' => 'โžฐ', 'iOS7' => '', 'Hex' => '27B0'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ”ฑ', - 'iOS7' => '', - 'Hex' => '1F531' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ”ฒ', - 'iOS7' => '', - 'Hex' => '1F532' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ”ณ', - 'iOS7' => '', - 'Hex' => '1F533' - ), - array('iOS2' => '', 'iOS5' => 'โ—ผ', 'iOS7' => 'โ—ผ๏ธ', 'Hex' => '25FC'), - array('iOS2' => '', 'iOS5' => 'โ—ป', 'iOS7' => 'โ—ป๏ธ', 'Hex' => '25FB'), - array('iOS2' => '', 'iOS5' => 'โ—พ', 'iOS7' => 'โ—พ๏ธ', 'Hex' => '25FE'), - array('iOS2' => '', 'iOS5' => 'โ—ฝ', 'iOS7' => 'โ—ฝ๏ธ', 'Hex' => '25FD'), - array('iOS2' => '', 'iOS5' => 'โ–ช', 'iOS7' => 'โ–ช๏ธ', 'Hex' => '25AA'), - array('iOS2' => '', 'iOS5' => 'โ–ซ', 'iOS7' => 'โ–ซ๏ธ', 'Hex' => '25AB'), - array('iOS2' => '', 'iOS5' => '๐Ÿ”บ', 'iOS7' => '', 'Hex' => '1F53A'), - array('iOS2' => '', 'iOS5' => 'โฌœ', 'iOS7' => 'โฌœ๏ธ', 'Hex' => '2B1C'), - array('iOS2' => '', 'iOS5' => 'โฌ›', 'iOS7' => 'โฌ›๏ธ', 'Hex' => '2B1B'), - array('iOS2' => '', 'iOS5' => 'โšซ', 'iOS7' => 'โšซ๏ธ', 'Hex' => '26AB'), - array('iOS2' => '', 'iOS5' => 'โšช', 'iOS7' => 'โšช๏ธ', 'Hex' => '26AA'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ”ด', - 'iOS7' => '', - 'Hex' => '1F534' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿ”ต', 'iOS7' => '', 'Hex' => '1F535'), - array('iOS2' => '', 'iOS5' => '๐Ÿ”ป', 'iOS7' => '', 'Hex' => '1F53B'), - array('iOS2' => '', 'iOS5' => '๐Ÿ”ถ', 'iOS7' => '', 'Hex' => '1F536'), - array('iOS2' => '', 'iOS5' => '๐Ÿ”ท', 'iOS7' => '', 'Hex' => '1F537'), - array('iOS2' => '', 'iOS5' => '๐Ÿ”ธ', 'iOS7' => '', 'Hex' => '1F538'), - array('iOS2' => '', 'iOS5' => '๐Ÿ”น', 'iOS7' => '', 'Hex' => '1F539'), - array('iOS2' => '', 'iOS5' => 'โ‰', 'iOS7' => 'โ‰๏ธ', 'Hex' => '2049'), - array('iOS2' => '', 'iOS5' => 'โ€ผ', 'iOS7' => 'โ€ผ๏ธ', 'Hex' => '203C') - ); + 'iOS2' => '', + 'iOS5' => '๐Ÿ˜‚', + 'iOS7' => '', + 'Hex' => '1F602' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ˜ญ', + 'iOS7' => '', + 'Hex' => '1F62D' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ˜ช', + 'iOS7' => '', + 'Hex' => '1F62A' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ˜ฅ', + 'iOS7' => '', + 'Hex' => '1F625' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ˜ฐ', + 'iOS7' => '', + 'Hex' => '1F630' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿ˜…', 'iOS7' => '', 'Hex' => '1F605'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ˜“', + 'iOS7' => '', + 'Hex' => '1F613' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿ˜ฉ', 'iOS7' => '', 'Hex' => '1F629'), + array('iOS2' => '', 'iOS5' => '๐Ÿ˜ซ', 'iOS7' => '', 'Hex' => '1F62B'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ˜จ', + 'iOS7' => '', + 'Hex' => '1F628' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ˜ฑ', + 'iOS7' => '', + 'Hex' => '1F631' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ˜ ', + 'iOS7' => '', + 'Hex' => '1F620' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ˜ก', + 'iOS7' => '', + 'Hex' => '1F621' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿ˜ค', 'iOS7' => '', 'Hex' => '1F624'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ˜–', + 'iOS7' => '', + 'Hex' => '1F616' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿ˜†', 'iOS7' => '', 'Hex' => '1F606'), + array('iOS2' => '', 'iOS5' => '๐Ÿ˜‹', 'iOS7' => '', 'Hex' => '1F60B'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ˜ท', + 'iOS7' => '', + 'Hex' => '1F637' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿ˜Ž', 'iOS7' => '', 'Hex' => '1F60E'), + array('iOS2' => '', 'iOS5' => '๐Ÿ˜ด', 'iOS7' => '', 'Hex' => '1F634'), + array('iOS2' => '', 'iOS5' => '๐Ÿ˜ต', 'iOS7' => '', 'Hex' => '1F635'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ˜ฒ', + 'iOS7' => '', + 'Hex' => '1F632' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿ˜Ÿ', 'iOS7' => '', 'Hex' => '1F61F'), + array('iOS2' => '', 'iOS5' => '๐Ÿ˜ฆ', 'iOS7' => '', 'Hex' => '1F626'), + array('iOS2' => '', 'iOS5' => '๐Ÿ˜ง', 'iOS7' => '', 'Hex' => '1F627'), + array('iOS2' => '', 'iOS5' => '๐Ÿ˜ˆ', 'iOS7' => '', 'Hex' => '1F608'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ‘ฟ', + 'iOS7' => '', + 'Hex' => '1F47F' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿ˜ฎ', 'iOS7' => '', 'Hex' => '1F62E'), + array('iOS2' => '', 'iOS5' => '๐Ÿ˜ฌ', 'iOS7' => '', 'Hex' => '1F62C'), + array('iOS2' => '', 'iOS5' => '๐Ÿ˜', 'iOS7' => '', 'Hex' => '1F610'), + array('iOS2' => '', 'iOS5' => '๐Ÿ˜•', 'iOS7' => '', 'Hex' => '1F615'), + array('iOS2' => '', 'iOS5' => '๐Ÿ˜ฏ', 'iOS7' => '', 'Hex' => '1F62F'), + array('iOS2' => '', 'iOS5' => '๐Ÿ˜ถ', 'iOS7' => '', 'Hex' => '1F636'), + array('iOS2' => '', 'iOS5' => '๐Ÿ˜‡', 'iOS7' => '', 'Hex' => '1F607'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ˜', + 'iOS7' => '', + 'Hex' => '1F60F' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿ˜‘', 'iOS7' => '', 'Hex' => '1F611'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ‘ฒ', + 'iOS7' => '', + 'Hex' => '1F472' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ‘ณ', + 'iOS7' => '', + 'Hex' => '1F473' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ‘ฎ', + 'iOS7' => '', + 'Hex' => '1F46E' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ‘ท', + 'iOS7' => '', + 'Hex' => '1F477' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ’‚', + 'iOS7' => '', + 'Hex' => '1F482' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ‘ถ', + 'iOS7' => '', + 'Hex' => '1F476' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ‘ฆ', + 'iOS7' => '', + 'Hex' => '1F466' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ‘ง', + 'iOS7' => '', + 'Hex' => '1F467' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ‘จ', + 'iOS7' => '', + 'Hex' => '1F468' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ‘ฉ', + 'iOS7' => '', + 'Hex' => '1F469' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ‘ด', + 'iOS7' => '', + 'Hex' => '1F474' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ‘ต', + 'iOS7' => '', + 'Hex' => '1F475' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ‘ฑ', + 'iOS7' => '', + 'Hex' => '1F471' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ‘ผ', + 'iOS7' => '', + 'Hex' => '1F47C' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ‘ธ', + 'iOS7' => '', + 'Hex' => '1F478' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿ˜บ', 'iOS7' => '', 'Hex' => '1F63A'), + array('iOS2' => '', 'iOS5' => '๐Ÿ˜ธ', 'iOS7' => '', 'Hex' => '1F638'), + array('iOS2' => '', 'iOS5' => '๐Ÿ˜ป', 'iOS7' => '', 'Hex' => '1F63B'), + array('iOS2' => '', 'iOS5' => '๐Ÿ˜ฝ', 'iOS7' => '', 'Hex' => '1F63D'), + array('iOS2' => '', 'iOS5' => '๐Ÿ˜ผ', 'iOS7' => '', 'Hex' => '1F63C'), + array('iOS2' => '', 'iOS5' => '๐Ÿ™€', 'iOS7' => '', 'Hex' => '1F640'), + array('iOS2' => '', 'iOS5' => '๐Ÿ˜ฟ', 'iOS7' => '', 'Hex' => '1F63F'), + array('iOS2' => '', 'iOS5' => '๐Ÿ˜น', 'iOS7' => '', 'Hex' => '1F639'), + array('iOS2' => '', 'iOS5' => '๐Ÿ˜พ', 'iOS7' => '', 'Hex' => '1F63E'), + array('iOS2' => '', 'iOS5' => '๐Ÿ‘น', 'iOS7' => '', 'Hex' => '1F479'), + array('iOS2' => '', 'iOS5' => '๐Ÿ‘บ', 'iOS7' => '', 'Hex' => '1F47A'), + array('iOS2' => '', 'iOS5' => '๐Ÿ™ˆ', 'iOS7' => '', 'Hex' => '1F648'), + array('iOS2' => '', 'iOS5' => '๐Ÿ™‰', 'iOS7' => '', 'Hex' => '1F649'), + array('iOS2' => '', 'iOS5' => '๐Ÿ™Š', 'iOS7' => '', 'Hex' => '1F64A'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ’€', + 'iOS7' => '', + 'Hex' => '1F480' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ‘ฝ', + 'iOS7' => '', + 'Hex' => '1F47D' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ’ฉ', + 'iOS7' => '', + 'Hex' => '1F4A9' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ”ฅ', + 'iOS7' => '', + 'Hex' => '1F525' + ), + array('iOS2' => '', 'iOS5' => 'โœจ', 'iOS7' => '', 'Hex' => '2728'), + array( + 'iOS2' => '', + 'iOS5' => '๐ŸŒŸ', + 'iOS7' => '', + 'Hex' => '1F31F' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿ’ซ', 'iOS7' => '', 'Hex' => '1F4AB'), + array('iOS2' => '', 'iOS5' => '๐Ÿ’ฅ', 'iOS7' => '', 'Hex' => '1F4A5'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ’ข', + 'iOS7' => '', + 'Hex' => '1F4A2' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ’ฆ', + 'iOS7' => '', + 'Hex' => '1F4A6' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿ’ง', 'iOS7' => '', 'Hex' => '1F4A7'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ’ค', + 'iOS7' => '', + 'Hex' => '1F4A4' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ’จ', + 'iOS7' => '', + 'Hex' => '1F4A8' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ‘‚', + 'iOS7' => '', + 'Hex' => '1F442' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ‘€', + 'iOS7' => '', + 'Hex' => '1F440' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ‘ƒ', + 'iOS7' => '', + 'Hex' => '1F443' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿ‘…', 'iOS7' => '', 'Hex' => '1F445'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ‘„', + 'iOS7' => '', + 'Hex' => '1F444' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ‘', + 'iOS7' => '', + 'Hex' => '1F44D' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ‘Ž', + 'iOS7' => '', + 'Hex' => '1F44E' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ‘Œ', + 'iOS7' => '', + 'Hex' => '1F44C' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ‘Š', + 'iOS7' => '', + 'Hex' => '1F44A' + ), + array('iOS2' => '', 'iOS5' => 'โœŠ', 'iOS7' => '', 'Hex' => '270A'), + array( + 'iOS2' => '', + 'iOS5' => 'โœŒ', + 'iOS7' => 'โœŒ๏ธ', + 'Hex' => '270C' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ‘‹', + 'iOS7' => '', + 'Hex' => '1F44B' + ), + array('iOS2' => '', 'iOS5' => 'โœ‹', 'iOS7' => '', 'Hex' => '270B'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ‘', + 'iOS7' => '', + 'Hex' => '1F450' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ‘†', + 'iOS7' => '', + 'Hex' => '1F446' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ‘‡', + 'iOS7' => '', + 'Hex' => '1F447' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ‘‰', + 'iOS7' => '', + 'Hex' => '1F449' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ‘ˆ', + 'iOS7' => '', + 'Hex' => '1F448' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ™Œ', + 'iOS7' => '', + 'Hex' => '1F64C' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ™', + 'iOS7' => '', + 'Hex' => '1F64F' + ), + array( + 'iOS2' => '', + 'iOS5' => 'โ˜', + 'iOS7' => 'โ˜๏ธ', + 'Hex' => '261D' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ‘', + 'iOS7' => '', + 'Hex' => '1F44F' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ’ช', + 'iOS7' => '', + 'Hex' => '1F4AA' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿšถ', + 'iOS7' => '', + 'Hex' => '1F6B6' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿƒ', + 'iOS7' => '', + 'Hex' => '1F3C3' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ’ƒ', + 'iOS7' => '', + 'Hex' => '1F483' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ‘ซ', + 'iOS7' => '', + 'Hex' => '1F46B' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿ‘ช', 'iOS7' => '', 'Hex' => '1F46A'), + array('iOS2' => '', 'iOS5' => '๐Ÿ‘ฌ', 'iOS7' => '', 'Hex' => '1F46C'), + array('iOS2' => '', 'iOS5' => '๐Ÿ‘ญ', 'iOS7' => '', 'Hex' => '1F46D'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ’', + 'iOS7' => '', + 'Hex' => '1F48F' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ’‘', + 'iOS7' => '', + 'Hex' => '1F491' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ‘ฏ', + 'iOS7' => '', + 'Hex' => '1F46F' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ™†', + 'iOS7' => '', + 'Hex' => '1F646' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ™…', + 'iOS7' => '', + 'Hex' => '1F645' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ’', + 'iOS7' => '', + 'Hex' => '1F481' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿ™‹', 'iOS7' => '', 'Hex' => '1F64B'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ’†', + 'iOS7' => '', + 'Hex' => '1F486' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ’‡', + 'iOS7' => '', + 'Hex' => '1F487' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ’…', + 'iOS7' => '', + 'Hex' => '1F485' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿ‘ฐ', 'iOS7' => '', 'Hex' => '1F470'), + array('iOS2' => '', 'iOS5' => '๐Ÿ™Ž', 'iOS7' => '', 'Hex' => '1F64E'), + array('iOS2' => '', 'iOS5' => '๐Ÿ™', 'iOS7' => '', 'Hex' => '1F64D'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ™‡', + 'iOS7' => '', + 'Hex' => '1F647' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐ŸŽฉ', + 'iOS7' => '', + 'Hex' => '1F3A9' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ‘‘', + 'iOS7' => '', + 'Hex' => '1F451' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ‘’', + 'iOS7' => '', + 'Hex' => '1F452' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ‘Ÿ', + 'iOS7' => '', + 'Hex' => '1F45F' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿ‘ž', 'iOS7' => '', 'Hex' => '1F45E'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ‘ก', + 'iOS7' => '', + 'Hex' => '1F461' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ‘ ', + 'iOS7' => '', + 'Hex' => '1F460' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ‘ข', + 'iOS7' => '', + 'Hex' => '1F462' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ‘•', + 'iOS7' => '', + 'Hex' => '1F455' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ‘”', + 'iOS7' => '', + 'Hex' => '1F454' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿ‘š', 'iOS7' => '', 'Hex' => '1F45A'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ‘—', + 'iOS7' => '', + 'Hex' => '1F457' + ), + array('iOS2' => '', 'iOS5' => '๐ŸŽฝ', 'iOS7' => '', 'Hex' => '1F3BD'), + array('iOS2' => '', 'iOS5' => '๐Ÿ‘–', 'iOS7' => '', 'Hex' => '1F456'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ‘˜', + 'iOS7' => '', + 'Hex' => '1F458' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ‘™', + 'iOS7' => '', + 'Hex' => '1F459' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ’ผ', + 'iOS7' => '', + 'Hex' => '1F4BC' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ‘œ', + 'iOS7' => '', + 'Hex' => '1F45C' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿ‘', 'iOS7' => '', 'Hex' => '1F45D'), + array('iOS2' => '', 'iOS5' => '๐Ÿ‘›', 'iOS7' => '', 'Hex' => '1F45B'), + array('iOS2' => '', 'iOS5' => '๐Ÿ‘“', 'iOS7' => '', 'Hex' => '1F453'), + array( + 'iOS2' => '', + 'iOS5' => '๐ŸŽ€', + 'iOS7' => '', + 'Hex' => '1F380' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐ŸŒ‚', + 'iOS7' => '', + 'Hex' => '1F302' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ’„', + 'iOS7' => '', + 'Hex' => '1F484' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ’›', + 'iOS7' => '', + 'Hex' => '1F49B' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ’™', + 'iOS7' => '', + 'Hex' => '1F499' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ’œ', + 'iOS7' => '', + 'Hex' => '1F49C' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ’š', + 'iOS7' => '', + 'Hex' => '1F49A' + ), + array( + 'iOS2' => '', + 'iOS5' => 'โค', + 'iOS7' => 'โค๏ธ', + 'Hex' => '2764' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ’”', + 'iOS7' => '', + 'Hex' => '1F494' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ’—', + 'iOS7' => '', + 'Hex' => '1F497' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ’“', + 'iOS7' => '', + 'Hex' => '1F493' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿ’•', 'iOS7' => '', 'Hex' => '1F495'), + array('iOS2' => '', 'iOS5' => '๐Ÿ’–', 'iOS7' => '', 'Hex' => '1F496'), + array('iOS2' => '', 'iOS5' => '๐Ÿ’ž', 'iOS7' => '', 'Hex' => '1F49E'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ’˜', + 'iOS7' => '', + 'Hex' => '1F498' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿ’Œ', 'iOS7' => '', 'Hex' => '1F48C'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ’‹', + 'iOS7' => '', + 'Hex' => '1F48B' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ’', + 'iOS7' => '', + 'Hex' => '1F48D' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ’Ž', + 'iOS7' => '', + 'Hex' => '1F48E' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿ‘ค', 'iOS7' => '', 'Hex' => '1F464'), + array('iOS2' => '', 'iOS5' => '๐Ÿ‘ฅ', 'iOS7' => '', 'Hex' => '1F465'), + array('iOS2' => '', 'iOS5' => '๐Ÿ’ฌ', 'iOS7' => '', 'Hex' => '1F4AC'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ‘ฃ', + 'iOS7' => '', + 'Hex' => '1F463' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿ’ญ', 'iOS7' => '', 'Hex' => '1F4AD'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ ', + 'iOS7' => '', + 'Hex' => '1F3E0' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿก', 'iOS7' => '', 'Hex' => '1F3E1'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿซ', + 'iOS7' => '', + 'Hex' => '1F3EB' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿข', + 'iOS7' => '', + 'Hex' => '1F3E2' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿฃ', + 'iOS7' => '', + 'Hex' => '1F3E3' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿฅ', + 'iOS7' => '', + 'Hex' => '1F3E5' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿฆ', + 'iOS7' => '', + 'Hex' => '1F3E6' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿช', + 'iOS7' => '', + 'Hex' => '1F3EA' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿฉ', + 'iOS7' => '', + 'Hex' => '1F3E9' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿจ', + 'iOS7' => '', + 'Hex' => '1F3E8' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ’’', + 'iOS7' => '', + 'Hex' => '1F492' + ), + array( + 'iOS2' => '', + 'iOS5' => 'โ›ช', + 'iOS7' => 'โ›ช๏ธ', + 'Hex' => '26EA' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿฌ', + 'iOS7' => '', + 'Hex' => '1F3EC' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿค', 'iOS7' => '', 'Hex' => '1F3E4'), + array( + 'iOS2' => '', + 'iOS5' => '๐ŸŒ‡', + 'iOS7' => '', + 'Hex' => '1F307' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐ŸŒ†', + 'iOS7' => '', + 'Hex' => '1F306' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿฏ', + 'iOS7' => '', + 'Hex' => '1F3EF' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿฐ', + 'iOS7' => '', + 'Hex' => '1F3F0' + ), + array( + 'iOS2' => '', + 'iOS5' => 'โ›บ', + 'iOS7' => 'โ›บ๏ธ', + 'Hex' => '26FA' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿญ', + 'iOS7' => '', + 'Hex' => '1F3ED' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ—ผ', + 'iOS7' => '', + 'Hex' => '1F5FC' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿ—พ', 'iOS7' => '', 'Hex' => '1F5FE'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ—ป', + 'iOS7' => '', + 'Hex' => '1F5FB' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐ŸŒ„', + 'iOS7' => '', + 'Hex' => '1F304' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐ŸŒ…', + 'iOS7' => '', + 'Hex' => '1F305' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐ŸŒƒ', + 'iOS7' => '', + 'Hex' => '1F303' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ—ฝ', + 'iOS7' => '', + 'Hex' => '1F5FD' + ), + array('iOS2' => '', 'iOS5' => '๐ŸŒ‰', 'iOS7' => '', 'Hex' => '1F309'), + array('iOS2' => '', 'iOS5' => '๐ŸŽ ', 'iOS7' => '', 'Hex' => '1F3A0'), + array( + 'iOS2' => '', + 'iOS5' => '๐ŸŽก', + 'iOS7' => '', + 'Hex' => '1F3A1' + ), + array( + 'iOS2' => '', + 'iOS5' => 'โ›ฒ', + 'iOS7' => 'โ›ฒ๏ธ', + 'Hex' => '26F2' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐ŸŽข', + 'iOS7' => '', + 'Hex' => '1F3A2' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿšข', + 'iOS7' => '', + 'Hex' => '1F6A2' + ), + array( + 'iOS2' => '', + 'iOS5' => 'โ›ต', + 'iOS7' => 'โ›ต๏ธ', + 'Hex' => '26F5' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿšค', + 'iOS7' => '', + 'Hex' => '1F6A4' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿšฃ', 'iOS7' => '', 'Hex' => '1F6A3'), + array('iOS2' => '', 'iOS5' => 'โš“', 'iOS7' => 'โš“๏ธ', 'Hex' => '2693'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿš€', + 'iOS7' => '', + 'Hex' => '1F680' + ), + array( + 'iOS2' => '', + 'iOS5' => 'โœˆ', + 'iOS7' => 'โœˆ๏ธ', + 'Hex' => '2708' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ’บ', + 'iOS7' => '', + 'Hex' => '1F4BA' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿš', 'iOS7' => '', 'Hex' => '1F681'), + array('iOS2' => '', 'iOS5' => '๐Ÿš‚', 'iOS7' => '', 'Hex' => '1F682'), + array('iOS2' => '', 'iOS5' => '๐ŸšŠ', 'iOS7' => '', 'Hex' => '1F68A'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿš‰', + 'iOS7' => '', + 'Hex' => '1F689' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿšž', 'iOS7' => '', 'Hex' => '1F69E'), + array('iOS2' => '', 'iOS5' => '๐Ÿš†', 'iOS7' => '', 'Hex' => '1F686'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿš„', + 'iOS7' => '', + 'Hex' => '1F684' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿš…', + 'iOS7' => '', + 'Hex' => '1F685' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿšˆ', 'iOS7' => '', 'Hex' => '1F688'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿš‡', + 'iOS7' => '', + 'Hex' => '1F687' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿš', 'iOS7' => '', 'Hex' => '1F69D'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿš‹', + 'iOS7' => '', + 'Hex' => '1F68B' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿšƒ', 'iOS7' => '', 'Hex' => '1F683'), + array('iOS2' => '', 'iOS5' => '๐ŸšŽ', 'iOS7' => '', 'Hex' => '1F68E'), + array( + 'iOS2' => '', + 'iOS5' => '๐ŸšŒ', + 'iOS7' => '', + 'Hex' => '1F68C' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿš', 'iOS7' => '', 'Hex' => '1F68D'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿš™', + 'iOS7' => '', + 'Hex' => '1F699' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿš˜', 'iOS7' => '', 'Hex' => '1F698'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿš—', + 'iOS7' => '', + 'Hex' => '1F697' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿš•', + 'iOS7' => '', + 'Hex' => '1F695' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿš–', 'iOS7' => '', 'Hex' => '1F696'), + array('iOS2' => '', 'iOS5' => '๐Ÿš›', 'iOS7' => '', 'Hex' => '1F69B'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿšš', + 'iOS7' => '', + 'Hex' => '1F69A' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿšจ', 'iOS7' => '', 'Hex' => '1F6A8'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿš“', + 'iOS7' => '', + 'Hex' => '1F693' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿš”', 'iOS7' => '', 'Hex' => '1F694'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿš’', + 'iOS7' => '', + 'Hex' => '1F692' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿš‘', + 'iOS7' => '', + 'Hex' => '1F691' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿš', 'iOS7' => '', 'Hex' => '1F690'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿšฒ', + 'iOS7' => '', + 'Hex' => '1F6B2' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿšก', 'iOS7' => '', 'Hex' => '1F6A1'), + array('iOS2' => '', 'iOS5' => '๐ŸšŸ', 'iOS7' => '', 'Hex' => '1F69F'), + array('iOS2' => '', 'iOS5' => '๐Ÿš ', 'iOS7' => '', 'Hex' => '1F6A0'), + array('iOS2' => '', 'iOS5' => '๐Ÿšœ', 'iOS7' => '', 'Hex' => '1F69C'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ’ˆ', + 'iOS7' => '', + 'Hex' => '1F488' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿš', + 'iOS7' => '', + 'Hex' => '1F68F' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐ŸŽซ', + 'iOS7' => '', + 'Hex' => '1F3AB' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿšฆ', 'iOS7' => '', 'Hex' => '1F6A6'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿšฅ', + 'iOS7' => '', + 'Hex' => '1F6A5' + ), + array( + 'iOS2' => '', + 'iOS5' => 'โš ', + 'iOS7' => 'โš ๏ธ', + 'Hex' => '26A0' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿšง', + 'iOS7' => '', + 'Hex' => '1F6A7' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ”ฐ', + 'iOS7' => '', + 'Hex' => '1F530' + ), + array( + 'iOS2' => '', + 'iOS5' => 'โ›ฝ', + 'iOS7' => 'โ›ฝ๏ธ', + 'Hex' => '26FD' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿฎ', 'iOS7' => '', 'Hex' => '1F3EE'), + array( + 'iOS2' => '', + 'iOS5' => '๐ŸŽฐ', + 'iOS7' => '', + 'Hex' => '1F3B0' + ), + array( + 'iOS2' => '', + 'iOS5' => 'โ™จ', + 'iOS7' => 'โ™จ๏ธ', + 'Hex' => '2668' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿ—ฟ', 'iOS7' => '', 'Hex' => '1F5FF'), + array('iOS2' => '', 'iOS5' => '๐ŸŽช', 'iOS7' => '', 'Hex' => '1F3AA'), + array('iOS2' => '', 'iOS5' => '๐ŸŽญ', 'iOS7' => '', 'Hex' => '1F3AD'), + array('iOS2' => '', 'iOS5' => '๐Ÿ“', 'iOS7' => '', 'Hex' => '1F4CD'), + array('iOS2' => '', 'iOS5' => '๐Ÿšฉ', 'iOS7' => '', 'Hex' => '1F6A9'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ‡ฏ๐Ÿ‡ต', + 'iOS7' => '', + 'Hex' => '1F1EF_1F1F5' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ‡ฐ๐Ÿ‡ท', + 'iOS7' => '', + 'Hex' => '1F1F0_1F1F7' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ‡ฉ๐Ÿ‡ช', + 'iOS7' => '', + 'Hex' => '1F1E9_1F1EA' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ‡จ๐Ÿ‡ณ', + 'iOS7' => '', + 'Hex' => '1F1E8_1F1F3' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ‡บ๐Ÿ‡ธ', + 'iOS7' => '', + 'Hex' => '1F1FA_1F1F8' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ‡ซ๐Ÿ‡ท', + 'iOS7' => '', + 'Hex' => '1F1EB_1F1F7' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ‡ช๐Ÿ‡ธ', + 'iOS7' => '', + 'Hex' => '1F1EA_1F1F8' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ‡ฎ๐Ÿ‡น', + 'iOS7' => '', + 'Hex' => '1F1EE_1F1F9' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ‡ท๐Ÿ‡บ', + 'iOS7' => '', + 'Hex' => '1F1F7_1F1FA' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ‡ฌ๐Ÿ‡ง', + 'iOS7' => '', + 'Hex' => '1F1EC_1F1E7' + ), + array( + 'iOS2' => '', + 'iOS5' => '', + 'iOS7' => '', + 'Hex' => '' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿถ', + 'iOS7' => '', + 'Hex' => '1F436' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿบ', + 'iOS7' => '', + 'Hex' => '1F43A' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿฑ', + 'iOS7' => '', + 'Hex' => '1F431' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿญ', + 'iOS7' => '', + 'Hex' => '1F42D' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿน', + 'iOS7' => '', + 'Hex' => '1F439' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿฐ', + 'iOS7' => '', + 'Hex' => '1F430' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿธ', + 'iOS7' => '', + 'Hex' => '1F438' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿฏ', + 'iOS7' => '', + 'Hex' => '1F42F' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿจ', + 'iOS7' => '', + 'Hex' => '1F428' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿป', + 'iOS7' => '', + 'Hex' => '1F43B' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿท', + 'iOS7' => '', + 'Hex' => '1F437' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿฝ', 'iOS7' => '', 'Hex' => '1F43D'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿฎ', + 'iOS7' => '', + 'Hex' => '1F42E' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ—', + 'iOS7' => '', + 'Hex' => '1F417' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿต', + 'iOS7' => '', + 'Hex' => '1F435' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ’', + 'iOS7' => '', + 'Hex' => '1F412' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿด', + 'iOS7' => '', + 'Hex' => '1F434' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ‘', + 'iOS7' => '', + 'Hex' => '1F411' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ˜', + 'iOS7' => '', + 'Hex' => '1F418' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿผ', 'iOS7' => '', 'Hex' => '1F43C'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿง', + 'iOS7' => '', + 'Hex' => '1F427' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿฆ', + 'iOS7' => '', + 'Hex' => '1F426' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿค', + 'iOS7' => '', + 'Hex' => '1F424' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿฅ', 'iOS7' => '', 'Hex' => '1F425'), + array('iOS2' => '', 'iOS5' => '๐Ÿฃ', 'iOS7' => '', 'Hex' => '1F423'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ”', + 'iOS7' => '', + 'Hex' => '1F414' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ', + 'iOS7' => '', + 'Hex' => '1F40D' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿข', 'iOS7' => '', 'Hex' => '1F422'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ›', + 'iOS7' => '', + 'Hex' => '1F41B' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿ', 'iOS7' => '', 'Hex' => '1F41D'), + array('iOS2' => '', 'iOS5' => '๐Ÿœ', 'iOS7' => '', 'Hex' => '1F41C'), + array('iOS2' => '', 'iOS5' => '๐Ÿž', 'iOS7' => '', 'Hex' => '1F41E'), + array('iOS2' => '', 'iOS5' => '๐ŸŒ', 'iOS7' => '', 'Hex' => '1F40C'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ™', + 'iOS7' => '', + 'Hex' => '1F419' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿš', + 'iOS7' => '', + 'Hex' => '1F41A' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ ', + 'iOS7' => '', + 'Hex' => '1F420' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐ŸŸ', + 'iOS7' => '', + 'Hex' => '1F41F' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿฌ', + 'iOS7' => '', + 'Hex' => '1F42C' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿณ', + 'iOS7' => '', + 'Hex' => '1F433' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿ‹', 'iOS7' => '', 'Hex' => '1F40B'), + array('iOS2' => '', 'iOS5' => '๐Ÿ„', 'iOS7' => '', 'Hex' => '1F404'), + array('iOS2' => '', 'iOS5' => '๐Ÿ', 'iOS7' => '', 'Hex' => '1F40F'), + array('iOS2' => '', 'iOS5' => '๐Ÿ€', 'iOS7' => '', 'Hex' => '1F400'), + array('iOS2' => '', 'iOS5' => '๐Ÿƒ', 'iOS7' => '', 'Hex' => '1F403'), + array('iOS2' => '', 'iOS5' => '๐Ÿ…', 'iOS7' => '', 'Hex' => '1F405'), + array('iOS2' => '', 'iOS5' => '๐Ÿ‡', 'iOS7' => '', 'Hex' => '1F407'), + array('iOS2' => '', 'iOS5' => '๐Ÿ‰', 'iOS7' => '', 'Hex' => '1F409'), + array( + 'iOS2' => '', + 'iOS5' => '๐ŸŽ', + 'iOS7' => '', + 'Hex' => '1F40E' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿ', 'iOS7' => '', 'Hex' => '1F410'), + array('iOS2' => '', 'iOS5' => '๐Ÿ“', 'iOS7' => '', 'Hex' => '1F413'), + array('iOS2' => '', 'iOS5' => '๐Ÿ•', 'iOS7' => '', 'Hex' => '1F415'), + array('iOS2' => '', 'iOS5' => '๐Ÿ–', 'iOS7' => '', 'Hex' => '1F416'), + array('iOS2' => '', 'iOS5' => '๐Ÿ', 'iOS7' => '', 'Hex' => '1F401'), + array('iOS2' => '', 'iOS5' => '๐Ÿ‚', 'iOS7' => '', 'Hex' => '1F402'), + array('iOS2' => '', 'iOS5' => '๐Ÿฒ', 'iOS7' => '', 'Hex' => '1F432'), + array('iOS2' => '', 'iOS5' => '๐Ÿก', 'iOS7' => '', 'Hex' => '1F421'), + array('iOS2' => '', 'iOS5' => '๐ŸŠ', 'iOS7' => '', 'Hex' => '1F40A'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿซ', + 'iOS7' => '', + 'Hex' => '1F42B' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿช', 'iOS7' => '', 'Hex' => '1F42A'), + array('iOS2' => '', 'iOS5' => '๐Ÿ†', 'iOS7' => '', 'Hex' => '1F406'), + array('iOS2' => '', 'iOS5' => '๐Ÿˆ', 'iOS7' => '', 'Hex' => '1F408'), + array('iOS2' => '', 'iOS5' => '๐Ÿฉ', 'iOS7' => '', 'Hex' => '1F429'), + array('iOS2' => '', 'iOS5' => '๐Ÿพ', 'iOS7' => '', 'Hex' => '1F43E'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ’', + 'iOS7' => '', + 'Hex' => '1F490' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐ŸŒธ', + 'iOS7' => '', + 'Hex' => '1F338' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐ŸŒท', + 'iOS7' => '', + 'Hex' => '1F337' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ€', + 'iOS7' => '', + 'Hex' => '1F340' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐ŸŒน', + 'iOS7' => '', + 'Hex' => '1F339' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐ŸŒป', + 'iOS7' => '', + 'Hex' => '1F33B' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐ŸŒบ', + 'iOS7' => '', + 'Hex' => '1F33A' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ', + 'iOS7' => '', + 'Hex' => '1F341' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿƒ', + 'iOS7' => '', + 'Hex' => '1F343' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ‚', + 'iOS7' => '', + 'Hex' => '1F342' + ), + array('iOS2' => '', 'iOS5' => '๐ŸŒฟ', 'iOS7' => '', 'Hex' => '1F33F'), + array( + 'iOS2' => '', + 'iOS5' => '๐ŸŒพ', + 'iOS7' => '', + 'Hex' => '1F33E' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿ„', 'iOS7' => '', 'Hex' => '1F344'), + array( + 'iOS2' => '', + 'iOS5' => '๐ŸŒต', + 'iOS7' => '', + 'Hex' => '1F335' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐ŸŒด', + 'iOS7' => '', + 'Hex' => '1F334' + ), + array('iOS2' => '', 'iOS5' => '๐ŸŒฒ', 'iOS7' => '', 'Hex' => '1F332'), + array('iOS2' => '', 'iOS5' => '๐ŸŒณ', 'iOS7' => '', 'Hex' => '1F333'), + array('iOS2' => '', 'iOS5' => '๐ŸŒฐ', 'iOS7' => '', 'Hex' => '1F330'), + array('iOS2' => '', 'iOS5' => '๐ŸŒฑ', 'iOS7' => '', 'Hex' => '1F331'), + array('iOS2' => '', 'iOS5' => '๐ŸŒผ', 'iOS7' => '', 'Hex' => '1F33C'), + array('iOS2' => '', 'iOS5' => '๐ŸŒ', 'iOS7' => '', 'Hex' => '1F310'), + array('iOS2' => '', 'iOS5' => '๐ŸŒž', 'iOS7' => '', 'Hex' => '1F31E'), + array('iOS2' => '', 'iOS5' => '๐ŸŒ', 'iOS7' => '', 'Hex' => '1F31D'), + array('iOS2' => '', 'iOS5' => '๐ŸŒš', 'iOS7' => '', 'Hex' => '1F31A'), + array('iOS2' => '', 'iOS5' => '๐ŸŒ‘', 'iOS7' => '', 'Hex' => '1F311'), + array('iOS2' => '', 'iOS5' => '๐ŸŒ’', 'iOS7' => '', 'Hex' => '1F312'), + array('iOS2' => '', 'iOS5' => '๐ŸŒ“', 'iOS7' => '', 'Hex' => '1F313'), + array('iOS2' => '', 'iOS5' => '๐ŸŒ”', 'iOS7' => '', 'Hex' => '1F314'), + array('iOS2' => '', 'iOS5' => '๐ŸŒ•', 'iOS7' => '', 'Hex' => '1F315'), + array('iOS2' => '', 'iOS5' => '๐ŸŒ–', 'iOS7' => '', 'Hex' => '1F316'), + array('iOS2' => '', 'iOS5' => '๐ŸŒ—', 'iOS7' => '', 'Hex' => '1F317'), + array('iOS2' => '', 'iOS5' => '๐ŸŒ˜', 'iOS7' => '', 'Hex' => '1F318'), + array('iOS2' => '', 'iOS5' => '๐ŸŒœ', 'iOS7' => '', 'Hex' => '1F31C'), + array('iOS2' => '', 'iOS5' => '๐ŸŒ›', 'iOS7' => '', 'Hex' => '1F31B'), + array( + 'iOS2' => '', + 'iOS5' => '๐ŸŒ™', + 'iOS7' => '', + 'Hex' => '1F319' + ), + array('iOS2' => '', 'iOS5' => '๐ŸŒ', 'iOS7' => '', 'Hex' => '1F30D'), + array('iOS2' => '', 'iOS5' => '๐ŸŒŽ', 'iOS7' => '', 'Hex' => '1F30E'), + array('iOS2' => '', 'iOS5' => '๐ŸŒ', 'iOS7' => '', 'Hex' => '1F30F'), + array('iOS2' => '', 'iOS5' => '๐ŸŒ‹', 'iOS7' => '', 'Hex' => '1F30B'), + array('iOS2' => '', 'iOS5' => '๐ŸŒŒ', 'iOS7' => '', 'Hex' => '1F30C'), + array('iOS2' => '', 'iOS5' => '๐ŸŒ ', 'iOS7' => '', 'Hex' => '1F320'), + array('iOS2' => '', 'iOS5' => 'โญ', 'iOS7' => 'โญ๏ธ', 'Hex' => '2B50'), + array( + 'iOS2' => '', + 'iOS5' => 'โ˜€', + 'iOS7' => 'โ˜€๏ธ', + 'Hex' => '2600' + ), + array('iOS2' => '', 'iOS5' => 'โ›…', 'iOS7' => 'โ›…๏ธ', 'Hex' => '26C5'), + array( + 'iOS2' => '', + 'iOS5' => 'โ˜', + 'iOS7' => 'โ˜๏ธ', + 'Hex' => '2601' + ), + array( + 'iOS2' => '', + 'iOS5' => 'โšก', + 'iOS7' => 'โšก๏ธ', + 'Hex' => '26A1' + ), + array( + 'iOS2' => '', + 'iOS5' => 'โ˜”', + 'iOS7' => 'โ˜”๏ธ', + 'Hex' => '2614' + ), + array('iOS2' => '', 'iOS5' => 'โ„', 'iOS7' => 'โ„๏ธ', 'Hex' => '2744'), + array( + 'iOS2' => '', + 'iOS5' => 'โ›„', + 'iOS7' => 'โ›„๏ธ', + 'Hex' => '26C4' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐ŸŒ€', + 'iOS7' => '๐ŸŒ€', + 'Hex' => '1F300' + ), + array('iOS2' => '', 'iOS5' => '๐ŸŒ', 'iOS7' => '', 'Hex' => '1F301'), + array( + 'iOS2' => '', + 'iOS5' => '๐ŸŒˆ', + 'iOS7' => '', + 'Hex' => '1F308' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐ŸŒŠ', + 'iOS7' => '', + 'Hex' => '1F30A' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐ŸŽ', + 'iOS7' => '', + 'Hex' => '1F38D' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ’', + 'iOS7' => '', + 'Hex' => '1F49D' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐ŸŽŽ', + 'iOS7' => '', + 'Hex' => '1F38E' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐ŸŽ’', + 'iOS7' => '', + 'Hex' => '1F392' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐ŸŽ“', + 'iOS7' => '', + 'Hex' => '1F393' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐ŸŽ', + 'iOS7' => '', + 'Hex' => '1F38F' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐ŸŽ†', + 'iOS7' => '', + 'Hex' => '1F386' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐ŸŽ‡', + 'iOS7' => '', + 'Hex' => '1F387' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐ŸŽ', + 'iOS7' => '', + 'Hex' => '1F390' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐ŸŽ‘', + 'iOS7' => '', + 'Hex' => '1F391' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐ŸŽƒ', + 'iOS7' => '', + 'Hex' => '1F383' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ‘ป', + 'iOS7' => '', + 'Hex' => '1F47B' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐ŸŽ…', + 'iOS7' => '', + 'Hex' => '1F385' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐ŸŽ„', + 'iOS7' => '', + 'Hex' => '1F384' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐ŸŽ', + 'iOS7' => '', + 'Hex' => '1F381' + ), + array('iOS2' => '', 'iOS5' => '๐ŸŽ‹', 'iOS7' => '', 'Hex' => '1F38B'), + array( + 'iOS2' => '', + 'iOS5' => '๐ŸŽ‰', + 'iOS7' => '', + 'Hex' => '1F389' + ), + array('iOS2' => '', 'iOS5' => '๐ŸŽŠ', 'iOS7' => '', 'Hex' => '1F38A'), + array( + 'iOS2' => '', + 'iOS5' => '๐ŸŽˆ', + 'iOS7' => '', + 'Hex' => '1F388' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐ŸŽŒ', + 'iOS7' => '', + 'Hex' => '1F38C' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿ”ฎ', 'iOS7' => '', 'Hex' => '1F52E'), + array( + 'iOS2' => '', + 'iOS5' => '๐ŸŽฅ', + 'iOS7' => '', + 'Hex' => '1F3A5' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ“ท', + 'iOS7' => '', + 'Hex' => '1F4F7' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿ“น', 'iOS7' => '', 'Hex' => '1F4F9'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ“ผ', + 'iOS7' => '', + 'Hex' => '1F4FC' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ’ฟ', + 'iOS7' => '', + 'Hex' => '1F4BF' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ“€', + 'iOS7' => '', + 'Hex' => '1F4C0' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ’ฝ', + 'iOS7' => '', + 'Hex' => '1F4BD' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿ’พ', 'iOS7' => '', 'Hex' => '1F4BE'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ’ป', + 'iOS7' => '', + 'Hex' => '1F4BB' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ“ฑ', + 'iOS7' => '', + 'Hex' => '1F4F1' + ), + array( + 'iOS2' => '', + 'iOS5' => 'โ˜Ž', + 'iOS7' => 'โ˜Ž๏ธ', + 'Hex' => '260E' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿ“ž', 'iOS7' => '', 'Hex' => '1F4DE'), + array('iOS2' => '', 'iOS5' => '๐Ÿ“Ÿ', 'iOS7' => '', 'Hex' => '1F4DF'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ“ ', + 'iOS7' => '', + 'Hex' => '1F4E0' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ“ก', + 'iOS7' => '', + 'Hex' => '1F4E1' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ“บ', + 'iOS7' => '', + 'Hex' => '1F4FA' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ“ป', + 'iOS7' => '', + 'Hex' => '1F4FB' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿ”Š', 'iOS7' => '', 'Hex' => '1F50A'), + array('iOS2' => '', 'iOS5' => '๐Ÿ”‰', 'iOS7' => '', 'Hex' => '1F509'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ”ˆ', + 'iOS7' => '', + 'Hex' => '1F508' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿ”‡', 'iOS7' => '', 'Hex' => '1F507'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ””', + 'iOS7' => '', + 'Hex' => '1F514' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿ”•', 'iOS7' => '', 'Hex' => '1F515'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ“ข', + 'iOS7' => '', + 'Hex' => '1F4E2' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ“ฃ', + 'iOS7' => '', + 'Hex' => '1F4E3' + ), + array('iOS2' => '', 'iOS5' => 'โณ', 'iOS7' => '', 'Hex' => '23F3'), + array('iOS2' => '', 'iOS5' => 'โŒ›', 'iOS7' => 'โŒ›๏ธ', 'Hex' => '231B'), + array('iOS2' => '', 'iOS5' => 'โฐ', 'iOS7' => 'โฐ', 'Hex' => '23F0'), + array('iOS2' => '', 'iOS5' => 'โŒš', 'iOS7' => 'โŒš๏ธ', 'Hex' => '231A'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ”“', + 'iOS7' => '', + 'Hex' => '1F513' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ”’', + 'iOS7' => '', + 'Hex' => '1F512' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿ”', 'iOS7' => '', 'Hex' => '1F50F'), + array('iOS2' => '', 'iOS5' => '๐Ÿ”', 'iOS7' => '', 'Hex' => '1F510'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ”‘', + 'iOS7' => '', + 'Hex' => '1F511' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿ”Ž', 'iOS7' => '', 'Hex' => '1F50E'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ’ก', + 'iOS7' => '', + 'Hex' => '1F4A1' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿ”ฆ', 'iOS7' => '', 'Hex' => '1F526'), + array('iOS2' => '', 'iOS5' => '๐Ÿ”†', 'iOS7' => '', 'Hex' => '1F506'), + array('iOS2' => '', 'iOS5' => '๐Ÿ”…', 'iOS7' => '', 'Hex' => '1F505'), + array('iOS2' => '', 'iOS5' => '๐Ÿ”Œ', 'iOS7' => '', 'Hex' => '1F50C'), + array('iOS2' => '', 'iOS5' => '๐Ÿ”‹', 'iOS7' => '', 'Hex' => '1F50B'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ”', + 'iOS7' => '', + 'Hex' => '1F50D' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿ›', 'iOS7' => '', 'Hex' => '1F6C1'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ›€', + 'iOS7' => '', + 'Hex' => '1F6C0' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿšฟ', 'iOS7' => '', 'Hex' => '1F6BF'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿšฝ', + 'iOS7' => '', + 'Hex' => '1F6BD' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿ”ง', 'iOS7' => '', 'Hex' => '1F527'), + array('iOS2' => '', 'iOS5' => '๐Ÿ”ฉ', 'iOS7' => '', 'Hex' => '1F529'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ”จ', + 'iOS7' => '', + 'Hex' => '1F528' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿšช', 'iOS7' => '', 'Hex' => '1F6AA'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿšฌ', + 'iOS7' => '', + 'Hex' => '1F6AC' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ’ฃ', + 'iOS7' => '', + 'Hex' => '1F4A3' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ”ซ', + 'iOS7' => '', + 'Hex' => '1F52B' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿ”ช', 'iOS7' => '', 'Hex' => '1F52A'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ’Š', + 'iOS7' => '', + 'Hex' => '1F48A' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ’‰', + 'iOS7' => '', + 'Hex' => '1F489' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ’ฐ', + 'iOS7' => '', + 'Hex' => '1F4B0' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿ’ด', 'iOS7' => '', 'Hex' => '1F4B4'), + array('iOS2' => '', 'iOS5' => '๐Ÿ’ต', 'iOS7' => '', 'Hex' => '1F4B5'), + array('iOS2' => '', 'iOS5' => '๐Ÿ’ท', 'iOS7' => '', 'Hex' => '1F4B7'), + array('iOS2' => '', 'iOS5' => '๐Ÿ’ถ', 'iOS7' => '', 'Hex' => '1F4B6'), + array('iOS2' => '', 'iOS5' => '๐Ÿ’ณ', 'iOS7' => '', 'Hex' => '1F4B3'), + array('iOS2' => '', 'iOS5' => '๐Ÿ’ธ', 'iOS7' => '', 'Hex' => '1F4B8'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ“ฒ', + 'iOS7' => '', + 'Hex' => '1F4F2' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿ“ง', 'iOS7' => '', 'Hex' => '1F4E7'), + array('iOS2' => '', 'iOS5' => '๐Ÿ“ฅ', 'iOS7' => '', 'Hex' => '1F4E5'), + array('iOS2' => '', 'iOS5' => '๐Ÿ“ค', 'iOS7' => '', 'Hex' => '1F4E4'), + array('iOS2' => '', 'iOS5' => 'โœ‰', 'iOS7' => 'โœ‰๏ธ', 'Hex' => '2709'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ“ฉ', + 'iOS7' => '', + 'Hex' => '1F4E9' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿ“จ', 'iOS7' => '', 'Hex' => '1F4E8'), + array('iOS2' => '', 'iOS5' => '๐Ÿ“ฏ', 'iOS7' => '', 'Hex' => '1F4EF'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ“ซ', + 'iOS7' => '', + 'Hex' => '1F4EB' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿ“ช', 'iOS7' => '', 'Hex' => '1F4EA'), + array('iOS2' => '', 'iOS5' => '๐Ÿ“ฌ', 'iOS7' => '', 'Hex' => '1F4EC'), + array('iOS2' => '', 'iOS5' => '๐Ÿ“ญ', 'iOS7' => '', 'Hex' => '1F4ED'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ“ฎ', + 'iOS7' => '', + 'Hex' => '1F4EE' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿ“ฆ', 'iOS7' => '', 'Hex' => '1F4E6'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ“', + 'iOS7' => '', + 'Hex' => '1F4DD' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿ“„', 'iOS7' => '', 'Hex' => '1F4C4'), + array('iOS2' => '', 'iOS5' => '๐Ÿ“ƒ', 'iOS7' => '', 'Hex' => '1F4C3'), + array('iOS2' => '', 'iOS5' => '๐Ÿ“‘', 'iOS7' => '', 'Hex' => '1F4D1'), + array('iOS2' => '', 'iOS5' => '๐Ÿ“Š', 'iOS7' => '', 'Hex' => '1F4CA'), + array('iOS2' => '', 'iOS5' => '๐Ÿ“ˆ', 'iOS7' => '', 'Hex' => '1F4C8'), + array('iOS2' => '', 'iOS5' => '๐Ÿ“‰', 'iOS7' => '', 'Hex' => '1F4C9'), + array('iOS2' => '', 'iOS5' => '๐Ÿ“œ', 'iOS7' => '', 'Hex' => '1F4DC'), + array('iOS2' => '', 'iOS5' => '๐Ÿ“‹', 'iOS7' => '', 'Hex' => '1F4CB'), + array('iOS2' => '', 'iOS5' => '๐Ÿ“…', 'iOS7' => '', 'Hex' => '1F4C5'), + array('iOS2' => '', 'iOS5' => '๐Ÿ“†', 'iOS7' => '', 'Hex' => '1F4C6'), + array('iOS2' => '', 'iOS5' => '๐Ÿ“‡', 'iOS7' => '', 'Hex' => '1F4C7'), + array('iOS2' => '', 'iOS5' => '๐Ÿ“', 'iOS7' => '', 'Hex' => '1F4C1'), + array('iOS2' => '', 'iOS5' => '๐Ÿ“‚', 'iOS7' => '', 'Hex' => '1F4C2'), + array( + 'iOS2' => '', + 'iOS5' => 'โœ‚', + 'iOS7' => 'โœ‚๏ธ', + 'Hex' => '2702' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿ“Œ', 'iOS7' => '', 'Hex' => '1F4CC'), + array('iOS2' => '', 'iOS5' => '๐Ÿ“Ž', 'iOS7' => '', 'Hex' => '1F4CE'), + array('iOS2' => '', 'iOS5' => 'โœ’', 'iOS7' => 'โœ’๏ธ', 'Hex' => '2712'), + array('iOS2' => '', 'iOS5' => 'โœ', 'iOS7' => 'โœ๏ธ', 'Hex' => '270F'), + array('iOS2' => '', 'iOS5' => '๐Ÿ“', 'iOS7' => '', 'Hex' => '1F4CF'), + array('iOS2' => '', 'iOS5' => '๐Ÿ“', 'iOS7' => '', 'Hex' => '1F4D0'), + array('iOS2' => '', 'iOS5' => '๐Ÿ“•', 'iOS7' => '', 'Hex' => '1F4D5'), + array('iOS2' => '', 'iOS5' => '๐Ÿ“—', 'iOS7' => '', 'Hex' => '1F4D7'), + array('iOS2' => '', 'iOS5' => '๐Ÿ“˜', 'iOS7' => '', 'Hex' => '1F4D8'), + array('iOS2' => '', 'iOS5' => '๐Ÿ“™', 'iOS7' => '', 'Hex' => '1F4D9'), + array('iOS2' => '', 'iOS5' => '๐Ÿ““', 'iOS7' => '', 'Hex' => '1F4D3'), + array('iOS2' => '', 'iOS5' => '๐Ÿ“”', 'iOS7' => '', 'Hex' => '1F4D4'), + array('iOS2' => '', 'iOS5' => '๐Ÿ“’', 'iOS7' => '', 'Hex' => '1F4D2'), + array('iOS2' => '', 'iOS5' => '๐Ÿ“š', 'iOS7' => '', 'Hex' => '1F4DA'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ“–', + 'iOS7' => '', + 'Hex' => '1F4D6' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿ”–', 'iOS7' => '', 'Hex' => '1F516'), + array('iOS2' => '', 'iOS5' => '๐Ÿ“›', 'iOS7' => '', 'Hex' => '1F4DB'), + array('iOS2' => '', 'iOS5' => '๐Ÿ”ฌ', 'iOS7' => '', 'Hex' => '1F52C'), + array('iOS2' => '', 'iOS5' => '๐Ÿ”ญ', 'iOS7' => '', 'Hex' => '1F52D'), + array('iOS2' => '', 'iOS5' => '๐Ÿ“ฐ', 'iOS7' => '', 'Hex' => '1F4F0'), + array( + 'iOS2' => '', + 'iOS5' => '๐ŸŽจ', + 'iOS7' => '', + 'Hex' => '1F3A8' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐ŸŽฌ', + 'iOS7' => '', + 'Hex' => '1F3AC' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐ŸŽค', + 'iOS7' => '', + 'Hex' => '1F3A4' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐ŸŽง', + 'iOS7' => '', + 'Hex' => '1F3A7' + ), + array('iOS2' => '', 'iOS5' => '๐ŸŽผ', 'iOS7' => '', 'Hex' => '1F3BC'), + array( + 'iOS2' => '', + 'iOS5' => '๐ŸŽต', + 'iOS7' => '', + 'Hex' => '1F3B5' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐ŸŽถ', + 'iOS7' => '', + 'Hex' => '1F3B6' + ), + array('iOS2' => '', 'iOS5' => '๐ŸŽน', 'iOS7' => '', 'Hex' => '1F3B9'), + array('iOS2' => '', 'iOS5' => '๐ŸŽป', 'iOS7' => '', 'Hex' => '1F3BB'), + array( + 'iOS2' => '', + 'iOS5' => '๐ŸŽบ', + 'iOS7' => '', + 'Hex' => '1F3BA' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐ŸŽท', + 'iOS7' => '', + 'Hex' => '1F3B7' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐ŸŽธ', + 'iOS7' => '', + 'Hex' => '1F3B8' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ‘พ', + 'iOS7' => '', + 'Hex' => '1F47E' + ), + array('iOS2' => '', 'iOS5' => '๐ŸŽฎ', 'iOS7' => '', 'Hex' => '1F3AE'), + array('iOS2' => '', 'iOS5' => '๐Ÿƒ', 'iOS7' => '', 'Hex' => '1F0CF'), + array('iOS2' => '', 'iOS5' => '๐ŸŽด', 'iOS7' => '', 'Hex' => '1F3B4'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ€„', + 'iOS7' => '๐Ÿ€„๏ธ', + 'Hex' => '1F004' + ), + array('iOS2' => '', 'iOS5' => '๐ŸŽฒ', 'iOS7' => '', 'Hex' => '1F3B2'), + array( + 'iOS2' => '', + 'iOS5' => '๐ŸŽฏ', + 'iOS7' => '', + 'Hex' => '1F3AF' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿˆ', + 'iOS7' => '', + 'Hex' => '1F3C8' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ€', + 'iOS7' => '', + 'Hex' => '1F3C0' + ), + array( + 'iOS2' => '', + 'iOS5' => 'โšฝ', + 'iOS7' => 'โšฝ๏ธ', + 'Hex' => '26BD' + ), + array( + 'iOS2' => '', + 'iOS5' => 'โšพ', + 'iOS7' => 'โšพ๏ธ', + 'Hex' => '26BE' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐ŸŽพ', + 'iOS7' => '', + 'Hex' => '1F3BE' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐ŸŽฑ', + 'iOS7' => '', + 'Hex' => '1F3B1' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿ‰', 'iOS7' => '', 'Hex' => '1F3C9'), + array('iOS2' => '', 'iOS5' => '๐ŸŽณ', 'iOS7' => '', 'Hex' => '1F3B3'), + array( + 'iOS2' => '', + 'iOS5' => 'โ›ณ', + 'iOS7' => 'โ›ณ๏ธ', + 'Hex' => '26F3' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿšต', 'iOS7' => '', 'Hex' => '1F6B5'), + array('iOS2' => '', 'iOS5' => '๐Ÿšด', 'iOS7' => '', 'Hex' => '1F6B4'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ', + 'iOS7' => '', + 'Hex' => '1F3C1' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿ‡', 'iOS7' => '', 'Hex' => '1F3C7'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ†', + 'iOS7' => '', + 'Hex' => '1F3C6' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐ŸŽฟ', + 'iOS7' => '', + 'Hex' => '1F3BF' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿ‚', 'iOS7' => '', 'Hex' => '1F3C2'), + array( + 'iOS2' => '', + 'iOS5' => '๐ŸŠ', + 'iOS7' => '', + 'Hex' => '1F3CA' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ„', + 'iOS7' => '', + 'Hex' => '1F3C4' + ), + array('iOS2' => '', 'iOS5' => '๐ŸŽฃ', 'iOS7' => '', 'Hex' => '1F3A3'), + array( + 'iOS2' => '', + 'iOS5' => 'โ˜•', + 'iOS7' => 'โ˜•๏ธ', + 'Hex' => '2615' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿต', + 'iOS7' => '', + 'Hex' => '1F375' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿถ', + 'iOS7' => '', + 'Hex' => '1F376' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿผ', 'iOS7' => '', 'Hex' => '1F37C'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿบ', + 'iOS7' => '', + 'Hex' => '1F37A' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿป', + 'iOS7' => '', + 'Hex' => '1F37B' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿธ', + 'iOS7' => '', + 'Hex' => '1F378' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿน', 'iOS7' => '', 'Hex' => '1F379'), + array('iOS2' => '', 'iOS5' => '๐Ÿท', 'iOS7' => '', 'Hex' => '1F377'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿด', + 'iOS7' => '', + 'Hex' => '1F374' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿ•', 'iOS7' => '', 'Hex' => '1F355'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ”', + 'iOS7' => '', + 'Hex' => '1F354' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐ŸŸ', + 'iOS7' => '', + 'Hex' => '1F35F' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿ—', 'iOS7' => '', 'Hex' => '1F357'), + array('iOS2' => '', 'iOS5' => '๐Ÿ–', 'iOS7' => '', 'Hex' => '1F356'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ', + 'iOS7' => '', + 'Hex' => '1F35D' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ›', + 'iOS7' => '', + 'Hex' => '1F35B' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿค', 'iOS7' => '', 'Hex' => '1F364'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿฑ', + 'iOS7' => '', + 'Hex' => '1F371' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿฃ', + 'iOS7' => '', + 'Hex' => '1F363' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿฅ', 'iOS7' => '', 'Hex' => '1F365'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ™', + 'iOS7' => '', + 'Hex' => '1F359' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ˜', + 'iOS7' => '', + 'Hex' => '1F358' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿš', + 'iOS7' => '', + 'Hex' => '1F35A' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿœ', + 'iOS7' => '', + 'Hex' => '1F35C' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿฒ', + 'iOS7' => '', + 'Hex' => '1F372' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿข', + 'iOS7' => '', + 'Hex' => '1F362' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿก', + 'iOS7' => '', + 'Hex' => '1F361' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿณ', + 'iOS7' => '', + 'Hex' => '1F373' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿž', + 'iOS7' => '', + 'Hex' => '1F35E' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿฉ', 'iOS7' => '', 'Hex' => '1F369'), + array('iOS2' => '', 'iOS5' => '๐Ÿฎ', 'iOS7' => '', 'Hex' => '1F36E'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿฆ', + 'iOS7' => '', + 'Hex' => '1F366' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿจ', 'iOS7' => '', 'Hex' => '1F368'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿง', + 'iOS7' => '', + 'Hex' => '1F367' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐ŸŽ‚', + 'iOS7' => '', + 'Hex' => '1F382' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿฐ', + 'iOS7' => '', + 'Hex' => '1F370' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿช', 'iOS7' => '', 'Hex' => '1F36A'), + array('iOS2' => '', 'iOS5' => '๐Ÿซ', 'iOS7' => '', 'Hex' => '1F36B'), + array('iOS2' => '', 'iOS5' => '๐Ÿฌ', 'iOS7' => '', 'Hex' => '1F36C'), + array('iOS2' => '', 'iOS5' => '๐Ÿญ', 'iOS7' => '', 'Hex' => '1F36D'), + array('iOS2' => '', 'iOS5' => '๐Ÿฏ', 'iOS7' => '', 'Hex' => '1F36F'), + array( + 'iOS2' => '', + 'iOS5' => '๐ŸŽ', + 'iOS7' => '', + 'Hex' => '1F34E' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿ', 'iOS7' => '', 'Hex' => '1F34F'), + array( + 'iOS2' => '', + 'iOS5' => '๐ŸŠ', + 'iOS7' => '', + 'Hex' => '1F34A' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿ‹', 'iOS7' => '', 'Hex' => '1F34B'), + array('iOS2' => '', 'iOS5' => '๐Ÿ’', 'iOS7' => '', 'Hex' => '1F352'), + array('iOS2' => '', 'iOS5' => '๐Ÿ‡', 'iOS7' => '', 'Hex' => '1F347'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ‰', + 'iOS7' => '', + 'Hex' => '1F349' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ“', + 'iOS7' => '', + 'Hex' => '1F353' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿ‘', 'iOS7' => '', 'Hex' => '1F351'), + array('iOS2' => '', 'iOS5' => '๐Ÿˆ', 'iOS7' => '', 'Hex' => '1F348'), + array('iOS2' => '', 'iOS5' => '๐ŸŒ', 'iOS7' => '', 'Hex' => '1F34C'), + array('iOS2' => '', 'iOS5' => '๐Ÿ', 'iOS7' => '', 'Hex' => '1F350'), + array('iOS2' => '', 'iOS5' => '๐Ÿ', 'iOS7' => '', 'Hex' => '1F34D'), + array('iOS2' => '', 'iOS5' => '๐Ÿ ', 'iOS7' => '', 'Hex' => '1F360'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ†', + 'iOS7' => '', + 'Hex' => '1F346' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ…', + 'iOS7' => '', + 'Hex' => '1F345' + ), + array('iOS2' => '', 'iOS5' => '๐ŸŒฝ', 'iOS7' => '', 'Hex' => '1F33D'), + array( + 'iOS2' => '', + 'iOS5' => '1โƒฃ', + 'iOS7' => '', + 'Hex' => '0031_20E3' + ), + array( + 'iOS2' => '', + 'iOS5' => '2โƒฃ', + 'iOS7' => '', + 'Hex' => '0032_20E3' + ), + array( + 'iOS2' => '', + 'iOS5' => '3โƒฃ', + 'iOS7' => '', + 'Heex' => '0034_20E3' + ), + array( + 'iOS2' => '', + 'iOS5' => '2โƒฃ', + 'iOS7' => '', + 'Hex' => '0032_20E3' + ), + array( + 'iOS2' => '', + 'iOS5' => '0โƒฃ', + 'iOS7' => '', + 'Hex' => '0030_20E3' + ), + array( + 'iOS2' => '', + 'iOS5' => '5โƒฃ', + 'iOS7' => '', + 'Hex' => '0035_20E3' + ), + array( + 'iOS2' => '', + 'iOS5' => '6โƒฃ', + 'iOS7' => '', + 'Hex' => '0036_20E3' + ), + array( + 'iOS2' => '', + 'iOS5' => '7โƒฃ', + 'iOS7' => '', + 'Hex' => '0037_20E3' + ), + array( + 'iOS2' => '', + 'iOS5' => '8โƒฃ', + 'iOS7' => '', + 'Hex' => '0038_20E3' + ), + array( + 'iOS2' => '', + 'iOS5' => '9โƒฃ', + 'iOS7' => '', + 'Hex' => '0039_20E3' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿ”Ÿ', 'iOS7' => '', 'Hex' => '1F51F'), + array('iOS2' => '', 'iOS5' => '๐Ÿ”ข', 'iOS7' => '', 'Hex' => '1F522'), + array( + 'iOS2' => '', + 'iOS5' => '#โƒฃ', + 'iOS7' => '', + 'Hex' => '0023_20E3' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿ”ฃ', 'iOS7' => '', 'Hex' => '1F523'), + array( + 'iOS2' => '', + 'iOS5' => 'โฌ†', + 'iOS7' => 'โฌ†๏ธ', + 'Hex' => '2B06' + ), + array( + 'iOS2' => '', + 'iOS5' => 'โฌ‡', + 'iOS7' => 'โฌ‡๏ธ', + 'Hex' => '2B07' + ), + array( + 'iOS2' => '', + 'iOS5' => 'โฌ…', + 'iOS7' => 'โฌ…๏ธ', + 'Hex' => '2B05' + ), + array( + 'iOS2' => '', + 'iOS5' => 'โžก', + 'iOS7' => 'โžก๏ธ', + 'Hex' => '27A1' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿ” ', 'iOS7' => '', 'Hex' => '1F520'), + array('iOS2' => '', 'iOS5' => '๐Ÿ”ก', 'iOS7' => '', 'Hex' => '1F521'), + array('iOS2' => '', 'iOS5' => '๐Ÿ”ค', 'iOS7' => '', 'Hex' => '1F524'), + array( + 'iOS2' => '', + 'iOS5' => 'โ†—', + 'iOS7' => 'โ†—๏ธ', + 'Hex' => '2197' + ), + array( + 'iOS2' => '', + 'iOS5' => 'โ†–', + 'iOS7' => 'โ†–๏ธ', + 'Hex' => '2196' + ), + array( + 'iOS2' => '', + 'iOS5' => 'โ†˜', + 'iOS7' => 'โ†˜๏ธ', + 'Hex' => '2198' + ), + array( + 'iOS2' => '', + 'iOS5' => 'โ†™', + 'iOS7' => 'โ†™๏ธ', + 'Hex' => '2199' + ), + array('iOS2' => '', 'iOS5' => 'โ†”', 'iOS7' => 'โ†”๏ธ', 'Hex' => '2194'), + array('iOS2' => '', 'iOS5' => 'โ†•', 'iOS7' => 'โ†•๏ธ', 'Hex' => '2195'), + array('iOS2' => '', 'iOS5' => '๐Ÿ”„', 'iOS7' => '', 'Hex' => '1F504'), + array( + 'iOS2' => '', + 'iOS5' => 'โ—€', + 'iOS7' => 'โ—€๏ธ', + 'Hex' => '25C0' + ), + array( + 'iOS2' => '', + 'iOS5' => 'โ–ถ', + 'iOS7' => 'โ–ถ๏ธ', + 'Hex' => '25B6' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿ”ผ', 'iOS7' => '', 'Hex' => '1F53C'), + array('iOS2' => '', 'iOS5' => '๐Ÿ”ฝ', 'iOS7' => '', 'Hex' => '1F53D'), + array('iOS2' => '', 'iOS5' => 'โ†ฉ', 'iOS7' => 'โ†ฉ๏ธ', 'Hex' => '21A9'), + array('iOS2' => '', 'iOS5' => 'โ†ช', 'iOS7' => 'โ†ช๏ธ', 'Hex' => '21AA'), + array('iOS2' => '', 'iOS5' => 'โ„น', 'iOS7' => 'โ„น๏ธ', 'Hex' => '2139'), + array('iOS2' => '', 'iOS5' => 'โช', 'iOS7' => '', 'Hex' => '23EA'), + array('iOS2' => '', 'iOS5' => 'โฉ', 'iOS7' => '', 'Hex' => '23E9'), + array('iOS2' => '', 'iOS5' => 'โซ', 'iOS7' => '', 'Hex' => '23EB'), + array('iOS2' => '', 'iOS5' => 'โฌ', 'iOS7' => '', 'Hex' => '23EC'), + array('iOS2' => '', 'iOS5' => 'โคต', 'iOS7' => 'โคต๏ธ', 'Hex' => '2935'), + array('iOS2' => '', 'iOS5' => 'โคด', 'iOS7' => 'โคด๏ธ', 'Hex' => '2934'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ†—', + 'iOS7' => '', + 'Hex' => '1F197' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿ”€', 'iOS7' => '', 'Hex' => '1F500'), + array('iOS2' => '', 'iOS5' => '๐Ÿ”', 'iOS7' => '', 'Hex' => '1F501'), + array('iOS2' => '', 'iOS5' => '๐Ÿ”‚', 'iOS7' => '', 'Hex' => '1F502'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ†•', + 'iOS7' => '', + 'Hex' => '1F195' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ†™', + 'iOS7' => '', + 'Hex' => '1F199' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ†’', + 'iOS7' => '', + 'Hex' => '1F192' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿ†“', 'iOS7' => '', 'Hex' => '1F193'), + array('iOS2' => '', 'iOS5' => '๐Ÿ†–', 'iOS7' => '', 'Hex' => '1F196'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ“ถ', + 'iOS7' => '', + 'Hex' => '1F4F6' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐ŸŽฆ', + 'iOS7' => '', + 'Hex' => '1F3A6' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿˆ', + 'iOS7' => '', + 'Hex' => '1F201' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿˆฏ', + 'iOS7' => '๐Ÿˆฏ๏ธ', + 'Hex' => '1F22F' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿˆณ', + 'iOS7' => '', + 'Hex' => '1F233' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿˆต', + 'iOS7' => '', + 'Hex' => '1F235' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿˆด', 'iOS7' => '', 'Hex' => '1F234'), + array('iOS2' => '', 'iOS5' => '๐Ÿˆฒ', 'iOS7' => '', 'Hex' => '1F232'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ‰', + 'iOS7' => '', + 'Hex' => '1F250' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿˆน', + 'iOS7' => '', + 'Hex' => '1F239' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿˆบ', + 'iOS7' => '', + 'Hex' => '1F23A' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿˆถ', + 'iOS7' => '', + 'Hex' => '1F236' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿˆš', + 'iOS7' => '๐Ÿˆš๏ธ', + 'Hex' => '1F21A' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿšป', + 'iOS7' => '', + 'Hex' => '1F6BB' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿšน', + 'iOS7' => '', + 'Hex' => '1F6B9' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿšบ', + 'iOS7' => '', + 'Hex' => '1F6BA' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿšผ', + 'iOS7' => '', + 'Hex' => '1F6BC' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿšพ', + 'iOS7' => '', + 'Hex' => '1F6BE' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿšฐ', 'iOS7' => '', 'Hex' => '1F6B0'), + array('iOS2' => '', 'iOS5' => '๐Ÿšฎ', 'iOS7' => '', 'Hex' => '1F6AE'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ…ฟ', + 'iOS7' => '๐Ÿ…ฟ๏ธ', + 'Hex' => '1F17F' + ), + array( + 'iOS2' => '', + 'iOS5' => 'โ™ฟ', + 'iOS7' => 'โ™ฟ๏ธ', + 'Hex' => '267F' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿšญ', + 'iOS7' => '', + 'Hex' => '1F6AD' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿˆท', + 'iOS7' => '', + 'Hex' => '1F237' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿˆธ', + 'iOS7' => '', + 'Hex' => '1F238' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿˆ‚', + 'iOS7' => '', + 'Hex' => '1F202' + ), + array('iOS2' => '', 'iOS5' => 'โ“‚', 'iOS7' => 'โ“‚๏ธ', 'Hex' => '24C2'), + array('iOS2' => '', 'iOS5' => '๐Ÿ›‚', 'iOS7' => '', 'Hex' => '1F6C2'), + array('iOS2' => '', 'iOS5' => '๐Ÿ›„', 'iOS7' => '', 'Hex' => '1F6C4'), + array('iOS2' => '', 'iOS5' => '๐Ÿ›…', 'iOS7' => '', 'Hex' => '1F6C5'), + array('iOS2' => '', 'iOS5' => '๐Ÿ›ƒ', 'iOS7' => '', 'Hex' => '1F6C3'), + array('iOS2' => '', 'iOS5' => '๐Ÿ‰‘', 'iOS7' => '', 'Hex' => '1F251'), + array( + 'iOS2' => '', + 'iOS5' => 'ใŠ™', + 'iOS7' => 'ใŠ™๏ธ', + 'Hex' => '3299' + ), + array( + 'iOS2' => '', + 'iOS5' => 'ใŠ—', + 'iOS7' => 'ใŠ—๏ธ', + 'Hex' => '3297' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿ†‘', 'iOS7' => '', 'Hex' => '1F191'), + array('iOS2' => '', 'iOS5' => '๐Ÿ†˜', 'iOS7' => '', 'Hex' => '1F198'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ†”', + 'iOS7' => '', + 'Hex' => '1F194' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿšซ', 'iOS7' => '', 'Hex' => '1F6AB'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ”ž', + 'iOS7' => '', + 'Hex' => '1F51E' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿ“ต', 'iOS7' => '', 'Hex' => '1F4F5'), + array('iOS2' => '', 'iOS5' => '๐Ÿšฏ', 'iOS7' => '', 'Hex' => '1F6AF'), + array('iOS2' => '', 'iOS5' => '๐Ÿšฑ', 'iOS7' => '', 'Hex' => '1F6B1'), + array('iOS2' => '', 'iOS5' => '๐Ÿšณ', 'iOS7' => '', 'Hex' => '1F6B3'), + array('iOS2' => '', 'iOS5' => '๐Ÿšท', 'iOS7' => '', 'Hex' => '1F6B7'), + array('iOS2' => '', 'iOS5' => '๐Ÿšธ', 'iOS7' => '', 'Hex' => '1F6B8'), + array('iOS2' => '', 'iOS5' => 'โ›”', 'iOS7' => 'โ›”๏ธ', 'Hex' => '26D4'), + array( + 'iOS2' => '', + 'iOS5' => 'โœณ', + 'iOS7' => 'โœณ๏ธ', + 'Hex' => '2733' + ), + array('iOS2' => '', 'iOS5' => 'โ‡', 'iOS7' => 'โ‡๏ธ', 'Hex' => '2747'), + array('iOS2' => '', 'iOS5' => 'โŽ', 'iOS7' => '', 'Hex' => '274E'), + array('iOS2' => '', 'iOS5' => 'โœ…', 'iOS7' => '', 'Hex' => '2705'), + array( + 'iOS2' => '', + 'iOS5' => 'โœด', + 'iOS7' => 'โœด๏ธ', + 'Hex' => '2734' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ’Ÿ', + 'iOS7' => '', + 'Hex' => '1F49F' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ†š', + 'iOS7' => '', + 'Hex' => '1F19A' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ“ณ', + 'iOS7' => '', + 'Hex' => '1F4F3' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ“ด', + 'iOS7' => '', + 'Hex' => '1F4F4' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ…ฐ', + 'iOS7' => '', + 'Hex' => '1F170' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ…ฑ', + 'iOS7' => '', + 'Hex' => '1F171' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ†Ž', + 'iOS7' => '', + 'Hex' => '1F18E' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ…พ', + 'iOS7' => '', + 'Hex' => '1F17E' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿ’ ', 'iOS7' => '', 'Hex' => '1F4A0'), + array('iOS2' => '', 'iOS5' => 'โžฟ', 'iOS7' => '', 'Hex' => '27BF'), + array('iOS2' => '', 'iOS5' => 'โ™ป', 'iOS7' => 'โ™ป๏ธ', 'Hex' => '267B'), + array( + 'iOS2' => '', + 'iOS5' => 'โ™ˆ', + 'iOS7' => 'โ™ˆ๏ธ', + 'Hex' => '2648' + ), + array( + 'iOS2' => '', + 'iOS5' => 'โ™‰', + 'iOS7' => 'โ™‰๏ธ', + 'Hex' => '2649' + ), + array( + 'iOS2' => '', + 'iOS5' => 'โ™Š', + 'iOS7' => 'โ™Š๏ธ', + 'Hex' => '264A' + ), + array( + 'iOS2' => '', + 'iOS5' => 'โ™‹', + 'iOS7' => 'โ™‹๏ธ', + 'Hex' => '264B' + ), + array( + 'iOS2' => '', + 'iOS5' => 'โ™Œ', + 'iOS7' => 'โ™Œ๏ธ', + 'Hex' => '264C' + ), + array( + 'iOS2' => '', + 'iOS5' => 'โ™', + 'iOS7' => 'โ™๏ธ', + 'Hex' => '264D' + ), + array( + 'iOS2' => '', + 'iOS5' => 'โ™Ž', + 'iOS7' => 'โ™Ž๏ธ', + 'Hex' => '264E' + ), + array( + 'iOS2' => '', + 'iOS5' => 'โ™', + 'iOS7' => 'โ™๏ธ', + 'Hex' => '264F' + ), + array( + 'iOS2' => '', + 'iOS5' => 'โ™', + 'iOS7' => 'โ™๏ธ', + 'Hex' => '2650' + ), + array( + 'iOS2' => '', + 'iOS5' => 'โ™‘', + 'iOS7' => 'โ™‘๏ธ', + 'Hex' => '2651' + ), + array( + 'iOS2' => '', + 'iOS5' => 'โ™’', + 'iOS7' => 'โ™’๏ธ', + 'Hex' => '2652' + ), + array( + 'iOS2' => '', + 'iOS5' => 'โ™“', + 'iOS7' => 'โ™“๏ธ', + 'Hex' => '2653' + ), + array('iOS2' => '', 'iOS5' => 'โ›Ž', 'iOS7' => '', 'Hex' => '26CE'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ”ฏ', + 'iOS7' => '', + 'Hex' => '1F52F' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿง', + 'iOS7' => '', + 'Hex' => '1F3E7' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ’น', + 'iOS7' => '', + 'Hex' => '1F4B9' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿ’ฒ', 'iOS7' => '', 'Hex' => '1F4B2'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ’ฑ', + 'iOS7' => '', + 'Hex' => '1F4B1' + ), + array('iOS2' => 'ยฉ', 'iOS5' => 'ยฉ', 'iOS7' => '', 'Hex' => '00A9'), + array('iOS2' => 'ยฎ', 'iOS5' => 'ยฎ', 'iOS7' => '', 'Hex' => '00AE'), + array('iOS2' => 'โ„ข', 'iOS5' => 'โ„ข', 'iOS7' => '', 'Hex' => '2122'), + array( + 'iOS2' => '', + 'iOS5' => 'ใ€ฝ', + 'iOS7' => 'ใ€ฝ๏ธ', + 'Hex' => '303D' + ), + array('iOS2' => '', 'iOS5' => 'ใ€ฐ', 'iOS7' => '', 'Hex' => '3030'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ”', + 'iOS7' => '', + 'Hex' => '1F51D' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿ”š', 'iOS7' => '', 'Hex' => '1F51A'), + array('iOS2' => '', 'iOS5' => '๐Ÿ”™', 'iOS7' => '', 'Hex' => '1F519'), + array('iOS2' => '', 'iOS5' => '๐Ÿ”›', 'iOS7' => '', 'Hex' => '1F51B'), + array('iOS2' => '', 'iOS5' => '๐Ÿ”œ', 'iOS7' => '', 'Hex' => '1F51C'), + array('iOS2' => '', 'iOS5' => 'โŒ', 'iOS7' => '', 'Hex' => '274C'), + array( + 'iOS2' => '', + 'iOS5' => 'โญ•', + 'iOS7' => 'โญ•๏ธ', + 'Hex' => '2B55' + ), + array('iOS2' => '', 'iOS5' => 'โ—', 'iOS7' => 'โ—๏ธ', 'Hex' => '2757'), + array('iOS2' => '', 'iOS5' => 'โ“', 'iOS7' => '', 'Hex' => '2753'), + array('iOS2' => '', 'iOS5' => 'โ•', 'iOS7' => '', 'Hex' => '2755'), + array('iOS2' => '', 'iOS5' => 'โ”', 'iOS7' => '', 'Hex' => '2754'), + array('iOS2' => '', 'iOS5' => '๐Ÿ”ƒ', 'iOS7' => '', 'Hex' => '1F503'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ•›', + 'iOS7' => '', + 'Hex' => '1F55B' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿ•ง', 'iOS7' => '', 'Hex' => '1F567'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ•', + 'iOS7' => '', + 'Hex' => '1F550' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿ•œ', 'iOS7' => '', 'Hex' => '1F55C'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ•‘', + 'iOS7' => '', + 'Hex' => '1F551' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿ•', 'iOS7' => '', 'Hex' => '1F55D'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ•’', + 'iOS7' => '', + 'Hex' => '1F552' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿ•ž', 'iOS7' => '', 'Hex' => '1F55E'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ•“', + 'iOS7' => '', + 'Hex' => '1F553' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿ•Ÿ', 'iOS7' => '', 'Hex' => '1F55F'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ•”', + 'iOS7' => '', + 'Hex' => '1F554' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿ• ', 'iOS7' => '', 'Hex' => '1F560'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ••', + 'iOS7' => '', + 'Hex' => '1F555' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ•–', + 'iOS7' => '', + 'Hex' => '1F556' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ•—', + 'iOS7' => '', + 'Hex' => '1F557' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ•˜', + 'iOS7' => '', + 'Hex' => '1F558' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ•™', + 'iOS7' => '', + 'Hex' => '1F559' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ•š', + 'iOS7' => '', + 'Hex' => '1F55A' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿ•ก', 'iOS7' => '', 'Hex' => '1F561'), + array('iOS2' => '', 'iOS5' => '๐Ÿ•ข', 'iOS7' => '', 'Hex' => '1F562'), + array('iOS2' => '', 'iOS5' => '๐Ÿ•ฃ', 'iOS7' => '', 'Hex' => '1F563'), + array('iOS2' => '', 'iOS5' => '๐Ÿ•ค', 'iOS7' => '', 'Hex' => '1F564'), + array('iOS2' => '', 'iOS5' => '๐Ÿ•ฅ', 'iOS7' => '', 'Hex' => '1F565'), + array('iOS2' => '', 'iOS5' => '๐Ÿ•ฆ', 'iOS7' => '', 'Hex' => '1F566'), + array('iOS2' => '', 'iOS5' => 'โœ–', 'iOS7' => 'โœ–๏ธ', 'Hex' => '2716'), + array('iOS2' => '', 'iOS5' => 'โž•', 'iOS7' => '', 'Hex' => '2795'), + array('iOS2' => '', 'iOS5' => 'โž–', 'iOS7' => '', 'Hex' => '2796'), + array('iOS2' => '', 'iOS5' => 'โž—', 'iOS7' => '', 'Hex' => '2797'), + array( + 'iOS2' => '', + 'iOS5' => 'โ™ ', + 'iOS7' => 'โ™ ๏ธ', + 'Hex' => '2660' + ), + array( + 'iOS2' => '', + 'iOS5' => 'โ™ฅ', + 'iOS7' => 'โ™ฅ๏ธ', + 'Hex' => '2665' + ), + array( + 'iOS2' => '', + 'iOS5' => 'โ™ฃ', + 'iOS7' => 'โ™ฃ๏ธ', + 'Hex' => '2663' + ), + array( + 'iOS2' => '', + 'iOS5' => 'โ™ฆ', + 'iOS7' => 'โ™ฆ๏ธ', + 'Hex' => '2666' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿ’ฎ', 'iOS7' => '', 'Hex' => '1F4AE'), + array('iOS2' => '', 'iOS5' => '๐Ÿ’ฏ', 'iOS7' => '', 'Hex' => '1F4AF'), + array('iOS2' => '', 'iOS5' => 'โœ”', 'iOS7' => 'โœ”๏ธ', 'Hex' => '2714'), + array('iOS2' => '', 'iOS5' => 'โ˜‘', 'iOS7' => 'โ˜‘๏ธ', 'Hex' => '2611'), + array('iOS2' => '', 'iOS5' => '๐Ÿ”˜', 'iOS7' => '', 'Hex' => '1F518'), + array('iOS2' => '', 'iOS5' => '๐Ÿ”—', 'iOS7' => '', 'Hex' => '1F517'), + array('iOS2' => '', 'iOS5' => 'โžฐ', 'iOS7' => '', 'Hex' => '27B0'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ”ฑ', + 'iOS7' => '', + 'Hex' => '1F531' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ”ฒ', + 'iOS7' => '', + 'Hex' => '1F532' + ), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ”ณ', + 'iOS7' => '', + 'Hex' => '1F533' + ), + array('iOS2' => '', 'iOS5' => 'โ—ผ', 'iOS7' => 'โ—ผ๏ธ', 'Hex' => '25FC'), + array('iOS2' => '', 'iOS5' => 'โ—ป', 'iOS7' => 'โ—ป๏ธ', 'Hex' => '25FB'), + array('iOS2' => '', 'iOS5' => 'โ—พ', 'iOS7' => 'โ—พ๏ธ', 'Hex' => '25FE'), + array('iOS2' => '', 'iOS5' => 'โ—ฝ', 'iOS7' => 'โ—ฝ๏ธ', 'Hex' => '25FD'), + array('iOS2' => '', 'iOS5' => 'โ–ช', 'iOS7' => 'โ–ช๏ธ', 'Hex' => '25AA'), + array('iOS2' => '', 'iOS5' => 'โ–ซ', 'iOS7' => 'โ–ซ๏ธ', 'Hex' => '25AB'), + array('iOS2' => '', 'iOS5' => '๐Ÿ”บ', 'iOS7' => '', 'Hex' => '1F53A'), + array('iOS2' => '', 'iOS5' => 'โฌœ', 'iOS7' => 'โฌœ๏ธ', 'Hex' => '2B1C'), + array('iOS2' => '', 'iOS5' => 'โฌ›', 'iOS7' => 'โฌ›๏ธ', 'Hex' => '2B1B'), + array('iOS2' => '', 'iOS5' => 'โšซ', 'iOS7' => 'โšซ๏ธ', 'Hex' => '26AB'), + array('iOS2' => '', 'iOS5' => 'โšช', 'iOS7' => 'โšช๏ธ', 'Hex' => '26AA'), + array( + 'iOS2' => '', + 'iOS5' => '๐Ÿ”ด', + 'iOS7' => '', + 'Hex' => '1F534' + ), + array('iOS2' => '', 'iOS5' => '๐Ÿ”ต', 'iOS7' => '', 'Hex' => '1F535'), + array('iOS2' => '', 'iOS5' => '๐Ÿ”ป', 'iOS7' => '', 'Hex' => '1F53B'), + array('iOS2' => '', 'iOS5' => '๐Ÿ”ถ', 'iOS7' => '', 'Hex' => '1F536'), + array('iOS2' => '', 'iOS5' => '๐Ÿ”ท', 'iOS7' => '', 'Hex' => '1F537'), + array('iOS2' => '', 'iOS5' => '๐Ÿ”ธ', 'iOS7' => '', 'Hex' => '1F538'), + array('iOS2' => '', 'iOS5' => '๐Ÿ”น', 'iOS7' => '', 'Hex' => '1F539'), + array('iOS2' => '', 'iOS5' => 'โ‰', 'iOS7' => 'โ‰๏ธ', 'Hex' => '2049'), + array('iOS2' => '', 'iOS5' => 'โ€ผ', 'iOS7' => 'โ€ผ๏ธ', 'Hex' => '203C') + ); } diff --git a/src/keystream.class.php b/src/keystream.class.php index cc3448e5..4caed2f3 100755 --- a/src/keystream.class.php +++ b/src/keystream.class.php @@ -27,7 +27,7 @@ public function __construct($key, $macKey) public static function GenerateKeys($password, $nonce) { $array = array( - "key",//placeholders + "key", //placeholders "key", "key", "key" @@ -75,4 +75,4 @@ private function computeMac($buffer, $offset, $length) $this->seq++; return hash_final($hmac, true); } -} \ No newline at end of file +} diff --git a/src/mediauploader.php b/src/mediauploader.php index b798cc9a..a4d0e5b2 100755 --- a/src/mediauploader.php +++ b/src/mediauploader.php @@ -1,11 +1,9 @@ input; } - } class ProtocolNode { - private $tag; private $attributeHash; private $children; @@ -223,7 +220,6 @@ public function refreshTimes($offset = 0) } } - /** * Print human readable ProtocolNode object * @@ -240,12 +236,10 @@ public function __toString() return print_r($readableNode, true); } - } class BinTreeNodeReader { - private $input; /** @var $key KeyStream */ private $key; @@ -288,45 +282,45 @@ public function nextTree($input = null) } protected function readNibble() { - $byte = $this->readInt8(); - - $ignoreLastNibble = (bool) ($byte & 0x80); - $size = ($byte & 0x7f); - $nrOfNibbles = $size * 2 - (int) $ignoreLastNibble; - - $data = $this->fillArray($size); - $string = ''; - - for ($i = 0; $i < $nrOfNibbles; $i++) { - $byte = $data[(int) floor($i / 2)]; - $ord = ord($byte); - - $shift = 4 * (1 - $i % 2); - $decimal = ($ord & (15 << $shift)) >> $shift; - - switch ($decimal) { - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - case 8: - case 9: - $string .= $decimal; - break; - case 10: - case 11: - $string .= chr($decimal - 10 + 45); - break; - default: - throw new Exception("Bad nibble: $decimal"); - } - } - - return $string; + $byte = $this->readInt8(); + + $ignoreLastNibble = (bool) ($byte & 0x80); + $size = ($byte & 0x7f); + $nrOfNibbles = $size * 2 - (int) $ignoreLastNibble; + + $data = $this->fillArray($size); + $string = ''; + + for ($i = 0; $i < $nrOfNibbles; $i++) { + $byte = $data[(int) floor($i / 2)]; + $ord = ord($byte); + + $shift = 4 * (1 - $i % 2); + $decimal = ($ord & (15 << $shift)) >> $shift; + + switch ($decimal) { + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + $string .= $decimal; + break; + case 10: + case 11: + $string .= chr($decimal - 10 + 45); + break; + default: + throw new Exception("Bad nibble: $decimal"); + } + } + + return $string; } protected function getToken($token) @@ -334,22 +328,25 @@ protected function getToken($token) $ret = ""; $subdict = false; TokenMap::GetToken($token, $subdict, $ret); - if ( ! $ret) { + if (!$ret) { $token = $this->readInt8(); TokenMap::GetToken($token, $subdict, $ret); - if ( ! $ret) { + if (!$ret) { throw new Exception("BinTreeNodeReader->getToken: Invalid token $token"); } } + return $ret; } protected function readString($token) { $ret = ""; + if ($token == -1) { throw new Exception("BinTreeNodeReader->readString: Invalid token $token"); } + if (($token > 2) && ($token < 0xf5)) { $ret = $this->getToken($token); } elseif ($token == 0) { @@ -379,6 +376,7 @@ protected function readAttributes($size) { $attributes = array(); $attribCount = ($size - 2 + $size % 2) / 2; + for ($i = 0; $i < $attribCount; $i++) { $key = $this->readString($this->readInt8()); $value = $this->readString($this->readInt8()); @@ -415,7 +413,7 @@ protected function nextTreeInternal() protected function isListTag($token) { - return (($token == 248) || ($token == 0) || ($token == 249)); + return ($token == 248 || $token == 0 || $token == 249); } protected function readList($token) @@ -517,12 +515,10 @@ protected function fillArray($len) return $ret; } - } class BinTreeNodeWriter { - private $output; /** @var $key KeyStream */ private $key; diff --git a/src/rc4.php b/src/rc4.php index 164d6c9a..d8bb8e8b 100755 --- a/src/rc4.php +++ b/src/rc4.php @@ -1,8 +1,6 @@ s[$i] = $this->s[$j]; $this->s[$j] = $c; } - } // DEPRECATED: WAUTH-1 diff --git a/src/token.php b/src/token.php index 02b327ac..bfa8f69f 100755 --- a/src/token.php +++ b/src/token.php @@ -3,24 +3,24 @@ function generateRequestToken($country, $phone) { - // $signature = "MIIDMjCCAvCgAwIBAgIETCU2pDALBgcqhkjOOAQDBQAwfDELMAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFDASBgNVBAcTC1NhbnRhIENsYXJhMRYwFAYDVQQKEw1XaGF0c0FwcCBJbmMuMRQwEgYDVQQLEwtFbmdpbmVlcmluZzEUMBIGA1UEAxMLQnJpYW4gQWN0b24wHhcNMTAwNjI1MjMwNzE2WhcNNDQwMjE1MjMwNzE2WjB8MQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEUMBIGA1UEBxMLU2FudGEgQ2xhcmExFjAUBgNVBAoTDVdoYXRzQXBwIEluYy4xFDASBgNVBAsTC0VuZ2luZWVyaW5nMRQwEgYDVQQDEwtCcmlhbiBBY3RvbjCCAbgwggEsBgcqhkjOOAQBMIIBHwKBgQD9f1OBHXUSKVLfSpwu7OTn9hG3UjzvRADDHj+AtlEmaUVdQCJR+1k9jVj6v8X1ujD2y5tVbNeBO4AdNG/yZmC3a5lQpaSfn+gEexAiwk+7qdf+t8Yb+DtX58aophUPBPuD9tPFHsMCNVQTWhaRMvZ1864rYdcq7/IiAxmd0UgBxwIVAJdgUI8VIwvMspK5gqLrhAvwWBz1AoGBAPfhoIXWmz3ey7yrXDa4V7l5lK+7+jrqgvlXTAs9B4JnUVlXjrrUWU/mcQcQgYC0SRZxI+hMKBYTt88JMozIpuE8FnqLVHyNKOCjrh4rs6Z1kW6jfwv6ITVi8ftiegEkO8yk8b6oUZCJqIPf4VrlnwaSi2ZegHtVJWQBTDv+z0kqA4GFAAKBgQDRGYtLgWh7zyRtQainJfCpiaUbzjJuhMgo4fVWZIvXHaSHBU1t5w//S0lDK2hiqkj8KpMWGywVov9eZxZy37V26dEqr/c2m5qZ0E+ynSu7sqUD7kGx/zeIcGT0H+KAVgkGNQCo5Uc0koLRWYHNtYoIvt5R3X6YZylbPftF/8ayWTALBgcqhkjOOAQDBQADLwAwLAIUAKYCp0d6z4QQdyN74JDfQ2WCyi8CFDUM4CaNB+ceVXdKtOrNTQcc0e+t"; - // $classesMd5 = "R7MxKWjKZns6728qXwgRRQ=="; // 2.11.489 + // $signature = "MIIDMjCCAvCgAwIBAgIETCU2pDALBgcqhkjOOAQDBQAwfDELMAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFDASBgNVBAcTC1NhbnRhIENsYXJhMRYwFAYDVQQKEw1XaGF0c0FwcCBJbmMuMRQwEgYDVQQLEwtFbmdpbmVlcmluZzEUMBIGA1UEAxMLQnJpYW4gQWN0b24wHhcNMTAwNjI1MjMwNzE2WhcNNDQwMjE1MjMwNzE2WjB8MQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEUMBIGA1UEBxMLU2FudGEgQ2xhcmExFjAUBgNVBAoTDVdoYXRzQXBwIEluYy4xFDASBgNVBAsTC0VuZ2luZWVyaW5nMRQwEgYDVQQDEwtCcmlhbiBBY3RvbjCCAbgwggEsBgcqhkjOOAQBMIIBHwKBgQD9f1OBHXUSKVLfSpwu7OTn9hG3UjzvRADDHj+AtlEmaUVdQCJR+1k9jVj6v8X1ujD2y5tVbNeBO4AdNG/yZmC3a5lQpaSfn+gEexAiwk+7qdf+t8Yb+DtX58aophUPBPuD9tPFHsMCNVQTWhaRMvZ1864rYdcq7/IiAxmd0UgBxwIVAJdgUI8VIwvMspK5gqLrhAvwWBz1AoGBAPfhoIXWmz3ey7yrXDa4V7l5lK+7+jrqgvlXTAs9B4JnUVlXjrrUWU/mcQcQgYC0SRZxI+hMKBYTt88JMozIpuE8FnqLVHyNKOCjrh4rs6Z1kW6jfwv6ITVi8ftiegEkO8yk8b6oUZCJqIPf4VrlnwaSi2ZegHtVJWQBTDv+z0kqA4GFAAKBgQDRGYtLgWh7zyRtQainJfCpiaUbzjJuhMgo4fVWZIvXHaSHBU1t5w//S0lDK2hiqkj8KpMWGywVov9eZxZy37V26dEqr/c2m5qZ0E+ynSu7sqUD7kGx/zeIcGT0H+KAVgkGNQCo5Uc0koLRWYHNtYoIvt5R3X6YZylbPftF/8ayWTALBgcqhkjOOAQDBQADLwAwLAIUAKYCp0d6z4QQdyN74JDfQ2WCyi8CFDUM4CaNB+ceVXdKtOrNTQcc0e+t"; + // $classesMd5 = "R7MxKWjKZns6728qXwgRRQ=="; // 2.11.489 - // $key2 = base64_decode("/UIGKU1FVQa+ATM2A0za7G2KI9S/CwPYjgAbc67v7ep42eO/WeTLx1lb1cHwxpsEgF4+PmYpLd2YpGUdX/A2JQitsHzDwgcdBpUf7psX1BU="); - // $data = base64_decode($signature) . base64_decode($classesMd5) . $phone; + // $key2 = base64_decode("/UIGKU1FVQa+ATM2A0za7G2KI9S/CwPYjgAbc67v7ep42eO/WeTLx1lb1cHwxpsEgF4+PmYpLd2YpGUdX/A2JQitsHzDwgcdBpUf7psX1BU="); + // $data = base64_decode($signature) . base64_decode($classesMd5) . $phone; - // $opad = str_repeat(chr(0x5C), 64); - // $ipad = str_repeat(chr(0x36), 64); - // for ($i = 0; $i < 64; $i++) { - // $opad[$i] = $opad[$i] ^ $key2[$i]; - // $ipad[$i] = $ipad[$i] ^ $key2[$i]; - // } + // $opad = str_repeat(chr(0x5C), 64); + // $ipad = str_repeat(chr(0x36), 64); + // for ($i = 0; $i < 64; $i++) { + // $opad[$i] = $opad[$i] ^ $key2[$i]; + // $ipad[$i] = $ipad[$i] ^ $key2[$i]; + // } - // $output = hash("sha1", $opad . hash("sha1", $ipad . $data, true), true); + // $output = hash("sha1", $opad . hash("sha1", $ipad . $data, true), true); - // return base64_encode($output); + // return base64_encode($output); - $token = md5("PdA2DJyKoUrwLw1Bg6EIhzh502dF9noR9uFCllGk1419900749520".$phone); + $token = md5("PdA2DJyKoUrwLw1Bg6EIhzh502dF9noR9uFCllGk1419900749520".$phone); - return $token; + return $token; } diff --git a/src/tokenmap.class.php b/src/tokenmap.class.php index e7796f6c..6218b455 100755 --- a/src/tokenmap.class.php +++ b/src/tokenmap.class.php @@ -1,479 +1,470 @@ = 236 && $token < (236 + count(self::$secondaryStrings))) { + if (!$subdict && $token >= 236 && $token < (236 + count(self::$secondaryStrings))) { $subdict = true; } $tokenMap = array(); @@ -509,7 +500,7 @@ public static function GetToken($token, &$subdict, &$string) return;//fail } $string = $tokenMap[$token]; - if ( ! $string) { + if (!$string) { throw new Exception("Invalid token/length in GetToken"); } } diff --git a/src/vCard.php b/src/vCard.php index 3969c8e6..26f20b02 100755 --- a/src/vCard.php +++ b/src/vCard.php @@ -1,5 +1,4 @@ card; } - } diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index 568744cb..d05b046e 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -357,9 +357,9 @@ public function codeRequest($method = 'sms', $carrier = "T-Mobile5", $countryCod } if($carrier != null) - $mnc = $this->detectMnc(strtolower($countryCode), $carrier); + $mnc = $this->detectMnc(strtolower($countryCode), $carrier); else - $mnc = $phone['mnc']; + $mnc = $phone['mnc']; // Build the token. $token = generateRequestToken($phone['country'], $phone['phone']); @@ -372,14 +372,14 @@ public function codeRequest($method = 'sms', $carrier = "T-Mobile5", $countryCod 'id' => $this->identity, 'lg' => $langCode, 'lc' => $countryCode, - //'mcc' => '000', - //'mnc' => '000', + //'mcc' => '000', + //'mnc' => '000', 'sim_mcc' => $phone['mcc'], 'sim_mnc' => $mnc, 'method' => $method, - //'reason' => "self-send-jailbroken", + //'reason' => "self-send-jailbroken", 'token' => $token, - //'network_radio_type' => "1" + //'network_radio_type' => "1" ); if ($this->debug) { @@ -419,17 +419,17 @@ public function codeRequest($method = 'sms', $carrier = "T-Mobile5", $countryCod throw new Exception("Code already sent. Retry after $minutes minutes."); } else if (isset($response->reason) && $response->reason == "too_many_guesses") { - $this->eventManager()->fire("onCodeRequestFailedTooManyGuesses", - array( - $this->phoneNumber, - $method, - $response->reason, - $response->retry_after - )); - $minutes = round($response->retry_after / 60); - throw new Exception("Too many guesses. Retry after $minutes minutes."); - - } else { + $this->eventManager()->fire("onCodeRequestFailedTooManyGuesses", + array( + $this->phoneNumber, + $method, + $response->reason, + $response->retry_after + )); + $minutes = round($response->retry_after / 60); + throw new Exception("Too many guesses. Retry after $minutes minutes."); + + } else { $this->eventManager()->fire("onCodeRequestFailed", array( $this->phoneNumber, @@ -472,13 +472,13 @@ public function connect() $WAverS = str_replace(".","",$WAver); $ver = str_replace(".","",static::WHATSAPP_VER); - // if($ver<$WAverS) - // { - // $classesMD5 = file_get_contents('https://coderus.openrepos.net/whitesoft/whatsapp_classes'); - // - // updateData('token.php', $WAver, $classesMD5); - // updateData('whatsprot.class.php', $WAver); - // } + // if($ver<$WAverS) + // { + // $classesMD5 = file_get_contents('https://coderus.openrepos.net/whitesoft/whatsapp_classes'); + // + // updateData('token.php', $WAver, $classesMD5); + // updateData('whatsprot.class.php', $WAver); + // } /* Create a TCP/IP socket. */ $socket = socket_create(AF_INET, SOCK_STREAM, SOL_TCP); @@ -615,23 +615,23 @@ public function loginWithPassword($password) */ public function pollMessage($autoReceipt = true, $type = "read") { - if(!$this->isConnected()) { - throw new ConnectionException('Connection Closed!'); - } - - $r = array($this->socket); - $w = array(); - $e = array(); - - if (socket_select($r, $w, $e, static::TIMEOUT_SEC, static::TIMEOUT_USEC)) { - // Something to read - if ($stanza = $this->readStanza()) { - $this->processInboundData($stanza, $autoReceipt, $type); - return true; + if(!$this->isConnected()) { + throw new ConnectionException('Connection Closed!'); + } + + $r = array($this->socket); + $w = array(); + $e = array(); + + if (socket_select($r, $w, $e, static::TIMEOUT_SEC, static::TIMEOUT_USEC)) { + // Something to read + if ($stanza = $this->readStanza()) { + $this->processInboundData($stanza, $autoReceipt, $type); + return true; + } } - } - return false; + return false; } /** @@ -643,7 +643,7 @@ public function sendActiveStatus() $this->sendNode($messageNode); } - /** + /** * Send a request to get cipher keys from an user * * @param $number @@ -754,7 +754,7 @@ public function sendBroadcastLocation($targets, $long, $lat, $name = null, $url */ public function sendBroadcastMessage($targets, $message) { - $message = $this->parseMessageForEmojis($message); + $message = $this->parseMessageForEmojis($message); $bodyNode = new ProtocolNode("body", null, null, $message); $this->sendBroadcast($targets, $bodyNode, "text"); } @@ -794,12 +794,12 @@ public function sendDeleteBroadcastLists($lists) $listNode = array(); if($lists != null && count($lists) > 0) { - for($i = 0; $i < count($lists); $i++) - { - $listNode[$i] = new ProtocolNode("list", array("id" => $lists[$i]), null, null); - } + for($i = 0; $i < count($lists); $i++) + { + $listNode[$i] = new ProtocolNode("list", array("id" => $lists[$i]), null, null); + } }else{ - $listNode = null; + $listNode = null; } $deleteNode = new ProtocolNode("delete", null, $listNode, null); $node = new ProtocolNode("iq", @@ -873,7 +873,7 @@ public function sendGetClientConfig() $this->waitForServer($msgId); } - /** + /** * Transfer your number to new one * * @param string $number @@ -881,22 +881,22 @@ public function sendGetClientConfig() */ public function sendChangeNumber($number, $identity) { - $msgId = $this->createMsgId("change_number"); + $msgId = $this->createMsgId("change_number"); - $usernameNode = new ProtocolNode("username", null, null, $number); - $passwordNode = new ProtocolNode("password", null, null, urldecode($identity)); + $usernameNode = new ProtocolNode("username", null, null, $number); + $passwordNode = new ProtocolNode("password", null, null, urldecode($identity)); - $modifyNode = new ProtocolNode("modify", null, array($usernameNode, $passwordNode), null); + $modifyNode = new ProtocolNode("modify", null, array($usernameNode, $passwordNode), null); - $iqNode = new ProtocolNode("iq", - array( - "xmlns" => "urn:xmpp:whatsapp:account", - "id" => $msgId, - "type" => "get", - "to" => "c.us" - ), array($modifyNode), null); + $iqNode = new ProtocolNode("iq", + array( + "xmlns" => "urn:xmpp:whatsapp:account", + "id" => $msgId, + "type" => "get", + "to" => "c.us" + ), array($modifyNode), null); - $this->sendNode($iqNode); + $this->sendNode($iqNode); } /** @@ -910,7 +910,7 @@ public function sendGetGroups() $this->sendGetGroupsFiltered("participating"); } - /** + /** * Send a request to get new Groups V2 info * * @param $groupID @@ -975,21 +975,21 @@ public function sendGetPrivacyBlockedList() */ public function sendGetPrivacySettings() { - $msgId = $this->createMsgId("get_privacy_settings_"); - $privacyNode = new ProtocolNode("privacy", null, null, null); - $node = new ProtocolNode("iq", - array( - "to" => static::WHATSAPP_SERVER, - "id" => $msgId, - "xmlns" => "privacy", - "type" => "get" - ), array($privacyNode), null); - - $this->sendNode($node); - $this->waitForServer($msgId); + $msgId = $this->createMsgId("get_privacy_settings_"); + $privacyNode = new ProtocolNode("privacy", null, null, null); + $node = new ProtocolNode("iq", + array( + "to" => static::WHATSAPP_SERVER, + "id" => $msgId, + "xmlns" => "privacy", + "type" => "get" + ), array($privacyNode), null); + + $this->sendNode($node); + $this->waitForServer($msgId); } - /** + /** * Set privacy of 'last seen', status or profile picture * to All, contacts or none * @@ -1000,24 +1000,24 @@ public function sendGetPrivacySettings() */ public function sendSetPrivacySettings($category, $value) { - $msgId = $this->createMsgId("send_privacy_settings_"); - $categoryNode = new ProtocolNode("category", - array( - "name" => $category, - "value" => $value - ), null, null); - - $privacyNode = new ProtocolNode("privacy", null, array($categoryNode), null); - $node = new ProtocolNode("iq", - array( - "to" => static::WHATSAPP_SERVER, - "type" => "set", - "id" => $msgId, - "xmlns" => "privacy" - ), array($privacyNode), null); - - $this->sendNode($node); - $this->waitForServer($msgId); + $msgId = $this->createMsgId("send_privacy_settings_"); + $categoryNode = new ProtocolNode("category", + array( + "name" => $category, + "value" => $value + ), null, null); + + $privacyNode = new ProtocolNode("privacy", null, array($categoryNode), null); + $node = new ProtocolNode("iq", + array( + "to" => static::WHATSAPP_SERVER, + "type" => "set", + "id" => $msgId, + "xmlns" => "privacy" + ), array($privacyNode), null); + + $this->sendNode($node); + $this->waitForServer($msgId); } /** @@ -1052,7 +1052,7 @@ public function sendGetProfilePicture($number, $large = false) $this->waitForServer($msgId); } - /** + /** * * @param string array $numbers * Numbers of your contacts @@ -1083,12 +1083,12 @@ public function sendGetProfilePhotoIds($numbers) "id" => $msgId, "xmlns" => "w:profile:picture", "type" => "get" - ), array($listNode), null); + ), array($listNode), null); $this->sendNode($iqNode); } - /** + /** * Request to retrieve the last online time of specific user. * * @param string $to @@ -1112,7 +1112,7 @@ public function sendGetRequestLastSeen($to) $this->waitForServer($msgId); } - /** + /** * Send a request to get the current server properties */ public function sendGetServerProperties() @@ -1126,102 +1126,102 @@ public function sendGetServerProperties() "xmlns" => "w", "to" => "s.whatsapp.net" - ), array($child), null); + ), array($child), null); $this->sendNode($node); } - /** - * Send a request to get the current service pricing - * - * @param string $lg - * Language - * @param string $lc - * Country - */ + /** + * Send a request to get the current service pricing + * + * @param string $lg + * Language + * @param string $lc + * Country + */ public function sendGetServicePricing($lg, $lc) - { + { - $msgId = $this->createMsgId("get_service_pricing_"); - $pricingNode = new ProtocolNode("pricing", + $msgId = $this->createMsgId("get_service_pricing_"); + $pricingNode = new ProtocolNode("pricing", array( - "lg" => $lg, - "lc" => $lc - ), null, null); - $node = new ProtocolNode("iq", + "lg" => $lg, + "lc" => $lc + ), null, null); + $node = new ProtocolNode("iq", array( - "id" => $msgId, - "xmlns" => "urn:xmpp:whatsapp:account", - "type" => "get", - "to" => "s.whatsapp.net" - ), array($pricingNode), null); + "id" => $msgId, + "xmlns" => "urn:xmpp:whatsapp:account", + "type" => "get", + "to" => "s.whatsapp.net" + ), array($pricingNode), null); $this->sendNode($node); } - /** - * Send a request to extend the account - */ + /** + * Send a request to extend the account + */ public function sendExtendAccount() - { + { $msgId = $this->createMsgId("extend_account_"); - $extendingNode = new ProtocolNode("extend", null, null, null); - $node = new ProtocolNode("iq", + $extendingNode = new ProtocolNode("extend", null, null, null); + $node = new ProtocolNode("iq", array( - "id" => $msgId, - "xmlns" => "urn:xmpp:whatsapp:account", - "type" => "set", - "to" => "s.whatsapp.net" - ), array($extendingNode), null); + "id" => $msgId, + "xmlns" => "urn:xmpp:whatsapp:account", + "type" => "set", + "to" => "s.whatsapp.net" + ), array($extendingNode), null); $this->sendNode($node); - } + } /** - * Gets all the broadcast lists for an account - */ + * Gets all the broadcast lists for an account + */ public function sendGetBroadcastLists() - { - $msgId = $this->createMsgId("get_lists_"); - $listsNode = new ProtocolNode("lists", null, null, null); - $node = new ProtocolNode("iq", + { + $msgId = $this->createMsgId("get_lists_"); + $listsNode = new ProtocolNode("lists", null, null, null); + $node = new ProtocolNode("iq", array( - "id" => $msgId, - "xmlns" => "w:b", - "type" => "get", - "to" => "s.whatsapp.net" - ), array($listsNode), null); + "id" => $msgId, + "xmlns" => "w:b", + "type" => "get", + "to" => "s.whatsapp.net" + ), array($listsNode), null); $this->sendNode($node); - } - - /** - * Send a request to get the normalized mobile number respresenting the JID - * - * @param string $countryCode - * Contry Code - * @param string $number - * Mobile Number - */ + } + + /** + * Send a request to get the normalized mobile number respresenting the JID + * + * @param string $countryCode + * Contry Code + * @param string $number + * Mobile Number + */ public function sendGetNormalizedJid($countryCode, $number) - { - $msgId = $this->createMsgId("get_normalized_jid_"); - $ccNode = new ProtocolNode("cc", null, null, $countryCode); - $inNode = new ProtocolNode("in", null, null, $number); - $normalizeNode = new ProtocolNode("normalize", null, array($ccNode, $inNode), null); - $node = new ProtocolNode("iq", + { + $msgId = $this->createMsgId("get_normalized_jid_"); + $ccNode = new ProtocolNode("cc", null, null, $countryCode); + $inNode = new ProtocolNode("in", null, null, $number); + $normalizeNode = new ProtocolNode("normalize", null, array($ccNode, $inNode), null); + $node = new ProtocolNode("iq", array( - "id" => $msgId, - "xmlns" => "urn:xmpp:whatsapp:account", - "type" => "get", - "to" => "s.whatsapp.net" - ), array($normalizeNode), null); + "id" => $msgId, + "xmlns" => "urn:xmpp:whatsapp:account", + "type" => "get", + "to" => "s.whatsapp.net" + ), array($normalizeNode), null); - $this->sendNode($node); - } + $this->sendNode($node); + } - /** + /** * Removes an account from WhatsApp * * @param string $lg @@ -1240,16 +1240,16 @@ public function sendRemoveAccount($lg = null, $lc = null, $feedback = null) $lg = ""; } - if ($lc == null) { - $lc = ""; - } + if ($lc == null) { + $lc = ""; + } - $child = new ProtocolNode("body", - array( - "lg" => $lg, - "lc" => $lc - ), null, $feedback); - $childNode = array($child); + $child = new ProtocolNode("body", + array( + "lg" => $lg, + "lc" => $lc + ), null, $feedback); + $childNode = array($child); } else { $childNode = null; } @@ -1266,7 +1266,7 @@ public function sendRemoveAccount($lg = null, $lc = null, $feedback = null) $this->sendNode($node); } - /** + /** * Send a ping to the server */ public function sendPing() @@ -1281,10 +1281,10 @@ public function sendPing() "to" => "s.whatsapp.net" ), array($pingNode), null); - $this->sendNode($node); + $this->sendNode($node); } - /** + /** * Get voip info. of a number/s * * @param string $jids @@ -1339,64 +1339,64 @@ public function sendGetStatuses($jids) "xmlns" => "status", "id" => $this->createMsgId("getstatus") ), array( - new ProtocolNode("status", null, $children, null) - ), null); + new ProtocolNode("status", null, $children, null) + ), null); $this->sendNode($node); } - /** - * Create a group chat. - * - * @param string $subject - * The group Subject - * @param array $participants - * An array with the participants numbers. - * - * @return string - * The group ID. - */ - public function sendGroupsChatCreate($subject, $participants) - { - if (!is_array($participants)) { - $participants = array($participants); - } - foreach ($participants as $participant) - { - $participantNode[] = new ProtocolNode("participant", array( - "jid" => $this->getJID($participant) - ), null, null); - } - - $id = $this->createMsgId("creategroup"); - - $createNode = new ProtocolNode("create", - array( - "subject" => $subject - ), $participantNode, null); - - $iqNode = new ProtocolNode("iq", - array( - "xmlns" => "w:g2", - "id" => $id, - "type" => "set", - "to" => "g.us" - ), array($createNode), null); - - $this->sendNode($iqNode); - $this->waitForServer($id); - $groupId = $this->groupId; - - $this->eventManager()->fire("onGroupCreate", - array( - $this->phoneNumber, - $groupId - )); - - return $groupId; - } - - /** + /** + * Create a group chat. + * + * @param string $subject + * The group Subject + * @param array $participants + * An array with the participants numbers. + * + * @return string + * The group ID. + */ + public function sendGroupsChatCreate($subject, $participants) + { + if (!is_array($participants)) { + $participants = array($participants); + } + foreach ($participants as $participant) + { + $participantNode[] = new ProtocolNode("participant", array( + "jid" => $this->getJID($participant) + ), null, null); + } + + $id = $this->createMsgId("creategroup"); + + $createNode = new ProtocolNode("create", + array( + "subject" => $subject + ), $participantNode, null); + + $iqNode = new ProtocolNode("iq", + array( + "xmlns" => "w:g2", + "id" => $id, + "type" => "set", + "to" => "g.us" + ), array($createNode), null); + + $this->sendNode($iqNode); + $this->waitForServer($id); + $groupId = $this->groupId; + + $this->eventManager()->fire("onGroupCreate", + array( + $this->phoneNumber, + $groupId + )); + + return $groupId; + } + + /** * Change group subject * * @param string $gjid @@ -1529,11 +1529,11 @@ public function sendGroupsParticipantsRemove($groupId, $participants) */ public function sendPromoteParticipants($gId, $participants) { - $msgId = $this->createMsgId("promote_group_participants_"); - if (!is_array($participants)) { - $participants = array($participants); - } - $this->sendGroupsChangeParticipants($gId, $participants, "promote", $msgId); + $msgId = $this->createMsgId("promote_group_participants_"); + if (!is_array($participants)) { + $participants = array($participants); + } + $this->sendGroupsChangeParticipants($gId, $participants, "promote", $msgId); } /** @@ -1545,14 +1545,14 @@ public function sendPromoteParticipants($gId, $participants) */ public function sendDemoteParticipants($gId, $participants) { - $msgId = $this->createMsgId("demote_group_participants_"); - if (!is_array($participants)) { - $participants = array($participants); - } - $this->sendGroupsChangeParticipants($gId, $participants, "demote", $msgId); + $msgId = $this->createMsgId("demote_group_participants_"); + if (!is_array($participants)) { + $participants = array($participants); + } + $this->sendGroupsChangeParticipants($gId, $participants, "demote", $msgId); } - /** + /** * Lock group: Paritipants cant change group subject or * profile picture except admin * @@ -1560,21 +1560,21 @@ public function sendDemoteParticipants($gId, $participants) */ public function sendLockGroup($gId) { - $msgId = $this->createMsgId("lock_group_"); - $lockedNode = new ProtocolNode("locked", null, null, null); - $node = new ProtocolNode("iq", - array( - "id" => $msgId, - "xmlns" => "w:g2", - "type" => "set", - "to" => $this->getJID($gId) - ), array($lockedNode), null); - - $this->sendNode($node); - $this->waitForServer($msgId); + $msgId = $this->createMsgId("lock_group_"); + $lockedNode = new ProtocolNode("locked", null, null, null); + $node = new ProtocolNode("iq", + array( + "id" => $msgId, + "xmlns" => "w:g2", + "type" => "set", + "to" => $this->getJID($gId) + ), array($lockedNode), null); + + $this->sendNode($node); + $this->waitForServer($msgId); } - /** + /** * Unlock group: Any participant can change * group subject or profile picture * @@ -1583,18 +1583,18 @@ public function sendLockGroup($gId) */ public function sendUnlockGroup($gId) { - $msgId = $this->createMsgId("unlock_group_"); - $unlockedNode = new ProtocolNode("unlocked", null, null, null); - $node = new ProtocolNode("iq", - array( - "id" => $msgId, - "xmlns" => "w:g2", - "type" => "set", - "to" => $this->getJID($gId) - ), array($unlockedNode), null); - - $this->sendNode($node); - $this->waitForServer($msgId); + $msgId = $this->createMsgId("unlock_group_"); + $unlockedNode = new ProtocolNode("unlocked", null, null, null); + $node = new ProtocolNode("iq", + array( + "id" => $msgId, + "xmlns" => "w:g2", + "type" => "set", + "to" => $this->getJID($gId) + ), array($unlockedNode), null); + + $this->sendNode($node); + $this->waitForServer($msgId); } /** @@ -1654,16 +1654,16 @@ public function sendMessageRead($to, $id) */ public function sendMessageAudio($to, $filepath, $storeURLmedia = false, $fsize = 0, $fhash = "") { - if ($fsize==0 || $fhash == "") - { - $allowedExtensions = array('3gp', 'caf', 'wav', 'mp3', 'wma', 'ogg', 'aif', 'aac', 'm4a'); - $size = 10 * 1024 * 1024; // Easy way to set maximum file size for this media type. - return $this->sendCheckAndSendMedia($filepath, $size, $to, 'audio', $allowedExtensions, $storeURLmedia); - - } else { - $this->sendRequestFileUpload($fhash, 'audio', $fsize, $filepath, $to); - return true; - } + if ($fsize==0 || $fhash == "") + { + $allowedExtensions = array('3gp', 'caf', 'wav', 'mp3', 'wma', 'ogg', 'aif', 'aac', 'm4a'); + $size = 10 * 1024 * 1024; // Easy way to set maximum file size for this media type. + return $this->sendCheckAndSendMedia($filepath, $size, $to, 'audio', $allowedExtensions, $storeURLmedia); + + } else { + $this->sendRequestFileUpload($fhash, 'audio', $fsize, $filepath, $to); + return true; + } } /** @@ -1690,16 +1690,16 @@ public function sendMessageComposing($to) */ public function sendMessageImage($to, $filepath, $storeURLmedia = false, $fsize = 0, $fhash = "", $caption = "") { - $caption = $this->parseMessageForEmojis($caption); - if ($fsize==0 || $fhash == "") - { - $allowedExtensions = array('jpg', 'jpeg', 'gif', 'png'); - $size = 5 * 1024 * 1024; // Easy way to set maximum file size for this media type. - return $this->sendCheckAndSendMedia($filepath, $size, $to, 'image', $allowedExtensions, $storeURLmedia, $caption); - } else { + $caption = $this->parseMessageForEmojis($caption); + if ($fsize==0 || $fhash == "") + { + $allowedExtensions = array('jpg', 'jpeg', 'gif', 'png'); + $size = 5 * 1024 * 1024; // Easy way to set maximum file size for this media type. + return $this->sendCheckAndSendMedia($filepath, $size, $to, 'image', $allowedExtensions, $storeURLmedia, $caption); + } else { $this->sendRequestFileUpload($fhash, 'image', $fsize, $filepath, $to, $caption); - return true; - } + return true; + } } /** @@ -1780,18 +1780,18 @@ protected function sendChatState($to, $state) */ public function sendMessageVideo($to, $filepath, $storeURLmedia = false, $fsize = 0, $fhash = "", $caption = "") { - $caption = $this->parseMessageForEmojis($caption); - if ($fsize==0 || $fhash == "") - { - $allowedExtensions = array('3gp', 'mp4', 'mov', 'avi'); - $size = 20 * 1024 * 1024; // Easy way to set maximum file size for this media type. - return $this->sendCheckAndSendMedia($filepath, $size, $to, 'video', $allowedExtensions, $storeURLmedia, $caption); - } - else - { - $this->sendRequestFileUpload($fhash, 'video', $fsize, $filepath, $to, $caption); - return true; - } + $caption = $this->parseMessageForEmojis($caption); + if ($fsize==0 || $fhash == "") + { + $allowedExtensions = array('3gp', 'mp4', 'mov', 'avi'); + $size = 20 * 1024 * 1024; // Easy way to set maximum file size for this media type. + return $this->sendCheckAndSendMedia($filepath, $size, $to, 'video', $allowedExtensions, $storeURLmedia, $caption); + } + else + { + $this->sendRequestFileUpload($fhash, 'video', $fsize, $filepath, $to, $caption); + return true; + } } /** @@ -1889,18 +1889,18 @@ public function sendPresenceSubscription($to) } /** - * Unsubscribe, will stop subscription - * - * @param string $to - * Phone number. - */ + * Unsubscribe, will stop subscription + * + * @param string $to + * Phone number. + */ public function sendPresenceUnsubscription($to) { - $node = new ProtocolNode("presence", array("type" => "unsubscribe", "to" => $this->getJID($to)), null, ""); - $this->sendNode($node); + $node = new ProtocolNode("presence", array("type" => "unsubscribe", "to" => $this->getJID($to)), null, ""); + $this->sendNode($node); } - /** + /** * Set the picture for the group * * @param string $gjid The groupID @@ -1948,7 +1948,7 @@ public function sendSetPrivacyBlockedList($blockedJids = array()) $this->sendNode($node); } - /** + /** * Set your profile picture * * @param string $path URL/URI of image @@ -1958,21 +1958,21 @@ public function sendSetProfilePicture($path) $this->sendSetPicture($this->phoneNumber, $path); } - /* + /* * Removes the profile photo */ public function sendRemoveProfilePicture() { $msgId = $this->createMsgId("setphoto"); - $picture = new ProtocolNode("picture", null, null, null); + $picture = new ProtocolNode("picture", null, null, null); - $thumb = new ProtocolNode("picture", + $thumb = new ProtocolNode("picture", array( "type" => "preview" ), null, null); - $node = new ProtocolNode("iq", + $node = new ProtocolNode("iq", array( "id" => $msgId, "to" => $this->getJID($this->phoneNumber), @@ -1980,10 +1980,10 @@ public function sendRemoveProfilePicture() "xmlns" => "w:profile:picture" ), array($picture, $thumb), null); - $this->sendNode($node); + $this->sendNode($node); } - /** + /** * Set the recovery token for your account to allow you to * retrieve your password at a later stage. * @param string $token A user generated token. @@ -2055,7 +2055,7 @@ public function sendVcard($to, $name, $vCard) $this->sendMessageNode($to, $mediaNode); } - /** + /** * Send a vCard to the user/group as Broadcast. * * @param $targets @@ -2080,7 +2080,7 @@ public function sendBroadcastVcard($targets, $name, $vCard) $this->sendBroadcast($targets, $mediaNode, "media"); } - /** + /** * Sets the bind of the new message. * @param $bind */ @@ -2089,7 +2089,7 @@ public function setNewMessageBind($bind) $this->newMsgBind = $bind; } - /** + /** * Upload file to WhatsApp servers. * * @param $file @@ -2408,20 +2408,20 @@ protected function doLogin() } if(strcmp($this->loginStatus, static::DISCONNECTED_STATUS) == 0) - { - throw new Exception('Login Failure'); - } - else + { + throw new Exception('Login Failure'); + } + else { $this->eventManager()->fire("onLogin", array( $this->phoneNumber )); $this->sendAvailableForChat(); - } + } } - /** + /** * Have we an active connection with WhatsAPP AND a valid login already? * @return bool */ @@ -2450,34 +2450,34 @@ protected function isLoggedIn(){ protected function buildIdentity($identity) { if (file_exists($identity.".dat")) - { + { return urldecode(file_get_contents($identity.'.dat')); - } - else - { - $id = fopen($identity.".dat", "w"); + } + else + { + $id = fopen($identity.".dat", "w"); $bytes = strtolower(openssl_random_pseudo_bytes(20)); fwrite($id, urlencode($bytes)); - fclose($id); + fclose($id); - return $bytes; - } + return $bytes; + } } protected function checkIdentity($identity) { - if (file_exists($identity.".dat")) - { - $id = strlen(urldecode(file_get_contents($identity.'.dat'))); - if (($id == 20) || ($id == 16)) - { - return true; - } - } - else - { - return false; - } + if (file_exists($identity.".dat")) + { + $id = strlen(urldecode(file_get_contents($identity.'.dat'))); + if (($id == 20) || ($id == 16)) + { + return true; + } + } + else + { + return false; + } } public function sendSync(array $numbers, array $deletedNumbers = null, $syncType = 4, $index = 0, $last = true) @@ -2548,14 +2548,14 @@ public function sendSync(array $numbers, array $deletedNumbers = null, $syncType "xmlns" => "urn:xmpp:whatsapp:sync", "type" => "get" ), array( - new ProtocolNode("sync", - array( - "mode" => $mode, - "context" => $context, - "sid" => "".((time() + 11644477200) * 10000000), - "index" => "".$index, - "last" => $last ? "true" : "false" - ), $users, null) + new ProtocolNode("sync", + array( + "mode" => $mode, + "context" => $context, + "sid" => "".((time() + 11644477200) * 10000000), + "index" => "".$index, + "last" => $last ? "true" : "false" + ), $users, null) ), null); $this->sendNode($node); @@ -2569,7 +2569,7 @@ public function setMessageStore(MessageStoreInterface $messageStore) $this->messageStore = $messageStore; } - /** + /** * Process number/jid and turn it into a JID if necessary * * @param string $number @@ -2747,34 +2747,34 @@ protected function processInboundDataNode(ProtocolNode $node, $autoReceipt = tru $this->processChallenge($node); } elseif ($node->getTag() == "failure" ) - { + { $this->loginStatus = static::DISCONNECTED_STATUS; } elseif ($node->getTag() == "success") { - if ($node->getAttribute("status") == "active") { + if ($node->getAttribute("status") == "active") { $this->loginStatus = static::CONNECTED_STATUS; - $challengeData = $node->getData(); - file_put_contents($this->challengeFilename, $challengeData); - $this->writer->setKey($this->outputKey); - } elseif ($node->getAttribute("status") == "expired") - { - $this->eventManager()->fire("onAccountExpired", - array( - $this->phoneNumber, - $node->getAttribute("kind"), - $node->getAttribute("status"), - $node->getAttribute("creation"), - $node->getAttribute("expiration") - )); - } + $challengeData = $node->getData(); + file_put_contents($this->challengeFilename, $challengeData); + $this->writer->setKey($this->outputKey); + } elseif ($node->getAttribute("status") == "expired") + { + $this->eventManager()->fire("onAccountExpired", + array( + $this->phoneNumber, + $node->getAttribute("kind"), + $node->getAttribute("status"), + $node->getAttribute("creation"), + $node->getAttribute("expiration") + )); + } } elseif($node->getTag() == "failure") - { - $this->eventManager()->fire("onLoginFailed", - array( - $this->phoneNumber, - $node->getChild(0)->getTag() - )); + { + $this->eventManager()->fire("onLoginFailed", + array( + $this->phoneNumber, + $node->getChild(0)->getTag() + )); } elseif($node->getTag() == 'ack' && $node->getAttribute("class") == "message") { @@ -2846,9 +2846,9 @@ protected function processInboundDataNode(ProtocolNode $node, $autoReceipt = tru $node->getChild("body")->getData() )); - if ($this->messageStore !== null) { - $this->messageStore->saveMessage($node->getAttribute('from'), $this->phoneNumber, $node->getChild("body")->getData(), $node->getAttribute('id'), $node->getAttribute('t')); - } + if ($this->messageStore !== null) { + $this->messageStore->saveMessage($node->getAttribute('from'), $this->phoneNumber, $node->getChild("body")->getData(), $node->getAttribute('id'), $node->getAttribute('t')); + } } else { @@ -2872,7 +2872,7 @@ protected function processInboundDataNode(ProtocolNode $node, $autoReceipt = tru } } if ($node->getAttribute("type") == "text" && $node->getChild(0)->getTag() == 'enc') { - // TODO + // TODO if($autoReceipt) { $this->sendMessageReceived($node, $type); @@ -3056,7 +3056,7 @@ protected function processInboundDataNode(ProtocolNode $node, $autoReceipt = tru } $this->sendClearDirty($categories); } - if (strcmp($node->getTag(), "presence") == 0 + if (strcmp($node->getTag(), "presence") == 0 && strncmp($node->getAttribute('from'), $this->phoneNumber, strlen($this->phoneNumber)) != 0 && strpos($node->getAttribute('from'), "-") == false) { $presence = array(); @@ -3275,45 +3275,45 @@ protected function processInboundDataNode(ProtocolNode $node, $autoReceipt = tru $groupList = array(); $groupChild = $node->getChild(0); if ($groupChild != null) { - $creator = $groupChild->getAttribute('creator'); - $creation = $groupChild->getAttribute('creation'); - $subject = $groupChild->getAttribute('subject'); - if ($groupChild->getChild(0) != null) { - foreach ($groupChild->getChildren() as $child) { - $participants[] = $child->getAttribute('jid'); - if($child->getAttribute('type') != null) - $admin = $child->getAttribute('jid'); - } - } - } - - $this->eventManager()->fire("onGetGroupV2Info", - array( - $this->phoneNumber, - $creator, - $creation, - $subject, - $participants, - $admin - )); + $creator = $groupChild->getAttribute('creator'); + $creation = $groupChild->getAttribute('creation'); + $subject = $groupChild->getAttribute('subject'); + if ($groupChild->getChild(0) != null) { + foreach ($groupChild->getChildren() as $child) { + $participants[] = $child->getAttribute('jid'); + if($child->getAttribute('type') != null) + $admin = $child->getAttribute('jid'); + } + } + } + + $this->eventManager()->fire("onGetGroupV2Info", + array( + $this->phoneNumber, + $creator, + $creation, + $subject, + $participants, + $admin + )); } if ($node->nodeIdContains("get_lists")) { $broadcastLists = array(); if ($node->getChild(0) != null) { $childArray = $node->getChildren(); foreach ($childArray as $list) { - if($list->getChildren() != null) { - foreach ( $list->getChildren() as $sublist) { - $id = $sublist->getAttribute("id"); - $name = $sublist->getAttribute("name"); - $broadcastLists[$id]['name'] = $name; - $recipients = array(); - foreach ($sublist->getChildren() as $recipient) { - array_push($recipients, $recipient->getAttribute('jid')); + if($list->getChildren() != null) { + foreach ( $list->getChildren() as $sublist) { + $id = $sublist->getAttribute("id"); + $name = $sublist->getAttribute("name"); + $broadcastLists[$id]['name'] = $name; + $recipients = array(); + foreach ($sublist->getChildren() as $recipient) { + array_push($recipients, $recipient->getAttribute('jid')); + } + $broadcastLists[$id]['recipients'] = $recipients; } - $broadcastLists[$id]['recipients'] = $recipients; } - } } } $this->eventManager()->fire("onGetBroadcastLists", @@ -3386,7 +3386,7 @@ protected function processInboundDataNode(ProtocolNode $node, $autoReceipt = tru $ackNode = new ProtocolNode("ack", array( "url" => $node->getChild(0)->getAttribute('url') - ), null, null); + ), null, null); $iqNode = new ProtocolNode("iq", array( @@ -3460,33 +3460,33 @@ protected function processInboundDataNode(ProtocolNode $node, $autoReceipt = tru case "encrypt": $value = $node->getChild(0)->getAttribute('value'); if (is_numeric($value)) { - $this->eventManager()->fire("onGetKeysLeft", - array( - $this->phoneNumber, - $node->getChild(0)->getAttribute('value') - )); + $this->eventManager()->fire("onGetKeysLeft", + array( + $this->phoneNumber, + $node->getChild(0)->getAttribute('value') + )); } else { - echo "Corrupt Stream: value " . $value . "is not numeric"; + echo "Corrupt Stream: value " . $value . "is not numeric"; } break; case "w:gp2": if ($node->hasChild('remove')) { - if ($node->getChild(0)->hasChild('participant')) - $this->eventManager()->fire("onGroupsParticipantsRemove", - array( - $this->phoneNumber, - $node->getAttribute('from'), - $node->getChild(0)->getChild(0)->getAttribute('jid') - )); - } else if ($node->hasChild('add')) { + if ($node->getChild(0)->hasChild('participant')) + $this->eventManager()->fire("onGroupsParticipantsRemove", + array( + $this->phoneNumber, + $node->getAttribute('from'), + $node->getChild(0)->getChild(0)->getAttribute('jid') + )); + } else if ($node->hasChild('add')) { $this->eventManager()->fire("onGroupsParticipantsAdd", array( $this->phoneNumber, $node->getAttribute('from'), $node->getChild(0)->getChild(0)->getAttribute('jid') )); - } + } else if ($node->hasChild('create')) { $groupMembers = array(); foreach ($node->getChild(0)->getChild(0)->getChildren() AS $cn) { @@ -3502,7 +3502,7 @@ protected function processInboundDataNode(ProtocolNode $node, $autoReceipt = tru $node->getChild(0)->getChild(0)->getAttribute('creation'), $groupMembers )); - } + } else if ($node->hasChild('subject')) { $this->eventManager()->fire("onGetGroupsSubject", array( @@ -3517,29 +3517,29 @@ protected function processInboundDataNode(ProtocolNode $node, $autoReceipt = tru break; case "account": if (($node->getChild(0)->getAttribute('author')) == "") - $author = "Paypal"; + $author = "Paypal"; else - $author = $node->getChild(0)->getAttribute('author'); - $this->eventManager()->fire("onPaidAccount", - array( - $this->phoneNumber, - $author, - $node->getChild(0)->getChild(0)->getAttribute('kind'), - $node->getChild(0)->getChild(0)->getAttribute('status'), - $node->getChild(0)->getChild(0)->getAttribute('creation'), - $node->getChild(0)->getChild(0)->getAttribute('expiration') - )); + $author = $node->getChild(0)->getAttribute('author'); + $this->eventManager()->fire("onPaidAccount", + array( + $this->phoneNumber, + $author, + $node->getChild(0)->getChild(0)->getAttribute('kind'), + $node->getChild(0)->getChild(0)->getAttribute('status'), + $node->getChild(0)->getChild(0)->getAttribute('creation'), + $node->getChild(0)->getChild(0)->getAttribute('expiration') + )); break; case "features": if($node->getChild(0)->getChild(0) == "encrypt") { - $this->eventManager()->fire("onGetFeature", - array( - $this->phoneNumber, - $node->getAttribute('from'), - $node->getChild(0)->getChild(0)->getAttribute('value'), + $this->eventManager()->fire("onGetFeature", + array( + $this->phoneNumber, + $node->getAttribute('from'), + $node->getChild(0)->getChild(0)->getAttribute('value'), )); - } + } break; default: throw new Exception("Method $type not implemented"); @@ -3653,7 +3653,7 @@ protected function processProfilePicture($node) } } - /** + /** * If the media file was originally from a URL, this function either deletes it * or renames it depending on the user option. * @@ -3752,15 +3752,15 @@ protected function processUploadResponse($node) $icon = ""; switch ($filetype) { case "image": - $caption = $this->mediaQueue[$id]['caption']; + $caption = $this->mediaQueue[$id]['caption']; $icon = createIcon($filepath); break; case "video": - $caption = $this->mediaQueue[$id]['caption']; + $caption = $this->mediaQueue[$id]['caption']; $icon = createVideoIcon($filepath); break; default: - $caption = ''; + $caption = ''; $icon = ''; break; } @@ -3943,10 +3943,8 @@ protected function sendData($data) { if (socket_write($this->socket, $data, strlen($data)) === false) { - $this->disconnect(); throw new ConnectionException('Connection Closed!'); - } } } From a010b5734e63d627e92848a77b16c8ccf4228abe Mon Sep 17 00:00:00 2001 From: ducch Date: Sat, 21 Feb 2015 18:20:10 +0200 Subject: [PATCH 221/436] apply PSR-1/PSR-2 standards to events/ --- src/events/AllEvents.php | 4 ---- src/events/MyEvents.php | 2 -- src/events/WhatsApiEventsManager.php | 4 +--- 3 files changed, 1 insertion(+), 9 deletions(-) diff --git a/src/events/AllEvents.php b/src/events/AllEvents.php index 0a73cd43..fea7fdcb 100644 --- a/src/events/AllEvents.php +++ b/src/events/AllEvents.php @@ -1,8 +1,6 @@ Booo!, Phone number $mynumber is disconnected!

"; } - } diff --git a/src/events/WhatsApiEventsManager.php b/src/events/WhatsApiEventsManager.php index e9d72d63..2fda0765 100644 --- a/src/events/WhatsApiEventsManager.php +++ b/src/events/WhatsApiEventsManager.php @@ -1,8 +1,6 @@ Date: Sat, 21 Feb 2015 18:30:04 +0200 Subject: [PATCH 222/436] apply PSR-1/PSR-2 standards to tests/ --- tests/WhatAppEventTest.php | 87 ++++++++++++-------------- tests/WhatsAppEventListenerCapture.php | 6 +- tests/whatsapp.php | 7 ++- 3 files changed, 48 insertions(+), 52 deletions(-) diff --git a/tests/WhatAppEventTest.php b/tests/WhatAppEventTest.php index e5ca3689..c65367ba 100755 --- a/tests/WhatAppEventTest.php +++ b/tests/WhatAppEventTest.php @@ -1,4 +1,3 @@ -#!/usr/bin/php eventManager()->fire('onGetMessage', array( +$w->eventManager()->fire('onGetMessage', array( '$username', '441234123456', '1234567890-123', @@ -169,16 +168,15 @@ function oldFunction2( // Analyze the results: $actual = $listener->getAndResetCapture(); -if( $expected === $actual +if ($expected === $actual && $old_expected === $old_function1_called && $old_expected === $old_function2_called ) { - print( "Test 2 Passed.\n"); + print("Test 2 Passed.\n"); } else { - print( "Test 2 Failed!!!!!\n" ); + print("Test 2 Failed!!!!!\n" ); } $old_function1_called = array(); $old_function2_called = array(); - print( "Test #3: onGetGroupMessage\n" ); /* @@ -214,9 +212,9 @@ function oldFunction2( // 1 = This is the current time. 2 => '441234123456-1234567890@g.us' ) - ), + ), // Second event raised: - array( + array( // Event name: 'onGetGroupMessage', // Event Arguments: @@ -234,11 +232,8 @@ function oldFunction2( ); unset($actual[0][1][1]); // Remove the time. -if( $expected === $actual ) { - print( "Test 3 Passed.\n"); +if ($expected === $actual) { + print("Test 3 Passed.\n"); } else { - print( "Test 3 Failed!!!!!\n" ); + print("Test 3 Failed!!!!!\n" ); } - - -?> \ No newline at end of file diff --git a/tests/WhatsAppEventListenerCapture.php b/tests/WhatsAppEventListenerCapture.php index 6ff96241..f6312064 100755 --- a/tests/WhatsAppEventListenerCapture.php +++ b/tests/WhatsAppEventListenerCapture.php @@ -2,16 +2,16 @@ require_once '../src/events/WhatsAppEventListenerProxy.php'; /** - * Records all calls to the WhatsAppEventListener so they can be analyzed + * Records all calls to the WhatsAppEventListener so they can be analyzed * and asserted by the testing framework. */ class WhatsAppEventListenerCapture extends WhatsAppEventListenerProxy { private $capture = array(); - + protected function handleEvent($eventName, array $arguments) { array_push($this->capture, array($eventName,$arguments)); } - + public function getAndResetCapture() { $ret = $this->capture; $this->capture = array(); diff --git a/tests/whatsapp.php b/tests/whatsapp.php index 23197d11..37215c42 100755 --- a/tests/whatsapp.php +++ b/tests/whatsapp.php @@ -1,4 +1,3 @@ -#!/usr/bin/php pollMessage(); $data = $wa->getMessages(); - if(!empty($data)) print_r($data); + if (!empty($data)) { + print_r($data); + } sleep(1); } exit(0); @@ -103,4 +104,4 @@ function fgets_u($pStdn) echo "\n[] Send message to $dst: $msg\n"; $wa->sendMessage($dst , $msg); -echo "\n"; \ No newline at end of file +echo "\n"; From 22299ea284da84069f0f7e0f90ec55e9afa1991d Mon Sep 17 00:00:00 2001 From: ducch Date: Sat, 21 Feb 2015 18:33:32 +0200 Subject: [PATCH 223/436] apply PSR-1/PSR-2 standards to examples/ --- examples/Simple CLI client.php | 64 +- examples/contactsync.php | 6 +- examples/exampleFunctional.php | 19 +- examples/exampleRegister.php | 3 - examples/registerTool.php | 29 +- examples/whatsapp.php | 1742 ++++++++++++++++---------------- 6 files changed, 924 insertions(+), 939 deletions(-) diff --git a/examples/Simple CLI client.php b/examples/Simple CLI client.php index e3b18df0..04f4b6ea 100755 --- a/examples/Simple CLI client.php +++ b/examples/Simple CLI client.php @@ -16,11 +16,11 @@ ////////////////CONFIGURATION/////////////////////// //////////////////////////////////////////////////// -$username = ""; +$username = ""; $password = ""; -$identity = ""; -$nickname = ""; -$debug = false; +$identity = ""; +$nickname = ""; +$debug = false; ///////////////////////////////////////////////////// if ($_SERVER['argv'][1] == null) { echo "USO: php ".$_SERVER['argv'][0]." \n\nEj: php cliente.php 34123456789\n\n"; @@ -43,11 +43,11 @@ function fgets_u($pStdn) function onPresenceReceived($username, $from, $type) { - $dFrom = str_replace(array("@s.whatsapp.net","@g.us"), "", $from); - if($type == "available") - echo "<$dFrom is online>\n\n"; - else - echo "<$dFrom is offline>\n\n"; + $dFrom = str_replace(array("@s.whatsapp.net","@g.us"), "", $from); + if($type == "available") + echo "<$dFrom is online>\n\n"; + else + echo "<$dFrom is offline>\n\n"; } echo "[] logging in as '$nickname' ($username)\n"; @@ -68,34 +68,34 @@ function onPresenceReceived($username, $from, $type) $pn = new ProcessNode($w, $target); $w->setNewMessageBind($pn); - while (1) { +while (1) { $w->pollMessage(); $msgs = $w->getMessages(); foreach ($msgs as $m) { # process inbound messages //print($m->NodeString("") . "\n"); } - $line = fgets_u(STDIN); - if ($line != "") { - if (strrchr($line, " ")) { - $command = trim(strstr($line, ' ', TRUE)); - } else { - $command = $line; - } - switch ($command) { - case "/query": - $dst = trim(strstr($line, ' ', FALSE)); - echo "[] Interactive conversation with $contact:\n"; - break; - case "/lastseen": - echo "[] Last seen $target: "; - $w->sendGetRequestLastSeen($target); - break; - default: - $w->sendMessage($target , $line); - break; - } + $line = fgets_u(STDIN); + if ($line != "") { + if (strrchr($line, " ")) { + $command = trim(strstr($line, ' ', TRUE)); + } else { + $command = $line; } + switch ($command) { + case "/query": + $dst = trim(strstr($line, ' ', FALSE)); + echo "[] Interactive conversation with $contact:\n"; + break; + case "/lastseen": + echo "[] Last seen $target: "; + $w->sendGetRequestLastSeen($target); + break; + default: + $w->sendMessage($target , $line); + break; + } + } } class ProcessNode @@ -115,7 +115,7 @@ public function process($node) $text = $text->getData(); $notify = $node->getAttribute("notify"); - echo "\n- ".$notify.": ".$text." ".date('H:i')."\n"; + echo "\n- ".$notify.": ".$text." ".date('H:i')."\n"; - } + } } diff --git a/examples/contactsync.php b/examples/contactsync.php index de873eda..3b840c86 100755 --- a/examples/contactsync.php +++ b/examples/contactsync.php @@ -9,6 +9,7 @@ if ( ! is_array($u)) { $u = array($u); } + $numbers = array(); foreach ($u as $number) { if (substr($number, 0, 1) != "+") { @@ -30,10 +31,9 @@ function onSyncResult($result) foreach ($result->nonExisting as $number) { echo "$number does not exist
"; } - die();//to break out of the while(true) loop + die(); //to break out of the while(true) loop } - $wa = new WhatsProt($username, "", "WhatsApp", false); //bind event handler @@ -48,4 +48,4 @@ function onSyncResult($result) //wait for response while (true) { $wa->pollMessage(); -} \ No newline at end of file +} diff --git a/examples/exampleFunctional.php b/examples/exampleFunctional.php index ca57caf4..bddac582 100755 --- a/examples/exampleFunctional.php +++ b/examples/exampleFunctional.php @@ -4,7 +4,6 @@ //Change to your time zone date_default_timezone_set('Europe/Madrid'); - // phone number, deviceIdentity, and name. $options = getopt("d::", array("debug::")); $debug = (array_key_exists("debug", $options) || array_key_exists("d", $options)) ? true : false; @@ -54,11 +53,11 @@ function onGetProfilePicture($from, $target, $type, $data) function onPresenceReceived($username, $from, $type) { - $dFrom = str_replace(array("@s.whatsapp.net","@g.us"), "", $from); - if($type == "available") - echo "<$dFrom is online>\n\n"; - else - echo "<$dFrom is offline>\n\n"; + $dFrom = str_replace(array("@s.whatsapp.net","@g.us"), "", $from); + if ($type == "available") + echo "<$dFrom is online>\n\n"; + else + echo "<$dFrom is offline>\n\n"; } echo "[] Logging in as '$nickname' ($username)\n"; @@ -96,8 +95,6 @@ function onPresenceReceived($username, $from, $type) //send Location //$w->sendLocation($target, '4.948568', '52.352957'); - - // Implemented out queue messages and auto msgid $w->sendMessage($target, "Guess the number :)"); $w->sendMessage($target, "Sent from WhatsApi at " . date('H:i')); @@ -173,14 +170,14 @@ public function process($node) $this->wp->sendMessage($this->target, "Congratulations you guessed the right number!"); } elseif (ctype_digit($text)) { - if( (int)$text != "5") - $this->wp->sendMessage($this->target, "I'm sorry, try again!"); + if ((int)$text != "5") + $this->wp->sendMessage($this->target, "I'm sorry, try again!"); } $text = $node->getChild('body'); $text = $text->getData(); $notify = $node->getAttribute("notify"); - echo "\n- ".$notify.": ".$text." ".date('H:i')."\n"; + echo "\n- ".$notify.": ".$text." ".date('H:i')."\n"; } } diff --git a/examples/exampleRegister.php b/examples/exampleRegister.php index eff2ad91..4ba5c6ba 100755 --- a/examples/exampleRegister.php +++ b/examples/exampleRegister.php @@ -8,7 +8,6 @@ * */ - require_once('../src/whatsprot.class.php'); /** @@ -20,7 +19,6 @@ $identity = 'myIdentity'; // Name of the file where the identity will be stored. In this exaple, a file called myIdentity.dat will be created $nickname = 'John Doe'; // This is the username displayed by WhatsApp clients. - // Create a instance of WhastPort. $w = new WhatsProt($username, $identity, $nickname, $debug); @@ -47,7 +45,6 @@ */ $w->codeRequest('sms'); - // You must wait until you receive a code from WhatsApp, either to your phone via sms // or phonecall depending on what you selected above. diff --git a/examples/registerTool.php b/examples/registerTool.php index 7747b073..a076932d 100644 --- a/examples/registerTool.php +++ b/examples/registerTool.php @@ -1,5 +1,4 @@ codeRequest(trim($option), $carrier); -} -catch(Exception $e) -{ - echo $e->getMessage(); - exit(0); +try { + $w->codeRequest(trim($option), $carrier); +} catch(Exception $e) { + echo $e->getMessage(); + exit(0); } echo "\n\nEnter the received code: "; $code = fgets(STDIN); -try -{ - $result = $w->codeRegister(trim($code)); - echo "\nYour password is: ".$result->pw."\n"; -} -catch(Exception $e) -{ - echo $e->getMessage(); - exit(0); +try { + $result = $w->codeRegister(trim($code)); + echo "\nYour password is: ".$result->pw."\n"; +} catch(Exception $e) { + echo $e->getMessage(); + exit(0); } diff --git a/examples/whatsapp.php b/examples/whatsapp.php index 18210521..a04607bf 100755 --- a/examples/whatsapp.php +++ b/examples/whatsapp.php @@ -730,69 +730,69 @@ public function showWebLoginForm($error = null) ?> - - - Personal Whatsapp Login - - - - - - - - + + + Personal Whatsapp Login + + + + + + + + - + - -
-
"; - } - ?> - - - -
- -
- + +
+
"; + } + ?> + + + +
+
- + + + - - - Personal Whatsapp - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + +
+

Whatsapp! Messenger

+
+ +
+
+
+
+ +
+
+ + +
+
+
+
+ +
+
+ + -
-
-
-
- -
-
- - -
-
-
-
- -
-
- - -
-
-
-
- -
-
- - -
-
-
-
- -
-
- -
-
-
-
- -
- -
-
- - -
-
-
-
- -
-
- - -
-
-
-
- -
-
- - -
-
-
-
- -
-
- - -
- - - - -
-
- -
-
-
-
-
-
-
- - -
-
-
- -
- + ?> + +
+
+
+
+ +
+
+ + +
+
+
+
+ +
+
+ +
+
+
+
+ +
+ +
+
+ + +
+
+
+
+ +
+
+ + +
+
+
+
+ +
+
+ + +
+
+
+
+ +
+
+ + +
+ + + + +
+
+ +
+
+
+
+
+
+
+ + +
+
+ + + + Date: Sat, 21 Feb 2015 18:44:01 +0200 Subject: [PATCH 224/436] apply PSR-1/PSR-2 standards --- src/whatsprot.class.php | 196 +++++++++++++++------------------------- 1 file changed, 72 insertions(+), 124 deletions(-) diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index d05b046e..43a197d3 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -356,10 +356,11 @@ public function codeRequest($method = 'sms', $carrier = "T-Mobile5", $countryCod $langCode = 'en'; } - if($carrier != null) + if ($carrier != null) { $mnc = $this->detectMnc(strtolower($countryCode), $carrier); - else + } else { $mnc = $phone['mnc']; + } // Build the token. $token = generateRequestToken($phone['country'], $phone['phone']); @@ -522,7 +523,7 @@ public function connect() */ public function isConnected() { - if($this->socket === null) { + if ($this->socket === null) { return false; } return true; @@ -600,10 +601,11 @@ public function login() public function loginWithPassword($password) { $this->password = $password; - if(is_readable($this->challengeFilename)) { + if (is_readable($this->challengeFilename)) { $challengeData = file_get_contents($this->challengeFilename); - if($challengeData) + if ($challengeData) { $this->challengeData = $challengeData; + } } $this->doLogin(); } @@ -615,7 +617,7 @@ public function loginWithPassword($password) */ public function pollMessage($autoReceipt = true, $type = "read") { - if(!$this->isConnected()) { + if (!$this->isConnected()) { throw new ConnectionException('Connection Closed!'); } @@ -792,13 +794,11 @@ public function sendDeleteBroadcastLists($lists) { $msgId = $this->createMsgId("delete_list_"); $listNode = array(); - if($lists != null && count($lists) > 0) - { - for($i = 0; $i < count($lists); $i++) - { + if ($lists != null && count($lists) > 0) { + for ($i = 0; $i < count($lists); $i++) { $listNode[$i] = new ProtocolNode("list", array("id" => $lists[$i]), null, null); } - }else{ + } else { $listNode = null; } $deleteNode = new ProtocolNode("delete", null, $listNode, null); @@ -1059,17 +1059,14 @@ public function sendGetProfilePicture($number, $large = false) */ public function sendGetProfilePhotoIds($numbers) { - - if (!is_array($numbers)) - { + if (!is_array($numbers)) { $numbers = array($numbers); } $msgId = $this->createMsgId("get_picture_ids"); $i = 0; - for($i; $i $this->getJID($numbers[$i]) @@ -2407,12 +2404,9 @@ protected function doLogin() $this->pollMessage(); } - if(strcmp($this->loginStatus, static::DISCONNECTED_STATUS) == 0) - { + if (strcmp($this->loginStatus, static::DISCONNECTED_STATUS) == 0) { throw new Exception('Login Failure'); - } - else - { + } else { $this->eventManager()->fire("onLogin", array( $this->phoneNumber @@ -2449,12 +2443,9 @@ protected function isLoggedIn(){ */ protected function buildIdentity($identity) { - if (file_exists($identity.".dat")) - { + if (file_exists($identity.".dat")) { return urldecode(file_get_contents($identity.'.dat')); - } - else - { + } else { $id = fopen($identity.".dat", "w"); $bytes = strtolower(openssl_random_pseudo_bytes(20)); fwrite($id, urlencode($bytes)); @@ -2466,16 +2457,12 @@ protected function buildIdentity($identity) protected function checkIdentity($identity) { - if (file_exists($identity.".dat")) - { + if (file_exists($identity.".dat")) { $id = strlen(urldecode(file_get_contents($identity.'.dat'))); - if (($id == 20) || ($id == 16)) - { + if (($id == 20) || ($id == 16)) { return true; } - } - else - { + } else { return false; } } @@ -2592,8 +2579,6 @@ protected function getJID($number) return $number; } - - /** * Retrieves media file and info from either a URL or localpath * @@ -2726,7 +2711,7 @@ protected function processChallenge($node) protected function processInboundData($data, $autoReceipt = true, $type = "read") { $node = $this->reader->nextTree($data); - if ( $node != null ) { + if ($node != null) { $this->processInboundDataNode($node, $autoReceipt, $type); } } @@ -2745,20 +2730,15 @@ protected function processInboundDataNode(ProtocolNode $node, $autoReceipt = tru if ($node->getTag() == "challenge") { $this->processChallenge($node); - } - elseif ($node->getTag() == "failure" ) - { + } elseif ($node->getTag() == "failure") { $this->loginStatus = static::DISCONNECTED_STATUS; - } - - elseif ($node->getTag() == "success") { + } elseif ($node->getTag() == "success") { if ($node->getAttribute("status") == "active") { $this->loginStatus = static::CONNECTED_STATUS; $challengeData = $node->getData(); file_put_contents($this->challengeFilename, $challengeData); $this->writer->setKey($this->outputKey); - } elseif ($node->getAttribute("status") == "expired") - { + } elseif ($node->getAttribute("status") == "expired") { $this->eventManager()->fire("onAccountExpired", array( $this->phoneNumber, @@ -2768,16 +2748,13 @@ protected function processInboundDataNode(ProtocolNode $node, $autoReceipt = tru $node->getAttribute("expiration") )); } - } elseif($node->getTag() == "failure") - { + } elseif ($node->getTag() == "failure") { $this->eventManager()->fire("onLoginFailed", array( $this->phoneNumber, $node->getChild(0)->getTag() )); - } - elseif($node->getTag() == 'ack' && $node->getAttribute("class") == "message") - { + } elseif ($node->getTag() == 'ack' && $node->getAttribute("class") == "message") { $this->eventManager()->fire("onMessageReceivedServer", array( $this->phoneNumber, @@ -2786,9 +2763,7 @@ protected function processInboundDataNode(ProtocolNode $node, $autoReceipt = tru $node->getAttribute('class'), $node->getAttribute('t') )); - } - elseif($node->getTag() == 'receipt') - { + } elseif ($node->getTag() == 'receipt') { if ($node->hasChild("list")) { foreach ($node->getChild("list")->getChildren() as $child) { $this->eventManager()->fire("onMessageReceivedClient", @@ -2832,8 +2807,7 @@ protected function processInboundDataNode(ProtocolNode $node, $autoReceipt = tru } if ($node->getAttribute("type") == "text" && $node->getChild('body') != null) { $author = $node->getAttribute("participant"); - if($author == "") - { + if ($author == "") { //private chat message $this->eventManager()->fire("onGetMessage", array( @@ -2849,9 +2823,7 @@ protected function processInboundDataNode(ProtocolNode $node, $autoReceipt = tru if ($this->messageStore !== null) { $this->messageStore->saveMessage($node->getAttribute('from'), $this->phoneNumber, $node->getChild("body")->getData(), $node->getAttribute('id'), $node->getAttribute('t')); } - } - else - { + } else { //group chat message $this->eventManager()->fire("onGetGroupMessage", array( @@ -2866,15 +2838,13 @@ protected function processInboundDataNode(ProtocolNode $node, $autoReceipt = tru )); } - if($autoReceipt) - { + if ($autoReceipt) { $this->sendMessageReceived($node, $type, $author); } } if ($node->getAttribute("type") == "text" && $node->getChild(0)->getTag() == 'enc') { // TODO - if($autoReceipt) - { + if ($autoReceipt) { $this->sendMessageReceived($node, $type); } } @@ -2986,7 +2956,7 @@ protected function processInboundDataNode(ProtocolNode $node, $autoReceipt = tru $author, )); } elseif ($node->getChild("media")->getAttribute('type') == 'vcard') { - if($node->getChild("media")->hasChild('vcard')) { + if ($node->getChild("media")->hasChild('vcard')) { $name = $node->getChild("media")->getChild("vcard")->getAttribute('name'); $data = $node->getChild("media")->getChild("vcard")->getData(); } else { @@ -3029,8 +2999,7 @@ protected function processInboundDataNode(ProtocolNode $node, $autoReceipt = tru )); } - if($autoReceipt) - { + if ($autoReceipt) { $this->sendMessageReceived($node, $type); } } @@ -3060,15 +3029,14 @@ protected function processInboundDataNode(ProtocolNode $node, $autoReceipt = tru && strncmp($node->getAttribute('from'), $this->phoneNumber, strlen($this->phoneNumber)) != 0 && strpos($node->getAttribute('from'), "-") == false) { $presence = array(); - if($node->getAttribute('type') == null){ + if ($node->getAttribute('type') == null) { $this->eventManager()->fire("onPresence", array( $this->phoneNumber, $node->getAttribute('from'), $presence['type'] = "available" )); - } - else{ + } else { $this->eventManager()->fire("onPresence", array( $this->phoneNumber, @@ -3101,7 +3069,7 @@ protected function processInboundDataNode(ProtocolNode $node, $autoReceipt = tru if (strcmp($node->getTag(), "chatstate") == 0 && strncmp($node->getAttribute('from'), $this->phoneNumber, strlen($this->phoneNumber)) != 0 && strpos($node->getAttribute('from'), "-") == false) { - if($node->getChild(0)->getTag() == "composing"){ + if ($node->getChild(0)->getTag() == "composing") { $this->eventManager()->fire("onMessageComposing", array( $this->phoneNumber, @@ -3110,8 +3078,7 @@ protected function processInboundDataNode(ProtocolNode $node, $autoReceipt = tru "composing", $node->getAttribute('t') )); - } - else{ + } else { $this->eventManager()->fire("onMessagePaused", array( $this->phoneNumber, @@ -3229,7 +3196,7 @@ protected function processInboundDataNode(ProtocolNode $node, $autoReceipt = tru $groupList[] = $child->getAttributes(); } } - if($node->nodeIdContains('creategroup')){ + if ($node->nodeIdContains('creategroup')) { $this->groupId = $node->getChild(0)->getAttribute('id'); $this->eventManager()->fire("onGroupsChatCreate", array( @@ -3237,7 +3204,7 @@ protected function processInboundDataNode(ProtocolNode $node, $autoReceipt = tru $this->groupId )); } - if($node->nodeIdContains('endgroup')){ + if ($node->nodeIdContains('endgroup')) { $this->groupId = $node->getChild(0)->getChild(0)->getAttribute('id'); $this->eventManager()->fire("onGroupsChatEnd", array( @@ -3245,21 +3212,21 @@ protected function processInboundDataNode(ProtocolNode $node, $autoReceipt = tru $this->groupId )); } - if($node->nodeIdContains('getgroups')){ + if ($node->nodeIdContains('getgroups')) { $this->eventManager()->fire("onGetGroups", array( $this->phoneNumber, $groupList )); } - if($node->nodeIdContains('getgroupinfo')){ + if ($node->nodeIdContains('getgroupinfo')) { $this->eventManager()->fire("onGetGroupsInfo", array( $this->phoneNumber, $groupList )); } - if($node->nodeIdContains('getgroupparticipants')){ + if ($node->nodeIdContains('getgroupparticipants')) { $groupId = self::parseJID($node->getAttribute('from')); $this->eventManager()->fire("onGetGroupParticipants", array( @@ -3269,7 +3236,7 @@ protected function processInboundDataNode(ProtocolNode $node, $autoReceipt = tru )); } } - if($node->nodeIdContains('get_groupv2_info')){ + if ($node->nodeIdContains('get_groupv2_info')) { $groupId = self::parseJID($node->getAttribute('from')); $groupList = array(); @@ -3281,8 +3248,9 @@ protected function processInboundDataNode(ProtocolNode $node, $autoReceipt = tru if ($groupChild->getChild(0) != null) { foreach ($groupChild->getChildren() as $child) { $participants[] = $child->getAttribute('jid'); - if($child->getAttribute('type') != null) + if ($child->getAttribute('type') != null) { $admin = $child->getAttribute('jid'); + } } } } @@ -3302,7 +3270,7 @@ protected function processInboundDataNode(ProtocolNode $node, $autoReceipt = tru if ($node->getChild(0) != null) { $childArray = $node->getChildren(); foreach ($childArray as $list) { - if($list->getChildren() != null) { + if ($list->getChildren() != null) { foreach ( $list->getChildren() as $sublist) { $id = $sublist->getAttribute("id"); $name = $sublist->getAttribute("name"); @@ -3322,8 +3290,7 @@ protected function processInboundDataNode(ProtocolNode $node, $autoReceipt = tru $broadcastLists )); } - if($node->getChild("pricing") != null) - { + if ($node->getChild("pricing") != null) { $this->eventManager()->fire("onGetServicePricing", array( $this->phoneNumber, @@ -3333,8 +3300,7 @@ protected function processInboundDataNode(ProtocolNode $node, $autoReceipt = tru $node->getChild(0)->getAttribute("expiration") )); } - if($node->getChild("extend") != null) - { + if ($node->getChild("extend") != null) { $this->eventManager()->fire("onGetExtendAccount", array( $this->phoneNumber, @@ -3344,16 +3310,14 @@ protected function processInboundDataNode(ProtocolNode $node, $autoReceipt = tru $node->getChild("account")->getAttribute("expiration") )); } - if($node->getChild("normalize") != null) - { + if ($node->getChild("normalize") != null) { $this->eventManager()->fire("onGetNormalizedJid", array( $this->phoneNumber, $node->getChild(0)->getAttribute("result") )); } - if($node->getChild("status") != null) - { + if ($node->getChild("status") != null) { $child = $node->getChild("status"); foreach($child->getChildren() as $status) { @@ -3380,7 +3344,6 @@ protected function processInboundDataNode(ProtocolNode $node, $autoReceipt = tru } if ($node->getTag() == "message" && $node->getAttribute('type') == "media" && $node->getChild(0)->getAttribute('type') == "image" ) { - $msgId = $this->createMsgId("ack-media"); $ackNode = new ProtocolNode("ack", @@ -3400,25 +3363,21 @@ protected function processInboundDataNode(ProtocolNode $node, $autoReceipt = tru } $children = $node->getChild(0); - if ($node->getTag() == "stream:error" && empty($children) == false && $node->getChild(0)->getTag() == "system-shutdown") - { + if ($node->getTag() == "stream:error" && empty($children) == false && $node->getChild(0)->getTag() == "system-shutdown") { $this->eventManager()->fire("onStreamError", array( $node->getChild(0)->getTag() )); } - - if ($node->getTag() == "stream:error") - { + if ($node->getTag() == "stream:error") { $this->eventManager()->fire("onStreamError", array( $node->getChild(0)->getTag() )); } - if($node->getTag() == "notification") - { + if ($node->getTag() == "notification") { $name = $node->getAttribute("notify"); $type = $node->getAttribute("type"); switch($type) @@ -3531,8 +3490,7 @@ protected function processInboundDataNode(ProtocolNode $node, $autoReceipt = tru )); break; case "features": - if($node->getChild(0)->getChild(0) == "encrypt") - { + if ($node->getChild(0)->getChild(0) == "encrypt") { $this->eventManager()->fire("onGetFeature", array( $this->phoneNumber, @@ -3563,8 +3521,7 @@ protected function processInboundDataNode(ProtocolNode $node, $autoReceipt = tru } } } - if($node->getTag() == "ack") - { + if ($node->getTag() == "ack") { ////on get ack } @@ -3743,8 +3700,9 @@ protected function processUploadResponse($node) $mediaAttribs["encoding"] = "raw"; $mediaAttribs["file"] = $filename; $mediaAttribs["size"] = $filesize; - if($this->mediaQueue[$id]['caption'] != '') + if ($this->mediaQueue[$id]['caption'] != '') { $mediaAttribs["caption"] = $this->mediaQueue[$id]['caption']; + } $filepath = $this->mediaQueue[$id]['filePath']; $to = $this->mediaQueue[$id]['to']; @@ -3793,10 +3751,9 @@ protected function processUploadResponse($node) public function readStanza() { $buff = ''; - if($this->socket != null) - { + if ($this->socket != null) { $header = @socket_read($this->socket, 3);//read stanza header - if($header === false) { + if ($header === false) { $error = "socket EOF, closing socket..."; socket_close($this->socket); $this->socket = null; @@ -3808,13 +3765,11 @@ public function readStanza() ); } - if(strlen($header) == 0) - { + if (strlen($header) == 0) { //no data received return; } - if(strlen($header) != 3) - { + if (strlen($header) != 3) { throw new ConnectionException("Failed to read stanza header"); } $treeLength = (ord($header[0]) & 0x0F) << 16; @@ -3826,12 +3781,10 @@ public function readStanza() $trlen = $treeLength; $len = strlen($buff); $prev = 0; - while(strlen($buff) < $treeLength) - { + while (strlen($buff) < $treeLength) { $toRead = $treeLength - strlen($buff); $buff .= socket_read($this->socket, $toRead); - if($len == strlen($buff)) - { + if ($len == strlen($buff)) { //no new data read, fuck it break; } @@ -3842,9 +3795,7 @@ public function readStanza() throw new ConnectionException("Tree length did not match received length (buff = " . strlen($buff) . " & treeLength = $treeLength)"); } $buff = $header . $buff; - } - else - { + } else { $this->eventManager()->fire("onDisconnect", array( $this->phoneNumber, @@ -3939,10 +3890,8 @@ protected function sendBroadcast($targets, $node, $type) */ protected function sendData($data) { - if($this->socket != null) - { - if (socket_write($this->socket, $data, strlen($data)) === false) - { + if ($this->socket != null) { + if (socket_write($this->socket, $data, strlen($data)) === false) { $this->disconnect(); throw new ConnectionException('Connection Closed!'); } @@ -4011,12 +3960,9 @@ protected function sendMessageNode($to, $node, $id = null) { $messageHash = array(); $messageHash["to"] = $this->getJID($to); - if($node->getTag() == "body") - { + if ($node->getTag() == "body") { $messageHash["type"] = "text"; - } - else - { + } else { $messageHash["type"] = "media"; } $messageHash["id"] = ($id == null?$this->createMsgId("message"):$id); @@ -4046,10 +3992,12 @@ protected function sendMessageReceived($msg, $type = "read", $participant = null { $messageHash = array(); - if($type == "read") + if ($type == "read") { $messageHash["type"] = $type; - if($participant != null) + } + if ($participant != null) { $messageHash["participant"] = $participant; + } $messageHash["to"] = $msg->getAttribute("from"); $messageHash["id"] = $msg->getAttribute("id"); $messageHash["t"] = time(); From fd766858d5b26a28307f669559a00b64e1168c4a Mon Sep 17 00:00:00 2001 From: ducch Date: Sat, 21 Feb 2015 18:03:10 +0200 Subject: [PATCH 225/436] merge redundant line split --- src/mediauploader.php | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/mediauploader.php b/src/mediauploader.php index a4d0e5b2..645a0c72 100755 --- a/src/mediauploader.php +++ b/src/mediauploader.php @@ -58,7 +58,6 @@ protected static function getPostString($filepath, $url, $mediafile, $to, $from) //filename to md5 digest $cryptoname = md5($filepath) . "." . $mediafile['fileextension']; $boundary = "zzXXzzYYzzXXzzQQ"; - $contentlength = 0; if (is_array($to)) { $to = implode(',', $to); @@ -76,9 +75,7 @@ protected static function getPostString($filepath, $url, $mediafile, $to, $from) $fBAOS = "\r\n--" . $boundary . "--\r\n"; - $contentlength += strlen($hBAOS); - $contentlength += strlen($fBAOS); - $contentlength += $mediafile['filesize']; + $contentlength = strlen($hBAOS) + strlen($fBAOS) + $mediafile['filesize']; $POST = "POST " . $url . "\r\n"; $POST .= "Content-Type: multipart/form-data; boundary=" . $boundary . "\r\n"; From b1422823ac2156e91a7c37fec72beec17d2cb314 Mon Sep 17 00:00:00 2001 From: ducch Date: Sat, 21 Feb 2015 18:07:54 +0200 Subject: [PATCH 226/436] remove redundant variable declaration --- src/protocol.class.php | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/protocol.class.php b/src/protocol.class.php index 32dc9a97..07193e01 100755 --- a/src/protocol.class.php +++ b/src/protocol.class.php @@ -429,16 +429,15 @@ protected function readList($token) protected function readListSize($token) { - $size = 0; if ($token == 0xf8) { - $size = $this->readInt8(); + return $this->readInt8(); } elseif ($token == 0xf9) { - $size = $this->readInt16(); + return $this->readInt16(); } else { throw new Exception("BinTreeNodeReader->readListSize: Invalid token $token"); } - return $size; + return false; //should never be reached. } protected function peekInt24($offset = 0) From beb7796435088a069c4f878f514bfc6fded66ab7 Mon Sep 17 00:00:00 2001 From: ducch Date: Sat, 21 Feb 2015 18:32:58 +0200 Subject: [PATCH 227/436] substr() is expensive and not needed --- examples/contactsync.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/examples/contactsync.php b/examples/contactsync.php index 3b840c86..210abbe2 100755 --- a/examples/contactsync.php +++ b/examples/contactsync.php @@ -6,13 +6,14 @@ $username = $_GET["phone"]; $password = $_GET["pass"]; $u = $_GET["u"]; -if ( ! is_array($u)) { + +if (!is_array($u)) { $u = array($u); } $numbers = array(); foreach ($u as $number) { - if (substr($number, 0, 1) != "+") { + if ($number[0] != "+") { //add leading + $number = "+$number"; } From ad54151b8b4b3fbd247f12784a02e14290414abe Mon Sep 17 00:00:00 2001 From: ducch Date: Sat, 21 Feb 2015 18:46:24 +0200 Subject: [PATCH 228/436] improve readability --- src/whatsprot.class.php | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index 43a197d3..a053bc80 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -523,10 +523,7 @@ public function connect() */ public function isConnected() { - if ($this->socket === null) { - return false; - } - return true; + return ($this->socket !== null); } @@ -621,11 +618,7 @@ public function pollMessage($autoReceipt = true, $type = "read") throw new ConnectionException('Connection Closed!'); } - $r = array($this->socket); - $w = array(); - $e = array(); - - if (socket_select($r, $w, $e, static::TIMEOUT_SEC, static::TIMEOUT_USEC)) { + if (socket_select(array($this->socket), array(), array(), static::TIMEOUT_SEC, static::TIMEOUT_USEC)) { // Something to read if ($stanza = $this->readStanza()) { $this->processInboundData($stanza, $autoReceipt, $type); From c35190d766c3a7240820034ce15fb45195496d3f Mon Sep 17 00:00:00 2001 From: ducch Date: Sat, 21 Feb 2015 18:53:13 +0200 Subject: [PATCH 229/436] must return false when not returning true --- src/whatsprot.class.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index a053bc80..e5e9afa2 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -2450,14 +2450,16 @@ protected function buildIdentity($identity) protected function checkIdentity($identity) { - if (file_exists($identity.".dat")) { + if (file_exists($identity.".dat")) + { $id = strlen(urldecode(file_get_contents($identity.'.dat'))); - if (($id == 20) || ($id == 16)) { + if (($id == 20) || ($id == 16)) + { return true; } - } else { - return false; } + + return false; } public function sendSync(array $numbers, array $deletedNumbers = null, $syncType = 4, $index = 0, $last = true) From bfb06d3452439758348176512fc68d645a90fe7b Mon Sep 17 00:00:00 2001 From: ducch Date: Sat, 21 Feb 2015 19:05:14 +0200 Subject: [PATCH 230/436] improve readability --- src/whatsprot.class.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index e5e9afa2..a6186961 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -3358,7 +3358,8 @@ protected function processInboundDataNode(ProtocolNode $node, $autoReceipt = tru } $children = $node->getChild(0); - if ($node->getTag() == "stream:error" && empty($children) == false && $node->getChild(0)->getTag() == "system-shutdown") { + if ($node->getTag() == "stream:error" && !empty($children) && $node->getChild(0)->getTag() == "system-shutdown") + { $this->eventManager()->fire("onStreamError", array( $node->getChild(0)->getTag() From afe81d8987296ddc6649e22204b5893ad0bf009b Mon Sep 17 00:00:00 2001 From: ducch Date: Sat, 21 Feb 2015 19:09:46 +0200 Subject: [PATCH 231/436] make sure strpos() is compared with bool false --- src/whatsprot.class.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index a6186961..5f3c9583 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -3022,7 +3022,7 @@ protected function processInboundDataNode(ProtocolNode $node, $autoReceipt = tru } if (strcmp($node->getTag(), "presence") == 0 && strncmp($node->getAttribute('from'), $this->phoneNumber, strlen($this->phoneNumber)) != 0 - && strpos($node->getAttribute('from'), "-") == false) { + && strpos($node->getAttribute('from'), "-") === false) { $presence = array(); if ($node->getAttribute('type') == null) { $this->eventManager()->fire("onPresence", @@ -3063,8 +3063,8 @@ protected function processInboundDataNode(ProtocolNode $node, $autoReceipt = tru } if (strcmp($node->getTag(), "chatstate") == 0 && strncmp($node->getAttribute('from'), $this->phoneNumber, strlen($this->phoneNumber)) != 0 - && strpos($node->getAttribute('from'), "-") == false) { - if ($node->getChild(0)->getTag() == "composing") { + && strpos($node->getAttribute('from'), "-") === false) { + if($node->getChild(0)->getTag() == "composing"){ $this->eventManager()->fire("onMessageComposing", array( $this->phoneNumber, From 70330961a14db6bf3625e7634b0c3fb3b574bec9 Mon Sep 17 00:00:00 2001 From: ducch Date: Sat, 21 Feb 2015 17:56:47 +0200 Subject: [PATCH 232/436] remove unused privates --- src/exception.php | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/exception.php b/src/exception.php index a85505c9..1ce07341 100755 --- a/src/exception.php +++ b/src/exception.php @@ -22,12 +22,10 @@ public function __construct($message = null, $code = 0); abstract class CustomException extends Exception implements IException { - protected $message = 'Unknown exception'; // Exception message - protected $code = 0; // User-defined exception code - protected $file; // Source filename of exception - protected $line; // Source line of exception - private $string; // Unknown - private $trace; // Unknown + protected $message = 'Unknown exception'; // Exception message + protected $code = 0; // User-defined exception code + protected $file; // Source filename of exception + protected $line; // Source line of exception public function __construct($message = null, $code = 0) { From 68fcb9a33c4054e3f482e876f790b5b4f20f8bb1 Mon Sep 17 00:00:00 2001 From: ducch Date: Sat, 21 Feb 2015 20:42:16 +0200 Subject: [PATCH 233/436] remove redundant else --- src/whatsprot.class.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index 5f3c9583..add67ce7 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -2397,15 +2397,15 @@ protected function doLogin() $this->pollMessage(); } - if (strcmp($this->loginStatus, static::DISCONNECTED_STATUS) == 0) { - throw new Exception('Login Failure'); - } else { + if ($this->loginStatus === static::DISCONNECTED_STATUS) { $this->eventManager()->fire("onLogin", array( $this->phoneNumber )); $this->sendAvailableForChat(); } + + throw new Exception('Login Failure'); } /** From 4effaf35b2827eda4ccefb586eecf9ff0cb47fb4 Mon Sep 17 00:00:00 2001 From: ducch Date: Sat, 21 Feb 2015 23:30:27 +0200 Subject: [PATCH 234/436] fix typos --- src/whatsprot.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index 43a197d3..38e171b3 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -1197,7 +1197,7 @@ public function sendGetBroadcastLists() * Send a request to get the normalized mobile number respresenting the JID * * @param string $countryCode - * Contry Code + * Country Code * @param string $number * Mobile Number */ @@ -1282,7 +1282,7 @@ public function sendPing() } /** - * Get voip info. of a number/s + * Get VOIP info. of a number/s * * @param string $jids */ From d1a105dc10c373a02f3cb6dc30d6d567249da136 Mon Sep 17 00:00:00 2001 From: ducch Date: Sat, 21 Feb 2015 20:43:02 +0200 Subject: [PATCH 235/436] improve readability --- src/whatsprot.class.php | 32 +++++++++----------------------- 1 file changed, 9 insertions(+), 23 deletions(-) diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index add67ce7..8027bea8 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -1058,8 +1058,7 @@ public function sendGetProfilePhotoIds($numbers) $msgId = $this->createMsgId("get_picture_ids"); - $i = 0; - for ($i; $i $this->getJID($numbers[$i]) @@ -2413,19 +2412,9 @@ protected function doLogin() * @return bool */ protected function isLoggedIn(){ - //If you aren't connected you can't be logged in! - if ( ! $this->isConnected()) - { - return false; - } - - //We are connected - but are we logged in? - if ( ! empty ($this->loginStatus) && $this->loginStatus === static::CONNECTED_STATUS) - { - return true; - } - - return false; + //If you aren't connected you can't be logged in! ($this->isConnected()) + //We are connected - but are we logged in? (the rest) + return ($this->isConnected() && !empty($this->loginStatus) && $this->loginStatus === static::CONNECTED_STATUS); } /** @@ -2453,7 +2442,7 @@ protected function checkIdentity($identity) if (file_exists($identity.".dat")) { $id = strlen(urldecode(file_get_contents($identity.'.dat'))); - if (($id == 20) || ($id == 16)) + if ($id == 20 || $id == 16) { return true; } @@ -2465,17 +2454,14 @@ protected function checkIdentity($identity) public function sendSync(array $numbers, array $deletedNumbers = null, $syncType = 4, $index = 0, $last = true) { $users = array(); - $i = 0; - for ($i; $i $this->getJID($deletedNumbers[$j]), "type" => "delete"), null, null); - $i++; } } From f02402b5ffd7fb3139cac9e6a6658511d9c422a4 Mon Sep 17 00:00:00 2001 From: ducch Date: Sat, 21 Feb 2015 23:09:56 +0200 Subject: [PATCH 236/436] improve readability and lose redundant ifs --- src/whatsprot.class.php | 35 +++++------------------------------ 1 file changed, 5 insertions(+), 30 deletions(-) diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index 8027bea8..f7d626bf 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -160,25 +160,10 @@ public function checkCredentials() throw new Exception('The provided phone number is not valid.'); } - $countryCode = null; - $langCode = null; + $countryCode = ($phone['ISO3166'] != '') ? $phone['ISO3166'] : 'US'; + $langCode = ($phone['ISO639'] != '') ? $phone['ISO639'] : 'en'; - if ($countryCode == null && $phone['ISO3166'] != '') { - $countryCode = $phone['ISO3166']; - } - if ($countryCode == null) { - $countryCode = 'US'; - } - if ($langCode == null && $phone['ISO639'] != '') { - $langCode = $phone['ISO639']; - } - if ($langCode == null) { - $langCode = 'en'; - } - if ($phone['cc'] == '77') { - $phone['cc'] = '7'; - } - if ($phone['cc'] == '79') { + if ($phone['cc'] == '77' || $phone['cc'] == '79') { $phone['cc'] = '7'; } @@ -343,18 +328,8 @@ public function codeRequest($method = 'sms', $carrier = "T-Mobile5", $countryCod throw new Exception('The provided phone number is not valid.'); } - if ($countryCode == null && $phone['ISO3166'] != '') { - $countryCode = $phone['ISO3166']; - } - if ($countryCode == null) { - $countryCode = 'US'; - } - if ($langCode == null && $phone['ISO639'] != '') { - $langCode = $phone['ISO639']; - } - if ($langCode == null) { - $langCode = 'en'; - } + $countryCode = ($phone['ISO3166'] != '') ? $phone['ISO3166'] : 'US'; + $langCode = ($phone['ISO639'] != '') ? $phone['ISO639'] : 'en'; if ($carrier != null) { $mnc = $this->detectMnc(strtolower($countryCode), $carrier); From fc4cbd9a3d979782e69013e746a2ed58e385068c Mon Sep 17 00:00:00 2001 From: ducch Date: Sat, 21 Feb 2015 23:13:46 +0200 Subject: [PATCH 237/436] improve readability and lose redundant ifs; comment out as it's not being used anyway --- src/whatsprot.class.php | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index f7d626bf..1a192d83 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -238,21 +238,8 @@ public function codeRegister($code) throw new Exception('The provided phone number is not valid.'); } - $countryCode = null; - $langCode = null; - - if ($countryCode == null && $phone['ISO3166'] != '') { - $countryCode = $phone['ISO3166']; - } - if ($countryCode == null) { - $countryCode = 'US'; - } - if ($langCode == null && $phone['ISO639'] != '') { - $langCode = $phone['ISO639']; - } - if ($langCode == null) { - $langCode = 'en'; - } + //$countryCode = ($phone['ISO3166'] != '') ? $phone['ISO3166'] : 'US'; + //$langCode = ($phone['ISO639'] != '') ? $phone['ISO639'] : 'en'; // Build the url. $host = 'https://' . static::WHATSAPP_REGISTER_HOST; From 73801575425a6d26de6b2fe8db65933521f0b461 Mon Sep 17 00:00:00 2001 From: ducch Date: Sat, 21 Feb 2015 23:24:27 +0200 Subject: [PATCH 238/436] remove unused variable declaration --- src/whatsprot.class.php | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index 1a192d83..90d9e419 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -795,8 +795,6 @@ protected function sendClearDirty($categories) public function sendClientConfig() { - $phone = $this->dissectPhone(); - $attr = array(); $attr["platform"] = static::WHATSAPP_DEVICE; $attr["version"] = static::WHATSAPP_VER; @@ -2130,7 +2128,6 @@ protected function authenticate() $keys = KeyStream::GenerateKeys(base64_decode($this->password), $this->challengeData); $this->inputKey = new KeyStream($keys[2], $keys[3]); $this->outputKey = new KeyStream($keys[0], $keys[1]); - $phone = $this->dissectPhone(); $array = "\0\0\0\0" . $this->phoneNumber . $this->challengeData;// . time() . static::WHATSAPP_USER_AGENT . " MccMnc/" . str_pad($phone["mcc"], 3, "0", STR_PAD_LEFT) . "001"; $response = $this->outputKey->EncodeMessage($array, 0, 4, strlen($array) - 4); return $response; From 405bb7ef561b131ae57973f07d03cd72d113698c Mon Sep 17 00:00:00 2001 From: ducch Date: Sat, 21 Feb 2015 23:42:44 +0200 Subject: [PATCH 239/436] remove waitForMessageReceipt() as it's never being used. further, it doesn't do anything and has bad logic. --- src/whatsprot.class.php | 22 ---------------------- 1 file changed, 22 deletions(-) diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index 90d9e419..3d3f53d0 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -2081,28 +2081,6 @@ public function uploadFile($file) } } - /** - * Wait for message delivery notification. - */ - public function waitForMessageReceipt() - { - $received = false; - do { - $this->pollMessage(); - $msgs = $this->getMessages(); - foreach ($msgs as $m) { - // Process inbound messages. - if ($m->getTag() == "message") { - if ($m->getChild('received') != null && $m->getAttribute('retry') != null) { - $received = true; - } elseif ($m->getChild('received') != null && $m->getAttribute('retry') != null) { - throw new Exception('There was a problem trying to send the message, please retry.'); - } - } - } - } while (!$received); - } - /** * Wait for Whatsapp server to acknowledge *it* has received message. * @param string $id The id of the node sent that we are awaiting acknowledgement of. From d4f316e79d97f22bc742343c42260685ab1fa616 Mon Sep 17 00:00:00 2001 From: ducch Date: Sat, 21 Feb 2015 23:03:15 +0200 Subject: [PATCH 240/436] adjust indention to make comments align --- src/whatsprot.class.php | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index ae080dba..f53a6dc6 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -32,23 +32,23 @@ class WhatsProt /** * Constant declarations. */ - const CONNECTED_STATUS = 'connected'; // Describes the connection status with the WhatsApp server. - const DISCONNECTED_STATUS = 'disconnected'; // Describes the connection status with the WhatsApp server. - const MEDIA_FOLDER = 'media'; // The relative folder to store received media files - const PICTURES_FOLDER = 'pictures'; // The relative folder to store picture files - const PORT = 443; // The port of the WhatsApp server. - const TIMEOUT_SEC = 2; // The timeout for the connection with the WhatsApp servers. - const TIMEOUT_USEC = 0; // - const WHATSAPP_CHECK_HOST = 'v.whatsapp.net/v2/exist'; // The check credentials host. - const WHATSAPP_GROUP_SERVER = 'g.us'; // The Group server hostname - const WHATSAPP_HOST = 'c.whatsapp.net'; // The hostname of the WhatsApp server. - const WHATSAPP_REGISTER_HOST = 'v.whatsapp.net/v2/register'; // The register code host. - const WHATSAPP_REQUEST_HOST = 'v.whatsapp.net/v2/code'; // The request code host. - const WHATSAPP_SERVER = 's.whatsapp.net'; // The hostname used to login/send messages. - const WHATSAPP_UPLOAD_HOST = 'https://mms.whatsapp.net/client/iphone/upload.php'; // The upload host. - const WHATSAPP_DEVICE = 'iPhone'; // The device name. - const WHATSAPP_VER = '2.11.14'; // The WhatsApp version. - const WHATSAPP_USER_AGENT = 'WhatsApp/2.12.61 S40Version/14.26 Device/Nokia302'; // User agent used in request/registration code. + const CONNECTED_STATUS = 'connected'; // Describes the connection status with the WhatsApp server. + const DISCONNECTED_STATUS = 'disconnected'; // Describes the connection status with the WhatsApp server. + const MEDIA_FOLDER = 'media'; // The relative folder to store received media files + const PICTURES_FOLDER = 'pictures'; // The relative folder to store picture files + const PORT = 443; // The port of the WhatsApp server. + const TIMEOUT_SEC = 2; // The timeout for the connection with the WhatsApp servers. + const TIMEOUT_USEC = 0; + const WHATSAPP_CHECK_HOST = 'v.whatsapp.net/v2/exist'; // The check credentials host. + const WHATSAPP_GROUP_SERVER = 'g.us'; // The Group server hostname + const WHATSAPP_HOST = 'c.whatsapp.net'; // The hostname of the WhatsApp server. + const WHATSAPP_REGISTER_HOST = 'v.whatsapp.net/v2/register'; // The register code host. + const WHATSAPP_REQUEST_HOST = 'v.whatsapp.net/v2/code'; // The request code host. + const WHATSAPP_SERVER = 's.whatsapp.net'; // The hostname used to login/send messages. + const WHATSAPP_UPLOAD_HOST = 'https://mms.whatsapp.net/client/iphone/upload.php'; // The upload host. + const WHATSAPP_DEVICE = 'iPhone'; // The device name. + const WHATSAPP_VER = '2.11.14'; // The WhatsApp version. + const WHATSAPP_USER_AGENT = 'WhatsApp/2.12.61 S40Version/14.26 Device/Nokia302'; // User agent used in request/registration code. const WHATSAPP_VER_CHECKER = 'https://coderus.openrepos.net/whitesoft/whatsapp_version'; // Check WhatsApp version /** From 0339e347242c2dc1143a4e2807754fdbdd4def54 Mon Sep 17 00:00:00 2001 From: ducch Date: Sat, 21 Feb 2015 20:38:36 +0200 Subject: [PATCH 241/436] apply PSR-1/PSR-2 standards --- src/whatsprot.class.php | 46 +++++++++++++++++++++-------------------- 1 file changed, 24 insertions(+), 22 deletions(-) diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index f53a6dc6..dbceb364 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -876,7 +876,7 @@ public function sendGetGroupV2Info($groupID) $queryNode = new ProtocolNode("query", array( "request" => "interactive" - ),null, null); + ), null, null); $node = new ProtocolNode("iq", array( @@ -1272,15 +1272,16 @@ public function sendGetHasVoipEnabled($jids) */ public function sendGetStatuses($jids) { - if (!is_array($jids)) - { + if (!is_array($jids)) { $jids = array($jids); } + $children = array(); foreach ($jids as $jid) { $children[] = new ProtocolNode("user", array("jid" => $this->getJID($jid)), null, null); } + $node = new ProtocolNode("iq", array( "to" => "s.whatsapp.net", @@ -1310,8 +1311,8 @@ public function sendGroupsChatCreate($subject, $participants) if (!is_array($participants)) { $participants = array($participants); } - foreach ($participants as $participant) - { + + foreach ($participants as $participant) { $participantNode[] = new ProtocolNode("participant", array( "jid" => $this->getJID($participant) ), null, null); @@ -1411,6 +1412,7 @@ public function sendGroupsLeave($gjids) if (!is_array($gjids)) { $gjids = array($this->getJID($gjids)); } + $nodes = array(); foreach ($gjids as $gjid) { $nodes[] = new ProtocolNode("group", @@ -1418,6 +1420,7 @@ public function sendGroupsLeave($gjids) "id" => $this->getJID($gjid) ), null, null); } + $leave = new ProtocolNode("leave", array( 'action'=>'delete' @@ -1603,12 +1606,10 @@ public function sendMessageRead($to, $id) */ public function sendMessageAudio($to, $filepath, $storeURLmedia = false, $fsize = 0, $fhash = "") { - if ($fsize==0 || $fhash == "") - { + if ($fsize == 0 || $fhash == "") { $allowedExtensions = array('3gp', 'caf', 'wav', 'mp3', 'wma', 'ogg', 'aif', 'aac', 'm4a'); $size = 10 * 1024 * 1024; // Easy way to set maximum file size for this media type. return $this->sendCheckAndSendMedia($filepath, $size, $to, 'audio', $allowedExtensions, $storeURLmedia); - } else { $this->sendRequestFileUpload($fhash, 'audio', $fsize, $filepath, $to); return true; @@ -1640,8 +1641,7 @@ public function sendMessageComposing($to) public function sendMessageImage($to, $filepath, $storeURLmedia = false, $fsize = 0, $fhash = "", $caption = "") { $caption = $this->parseMessageForEmojis($caption); - if ($fsize==0 || $fhash == "") - { + if ($fsize == 0 || $fhash == "") { $allowedExtensions = array('jpg', 'jpeg', 'gif', 'png'); $size = 5 * 1024 * 1024; // Easy way to set maximum file size for this media type. return $this->sendCheckAndSendMedia($filepath, $size, $to, 'image', $allowedExtensions, $storeURLmedia, $caption); @@ -1730,14 +1730,12 @@ protected function sendChatState($to, $state) public function sendMessageVideo($to, $filepath, $storeURLmedia = false, $fsize = 0, $fhash = "", $caption = "") { $caption = $this->parseMessageForEmojis($caption); - if ($fsize==0 || $fhash == "") - { + + if ($fsize == 0 || $fhash == "") { $allowedExtensions = array('3gp', 'mp4', 'mov', 'avi'); $size = 20 * 1024 * 1024; // Easy way to set maximum file size for this media type. return $this->sendCheckAndSendMedia($filepath, $size, $to, 'video', $allowedExtensions, $storeURLmedia, $caption); - } - else - { + } else { $this->sendRequestFileUpload($fhash, 'video', $fsize, $filepath, $to, $caption); return true; } @@ -1793,11 +1791,11 @@ public function sendPong($msgid) public function sendAvailableForChat($nickname = null) { $presence = array(); - if ($nickname) - { + if ($nickname) { //update nickname $this->name = $nickname; } + $presence['name'] = $this->name; $node = new ProtocolNode("presence", $presence, null, ""); $this->sendNode($node); @@ -1870,6 +1868,7 @@ public function sendSetPrivacyBlockedList($blockedJids = array()) if (!is_array($blockedJids)) { $blockedJids = array($blockedJids); } + $items = array(); foreach ($blockedJids as $index => $jid) { $item = new ProtocolNode("item", @@ -1881,6 +1880,7 @@ public function sendSetPrivacyBlockedList($blockedJids = array()) ), null, null); $items[] = $item; } + $child = new ProtocolNode("list", array( "name" => "default" @@ -2050,6 +2050,7 @@ public function setNewMessageBind($bind) public function uploadFile($file) { $data['file'] = "@" . $file; + $ch = curl_init(); curl_setopt($ch, CURLOPT_HEADER, 0); curl_setopt($ch, CURLOPT_HTTPHEADER, array('Expect:')); @@ -2285,14 +2286,15 @@ protected function detectMnc ($lc, $carrierName) $mnc = null; while ($data = fgetcsv($fp, 0, ',')) { - if (($data[4] === $lc) && ($data[7] === $carrierName)) { + if ($data[4] === $lc && $data[7] === $carrierName) { $mnc = $data[2]; break; } } - if ($mnc == null) + if ($mnc == null) { $mnc = '000'; + } fclose($fp); @@ -2306,8 +2308,7 @@ protected function detectMnc ($lc, $carrierName) */ protected function doLogin() { - if ($this->isLoggedIn()) - { + if ($this->isLoggedIn()) { return true; } @@ -2935,12 +2936,13 @@ protected function processInboundDataNode(ProtocolNode $node, $autoReceipt = tru if ($node->getTag() == "presence" && $node->getAttribute("status") == "dirty") { //clear dirty $categories = array(); - if (count($node->getChildren()) > 0) + if (count($node->getChildren()) > 0) { foreach ($node->getChildren() as $child) { if ($child->getTag() == "category") { $categories[] = $child->getAttribute("name"); } } + } $this->sendClearDirty($categories); } if (strcmp($node->getTag(), "presence") == 0 From 76862ba38c553dc49a86229c7c32f731d680535c Mon Sep 17 00:00:00 2001 From: ducch Date: Sun, 22 Feb 2015 01:21:59 +0200 Subject: [PATCH 242/436] comment out unused variables --- src/whatsprot.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index ae080dba..40425e30 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -432,8 +432,8 @@ public function connect() $WAver = trim(file_get_contents(static::WHATSAPP_VER_CHECKER)); - $WAverS = str_replace(".","",$WAver); - $ver = str_replace(".","",static::WHATSAPP_VER); + //$WAverS = str_replace(".","",$WAver); + //$ver = str_replace(".","",static::WHATSAPP_VER); // if($ver<$WAverS) // { From f028b6fa69cb4896cb8ec58799576038f80795eb Mon Sep 17 00:00:00 2001 From: ducch Date: Sun, 22 Feb 2015 01:37:22 +0200 Subject: [PATCH 243/436] improve and make use of debugPrint() --- src/whatsprot.class.php | 41 +++++++++++++++++++---------------------- 1 file changed, 19 insertions(+), 22 deletions(-) diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index 40425e30..8f801861 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -187,10 +187,10 @@ public function checkCredentials() $response->status, $response->reason )); - if ($this->debug) { - print_r($query); - print_r($response); - } + + $this->debugPrint($query); + $this->debugPrint($response); + throw new Exception('There was a problem trying to request the code.'); } else { $this->eventManager()->fire("onCredentialsGood", @@ -264,10 +264,10 @@ public function codeRegister($code) $response->reason, $response->retry_after )); - if ($this->debug) { - print_r($query); - print_r($response); - } + + $this->debugPrint($query); + $this->debugPrint($response); + throw new Exception('An error occurred registering the registration code from WhatsApp.'); } else { $this->eventManager()->fire("onCodeRegister", @@ -345,15 +345,11 @@ public function codeRequest($method = 'sms', $carrier = "T-Mobile5", $countryCod //'network_radio_type' => "1" ); - if ($this->debug) { - print_r($query); - } + $this->debugPrint($query); $response = $this->getResponse($host, $query); - if ($this->debug) { - print_r($response); - } + $this->debugPrint($response); if ($response->status == 'ok') { $this->eventManager()->fire("onCodeRegister", @@ -466,9 +462,8 @@ public function connect() ); return true; } else { - if ($this->debug) { - print_r("Firing onConnectError\n"); - } + $this->debugPrint("Firing onConnectError\n"); + $this->eventManager()->fire("onConnectError", array( $this->phoneNumber, @@ -541,9 +536,7 @@ public function login() { $this->accountInfo = (array) $this->checkCredentials(); if ($this->accountInfo['status'] == 'ok') { - if ($this->debug) { - print_r("New password received: " . $this->accountInfo['pw'] . "\n"); - } + $this->debugPrint("New password received: " . $this->accountInfo['pw'] . "\n"); $this->password = $this->accountInfo['pw']; } $this->doLogin(); @@ -2193,14 +2186,18 @@ protected function createMsgId($prefix) /** * Print a message to the debug console. * - * @param string $debugMsg + * @param mixed $debugMsg * The debug message. + * @return string */ protected function debugPrint($debugMsg) { if ($this->debug) { - echo $debugMsg; + var_dump($debugMsg); + return true; } + + return false; } /** From 1e5293011a6701c0e95fce3c3bb9044321c43780 Mon Sep 17 00:00:00 2001 From: ducch Date: Sun, 22 Feb 2015 01:39:18 +0200 Subject: [PATCH 244/436] improve readability --- src/whatsprot.class.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index 8f801861..b947ca99 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -2225,13 +2225,11 @@ protected function dissectPhone() //hook: //fix country code for North America - if (substr($data[1], 0, 1) == "1") - { + if ($data[1][0] == "1") { $data[1] = "1"; } - $phone = - array( + $phone = array( 'country' => $data[0], 'cc' => $data[1], 'phone' => substr($this->phoneNumber, strlen($data[1]), strlen($this->phoneNumber)), From 314f1800585f870d8cf78d0190fbcf1fb21f6e6a Mon Sep 17 00:00:00 2001 From: ducch Date: Sun, 22 Feb 2015 01:43:15 +0200 Subject: [PATCH 245/436] complete PHPDoc details --- src/whatsprot.class.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index b947ca99..863a1cdd 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -2271,6 +2271,7 @@ protected function dissectPhone() * * @param $lc LangCode * @param $carrierName Name of the carrier + * @return string * * Returns mnc value */ From 083b8a1d9b093a446e5e9878ac2315b3d9ee18e3 Mon Sep 17 00:00:00 2001 From: ducch Date: Sun, 22 Feb 2015 01:51:04 +0200 Subject: [PATCH 246/436] revert. must pass variables by refernce --- src/whatsprot.class.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index 863a1cdd..4b091a2f 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -573,7 +573,11 @@ public function pollMessage($autoReceipt = true, $type = "read") throw new ConnectionException('Connection Closed!'); } - if (socket_select(array($this->socket), array(), array(), static::TIMEOUT_SEC, static::TIMEOUT_USEC)) { + $r = array($this->socket); + $w = array(); + $e = array(); + + if (socket_select($r, $w, $e, static::TIMEOUT_SEC, static::TIMEOUT_USEC)) { // Something to read if ($stanza = $this->readStanza()) { $this->processInboundData($stanza, $autoReceipt, $type); From 9ba8ef730c38edee2138365f9f8d4089d7856ea7 Mon Sep 17 00:00:00 2001 From: ducch Date: Sun, 22 Feb 2015 01:57:11 +0200 Subject: [PATCH 247/436] remove redundant else --- src/whatsprot.class.php | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index 4b091a2f..386dfd69 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -2068,14 +2068,14 @@ public function uploadFile($file) $url )); return $url; - } else { - $this->eventManager()->fire("onUploadFileFailed", - array( - $this->phoneNumber, - basename($file) - )); - return false; } + + $this->eventManager()->fire("onUploadFileFailed", + array( + $this->phoneNumber, + basename($file) + )); + return false; } /** @@ -2364,14 +2364,14 @@ protected function buildIdentity($identity) { if (file_exists($identity.".dat")) { return urldecode(file_get_contents($identity.'.dat')); - } else { - $id = fopen($identity.".dat", "w"); - $bytes = strtolower(openssl_random_pseudo_bytes(20)); - fwrite($id, urlencode($bytes)); - fclose($id); - - return $bytes; } + + $id = fopen($identity.".dat", "w"); + $bytes = strtolower(openssl_random_pseudo_bytes(20)); + fwrite($id, urlencode($bytes)); + fclose($id); + + return $bytes; } protected function checkIdentity($identity) From c58867e137fe8ac9d06494245a450cdd9b23e3e5 Mon Sep 17 00:00:00 2001 From: ducch Date: Sat, 21 Feb 2015 23:03:15 +0200 Subject: [PATCH 248/436] adjust indention to make comments align --- src/whatsprot.class.php | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index 386dfd69..b0572c26 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -32,23 +32,23 @@ class WhatsProt /** * Constant declarations. */ - const CONNECTED_STATUS = 'connected'; // Describes the connection status with the WhatsApp server. - const DISCONNECTED_STATUS = 'disconnected'; // Describes the connection status with the WhatsApp server. - const MEDIA_FOLDER = 'media'; // The relative folder to store received media files - const PICTURES_FOLDER = 'pictures'; // The relative folder to store picture files - const PORT = 443; // The port of the WhatsApp server. - const TIMEOUT_SEC = 2; // The timeout for the connection with the WhatsApp servers. - const TIMEOUT_USEC = 0; // - const WHATSAPP_CHECK_HOST = 'v.whatsapp.net/v2/exist'; // The check credentials host. - const WHATSAPP_GROUP_SERVER = 'g.us'; // The Group server hostname - const WHATSAPP_HOST = 'c.whatsapp.net'; // The hostname of the WhatsApp server. - const WHATSAPP_REGISTER_HOST = 'v.whatsapp.net/v2/register'; // The register code host. - const WHATSAPP_REQUEST_HOST = 'v.whatsapp.net/v2/code'; // The request code host. - const WHATSAPP_SERVER = 's.whatsapp.net'; // The hostname used to login/send messages. - const WHATSAPP_UPLOAD_HOST = 'https://mms.whatsapp.net/client/iphone/upload.php'; // The upload host. - const WHATSAPP_DEVICE = 'iPhone'; // The device name. - const WHATSAPP_VER = '2.11.14'; // The WhatsApp version. - const WHATSAPP_USER_AGENT = 'WhatsApp/2.12.61 S40Version/14.26 Device/Nokia302'; // User agent used in request/registration code. + const CONNECTED_STATUS = 'connected'; // Describes the connection status with the WhatsApp server. + const DISCONNECTED_STATUS = 'disconnected'; // Describes the connection status with the WhatsApp server. + const MEDIA_FOLDER = 'media'; // The relative folder to store received media files + const PICTURES_FOLDER = 'pictures'; // The relative folder to store picture files + const PORT = 443; // The port of the WhatsApp server. + const TIMEOUT_SEC = 2; // The timeout for the connection with the WhatsApp servers. + const TIMEOUT_USEC = 0; + const WHATSAPP_CHECK_HOST = 'v.whatsapp.net/v2/exist'; // The check credentials host. + const WHATSAPP_GROUP_SERVER = 'g.us'; // The Group server hostname + const WHATSAPP_HOST = 'c.whatsapp.net'; // The hostname of the WhatsApp server. + const WHATSAPP_REGISTER_HOST = 'v.whatsapp.net/v2/register'; // The register code host. + const WHATSAPP_REQUEST_HOST = 'v.whatsapp.net/v2/code'; // The request code host. + const WHATSAPP_SERVER = 's.whatsapp.net'; // The hostname used to login/send messages. + const WHATSAPP_UPLOAD_HOST = 'https://mms.whatsapp.net/client/iphone/upload.php'; // The upload host. + const WHATSAPP_DEVICE = 'iPhone'; // The device name. + const WHATSAPP_VER = '2.11.14'; // The WhatsApp version. + const WHATSAPP_USER_AGENT = 'WhatsApp/2.12.61 S40Version/14.26 Device/Nokia302'; // User agent used in request/registration code. const WHATSAPP_VER_CHECKER = 'https://coderus.openrepos.net/whitesoft/whatsapp_version'; // Check WhatsApp version /** From 09fc457c0554b35aca913f0dfea2b327224e73e6 Mon Sep 17 00:00:00 2001 From: ducch Date: Sat, 21 Feb 2015 20:38:36 +0200 Subject: [PATCH 249/436] apply PSR-1/PSR-2 standards --- src/whatsprot.class.php | 46 +++++++++++++++++++++-------------------- 1 file changed, 24 insertions(+), 22 deletions(-) diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index b0572c26..f06d6315 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -873,7 +873,7 @@ public function sendGetGroupV2Info($groupID) $queryNode = new ProtocolNode("query", array( "request" => "interactive" - ),null, null); + ), null, null); $node = new ProtocolNode("iq", array( @@ -1269,15 +1269,16 @@ public function sendGetHasVoipEnabled($jids) */ public function sendGetStatuses($jids) { - if (!is_array($jids)) - { + if (!is_array($jids)) { $jids = array($jids); } + $children = array(); foreach ($jids as $jid) { $children[] = new ProtocolNode("user", array("jid" => $this->getJID($jid)), null, null); } + $node = new ProtocolNode("iq", array( "to" => "s.whatsapp.net", @@ -1307,8 +1308,8 @@ public function sendGroupsChatCreate($subject, $participants) if (!is_array($participants)) { $participants = array($participants); } - foreach ($participants as $participant) - { + + foreach ($participants as $participant) { $participantNode[] = new ProtocolNode("participant", array( "jid" => $this->getJID($participant) ), null, null); @@ -1408,6 +1409,7 @@ public function sendGroupsLeave($gjids) if (!is_array($gjids)) { $gjids = array($this->getJID($gjids)); } + $nodes = array(); foreach ($gjids as $gjid) { $nodes[] = new ProtocolNode("group", @@ -1415,6 +1417,7 @@ public function sendGroupsLeave($gjids) "id" => $this->getJID($gjid) ), null, null); } + $leave = new ProtocolNode("leave", array( 'action'=>'delete' @@ -1600,12 +1603,10 @@ public function sendMessageRead($to, $id) */ public function sendMessageAudio($to, $filepath, $storeURLmedia = false, $fsize = 0, $fhash = "") { - if ($fsize==0 || $fhash == "") - { + if ($fsize == 0 || $fhash == "") { $allowedExtensions = array('3gp', 'caf', 'wav', 'mp3', 'wma', 'ogg', 'aif', 'aac', 'm4a'); $size = 10 * 1024 * 1024; // Easy way to set maximum file size for this media type. return $this->sendCheckAndSendMedia($filepath, $size, $to, 'audio', $allowedExtensions, $storeURLmedia); - } else { $this->sendRequestFileUpload($fhash, 'audio', $fsize, $filepath, $to); return true; @@ -1637,8 +1638,7 @@ public function sendMessageComposing($to) public function sendMessageImage($to, $filepath, $storeURLmedia = false, $fsize = 0, $fhash = "", $caption = "") { $caption = $this->parseMessageForEmojis($caption); - if ($fsize==0 || $fhash == "") - { + if ($fsize == 0 || $fhash == "") { $allowedExtensions = array('jpg', 'jpeg', 'gif', 'png'); $size = 5 * 1024 * 1024; // Easy way to set maximum file size for this media type. return $this->sendCheckAndSendMedia($filepath, $size, $to, 'image', $allowedExtensions, $storeURLmedia, $caption); @@ -1727,14 +1727,12 @@ protected function sendChatState($to, $state) public function sendMessageVideo($to, $filepath, $storeURLmedia = false, $fsize = 0, $fhash = "", $caption = "") { $caption = $this->parseMessageForEmojis($caption); - if ($fsize==0 || $fhash == "") - { + + if ($fsize == 0 || $fhash == "") { $allowedExtensions = array('3gp', 'mp4', 'mov', 'avi'); $size = 20 * 1024 * 1024; // Easy way to set maximum file size for this media type. return $this->sendCheckAndSendMedia($filepath, $size, $to, 'video', $allowedExtensions, $storeURLmedia, $caption); - } - else - { + } else { $this->sendRequestFileUpload($fhash, 'video', $fsize, $filepath, $to, $caption); return true; } @@ -1790,11 +1788,11 @@ public function sendPong($msgid) public function sendAvailableForChat($nickname = null) { $presence = array(); - if ($nickname) - { + if ($nickname) { //update nickname $this->name = $nickname; } + $presence['name'] = $this->name; $node = new ProtocolNode("presence", $presence, null, ""); $this->sendNode($node); @@ -1867,6 +1865,7 @@ public function sendSetPrivacyBlockedList($blockedJids = array()) if (!is_array($blockedJids)) { $blockedJids = array($blockedJids); } + $items = array(); foreach ($blockedJids as $index => $jid) { $item = new ProtocolNode("item", @@ -1878,6 +1877,7 @@ public function sendSetPrivacyBlockedList($blockedJids = array()) ), null, null); $items[] = $item; } + $child = new ProtocolNode("list", array( "name" => "default" @@ -2047,6 +2047,7 @@ public function setNewMessageBind($bind) public function uploadFile($file) { $data['file'] = "@" . $file; + $ch = curl_init(); curl_setopt($ch, CURLOPT_HEADER, 0); curl_setopt($ch, CURLOPT_HTTPHEADER, array('Expect:')); @@ -2285,14 +2286,15 @@ protected function detectMnc ($lc, $carrierName) $mnc = null; while ($data = fgetcsv($fp, 0, ',')) { - if (($data[4] === $lc) && ($data[7] === $carrierName)) { + if ($data[4] === $lc && $data[7] === $carrierName) { $mnc = $data[2]; break; } } - if ($mnc == null) + if ($mnc == null) { $mnc = '000'; + } fclose($fp); @@ -2306,8 +2308,7 @@ protected function detectMnc ($lc, $carrierName) */ protected function doLogin() { - if ($this->isLoggedIn()) - { + if ($this->isLoggedIn()) { return true; } @@ -2935,12 +2936,13 @@ protected function processInboundDataNode(ProtocolNode $node, $autoReceipt = tru if ($node->getTag() == "presence" && $node->getAttribute("status") == "dirty") { //clear dirty $categories = array(); - if (count($node->getChildren()) > 0) + if (count($node->getChildren()) > 0) { foreach ($node->getChildren() as $child) { if ($child->getTag() == "category") { $categories[] = $child->getAttribute("name"); } } + } $this->sendClearDirty($categories); } if (strcmp($node->getTag(), "presence") == 0 From d4cb95d16a5ca78fdcfb1942428e59bb7db568d4 Mon Sep 17 00:00:00 2001 From: ducch Date: Sun, 22 Feb 2015 01:17:29 +0200 Subject: [PATCH 250/436] apply PSR-1/PSR-2 standards --- src/whatsprot.class.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index f06d6315..d4587db7 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -449,7 +449,6 @@ public function connect() } if ($socket !== false) { - socket_set_option($socket, SOL_SOCKET, SO_RCVTIMEO, array('sec' => static::TIMEOUT_SEC, 'usec' => static::TIMEOUT_USEC)); socket_set_option($socket, SOL_SOCKET, SO_SNDTIMEO, array('sec' => static::TIMEOUT_SEC, 'usec' => static::TIMEOUT_USEC)); @@ -483,7 +482,6 @@ public function isConnected() return ($this->socket !== null); } - /** * Disconnect from the WhatsApp network. */ @@ -2280,7 +2278,7 @@ protected function dissectPhone() * * Returns mnc value */ - protected function detectMnc ($lc, $carrierName) + protected function detectMnc($lc, $carrierName) { $fp = fopen(__DIR__ . DIRECTORY_SEPARATOR . 'networkinfo.csv', 'r'); $mnc = null; From 3c0fc947fb0b4e21eedad07c1014168d8be6f3b5 Mon Sep 17 00:00:00 2001 From: ducch Date: Sun, 22 Feb 2015 01:20:12 +0200 Subject: [PATCH 251/436] fix typos --- src/whatsprot.class.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index d4587db7..00b8371b 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -624,7 +624,7 @@ public function sendGetCipherKeysFromUser($number) /** * Send a Broadcast Message with audio. * - * The receiptiant MUST have your number (synced) and in their contact list + * The recipients MUST have your number (synced) and in their contact list * otherwise the message will not deliver to that person. * * Approx 20 (unverified) is the maximum number of targets @@ -646,7 +646,7 @@ public function sendBroadcastAudio($targets, $path, $storeURLmedia = false, $fsi /** * Send a Broadcast Message with an image. * - * The receiptiant MUST have your number (synced) and in their contact list + * The recipients MUST have your number (synced) and in their contact list * otherwise the message will not deliver to that person. * * Approx 20 (unverified) is the maximum number of targets @@ -669,7 +669,7 @@ public function sendBroadcastImage($targets, $path, $storeURLmedia = false, $fsi /** * Send a Broadcast Message with location data. * - * The receiptiant MUST have your number (synced) and in their contact list + * The recipients MUST have your number (synced) and in their contact list * otherwise the message will not deliver to that person. * * If no name is supplied , receiver will see large sized google map @@ -696,7 +696,7 @@ public function sendBroadcastLocation($targets, $long, $lat, $name = null, $url /** * Send a Broadcast Message * - * The receiptiant MUST have your number (synced) and in their contact list + * The recipients MUST have your number (synced) and in their contact list * otherwise the message will not deliver to that person. * * Approx 20 (unverified) is the maximum number of targets @@ -714,7 +714,7 @@ public function sendBroadcastMessage($targets, $message) /** * Send a Broadcast Message with a video. * - * The receiptiant MUST have your number (synced) and in their contact list + * The recipients MUST have your number (synced) and in their contact list * otherwise the message will not deliver to that person. * * Approx 20 (unverified) is the maximum number of targets From c742e407b7e2520d91e1090a5e2b99f2c254fff7 Mon Sep 17 00:00:00 2001 From: ducch Date: Sat, 21 Feb 2015 18:55:37 +0200 Subject: [PATCH 252/436] add missing phpdoc arguments --- src/whatsprot.class.php | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index 00b8371b..a5a89644 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -114,7 +114,7 @@ public function __construct($number, $identity, $nickname, $debug = false) } /** - * If you need use diferent challenge fileName you can use this + * If you need use different challenge fileName you can use this * * @param string $filename */ @@ -125,6 +125,7 @@ public function setChallengeName($filename) /** * Add message to the outgoing queue. + * * @param $node */ public function addMsgOutQueue($node) @@ -412,6 +413,7 @@ public function codeRequest($method = 'sms', $carrier = "T-Mobile5", $countryCod /** * Connect (create a socket) to the WhatsApp network. + * * @return bool */ public function connect() @@ -474,7 +476,8 @@ public function connect() } /** - * Do we have an active socket connection to whatsapp? + * Do we have an active socket connection to WhatsApp? + * * @return bool */ public function isConnected() @@ -522,7 +525,7 @@ public function getMessages() } /** - * Log into the Whatsapp server. + * Log into the WhatsApp server. * * ###Warning### using this method will generate a new password * from the WhatsApp servers each time. @@ -541,7 +544,7 @@ public function login() } /** - * Login to the Whatsapp server with your password + * Login to the WhatsApp server with your password * * If you already know your password you can log into the Whatsapp server * using this method. @@ -564,6 +567,8 @@ public function loginWithPassword($password) * Fetch a single message node * @param bool $autoReceipt * @return bool + * + * @throws Exception */ public function pollMessage($autoReceipt = true, $type = "read") { @@ -2623,6 +2628,7 @@ protected function processChallenge($node) * * @param $data * @param bool $autoReceipt + * @param $type * @throws Exception */ protected function processInboundData($data, $autoReceipt = true, $type = "read") @@ -2639,6 +2645,7 @@ protected function processInboundData($data, $autoReceipt = true, $type = "read" * This also provides a convenient method to use to unit test the event framework. * @param ProtocolNode $node * @param bool $autoReceipt + * @param $type * @throws Exception */ protected function processInboundDataNode(ProtocolNode $node, $autoReceipt = true, $type = "read") { @@ -3905,7 +3912,8 @@ protected function sendMessageNode($to, $node, $id = null) * Tell the server we received the message. * * @param ProtocolNode $msg The ProtocolTreeNode that contains the message. - * @param null $type + * @param string $type + * @param string $participant */ protected function sendMessageReceived($msg, $type = "read", $participant = null) { From 822badd0b90d109c2fd47653ae55290401aaca19 Mon Sep 17 00:00:00 2001 From: ducch Date: Sun, 22 Feb 2015 03:11:52 +0200 Subject: [PATCH 253/436] complete phpdoc details --- src/whatsprot.class.php | 260 +++++++++++++++++----------------------- 1 file changed, 112 insertions(+), 148 deletions(-) diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index a5a89644..eef24ac3 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -565,7 +565,8 @@ public function loginWithPassword($password) /** * Fetch a single message node - * @param bool $autoReceipt + * @param bool $autoReceipt + * @param string $type * @return bool * * @throws Exception @@ -853,8 +854,7 @@ public function sendChangeNumber($number, $identity) } /** - * Send a request to return a list of groups user is currently participating - * in. + * Send a request to return a list of groups user is currently participating in. * * To capture this list you will need to bind the "onGetGroups" event. */ @@ -864,7 +864,7 @@ public function sendGetGroups() } /** - * Send a request to get new Groups V2 info + * Send a request to get new Groups V2 info. * * @param $groupID * The group JID @@ -890,8 +890,7 @@ public function sendGetGroupV2Info($groupID) } /** - * Send a request to return a list of groups user has started - * in. + * Send a request to return a list of groups user has started in. * * To capture this list you will need to bind the "onGetGroups" event. */ @@ -901,7 +900,7 @@ public function sendGetGroupsOwning() } /** - * Send a request to get a list of people you have currently blocked + * Send a request to get a list of people you have currently blocked. */ public function sendGetPrivacyBlockedList() { @@ -924,7 +923,7 @@ public function sendGetPrivacyBlockedList() } /** - * Send a request to get privacy settings + * Send a request to get privacy settings. */ public function sendGetPrivacySettings() { @@ -943,8 +942,7 @@ public function sendGetPrivacySettings() } /** - * Set privacy of 'last seen', status or profile picture - * to All, contacts or none + * Set privacy of 'last seen', status or profile picture to all, contacts or none. * * @param string $category * Options: 'last', 'status' or 'profile' @@ -974,11 +972,10 @@ public function sendSetPrivacySettings($category, $value) } /** - * Get profile picture of specified user + * Get profile picture of specified user. * * @param string $number * Number or JID of user - * * @param bool $large * Request large picture */ @@ -1006,7 +1003,6 @@ public function sendGetProfilePicture($number, $large = false) } /** - * * @param string array $numbers * Numbers of your contacts */ @@ -1040,8 +1036,7 @@ public function sendGetProfilePhotoIds($numbers) /** * Request to retrieve the last online time of specific user. * - * @param string $to - * Number or JID of user + * @param string $to Number or JID of user */ public function sendGetRequestLastSeen($to) { @@ -1062,7 +1057,7 @@ public function sendGetRequestLastSeen($to) } /** - * Send a request to get the current server properties + * Send a request to get the current server properties. */ public function sendGetServerProperties() { @@ -1081,7 +1076,7 @@ public function sendGetServerProperties() } /** - * Send a request to get the current service pricing + * Send a request to get the current service pricing. * * @param string $lg * Language @@ -1109,7 +1104,7 @@ public function sendGetServicePricing($lg, $lc) } /** - * Send a request to extend the account + * Send a request to extend the account. */ public function sendExtendAccount() { @@ -1128,7 +1123,7 @@ public function sendExtendAccount() } /** - * Gets all the broadcast lists for an account + * Gets all the broadcast lists for an account. */ public function sendGetBroadcastLists() { @@ -1146,12 +1141,10 @@ public function sendGetBroadcastLists() } /** - * Send a request to get the normalized mobile number respresenting the JID + * Send a request to get the normalized mobile number representing the JID. * - * @param string $countryCode - * Country Code - * @param string $number - * Mobile Number + * @param string $countryCode Country Code + * @param string $number Mobile Number */ public function sendGetNormalizedJid($countryCode, $number) { @@ -1171,14 +1164,11 @@ public function sendGetNormalizedJid($countryCode, $number) } /** - * Removes an account from WhatsApp + * Removes an account from WhatsApp. * - * @param string $lg - * Language - * @param string $lc - * Country - * @param string $feedback - * User Feedback + * @param string $lg Language + * @param string $lc Country + * @param string $feedback User Feedback */ public function sendRemoveAccount($lg = null, $lc = null, $feedback = null) { @@ -1216,7 +1206,7 @@ public function sendRemoveAccount($lg = null, $lc = null, $feedback = null) } /** - * Send a ping to the server + * Send a ping to the server. */ public function sendPing() { @@ -1234,9 +1224,9 @@ public function sendPing() } /** - * Get VOIP info. of a number/s + * Get VOIP information of a number or numbers. * - * @param string $jids + * @param mixed $jids */ public function sendGetHasVoipEnabled($jids) { @@ -1268,7 +1258,7 @@ public function sendGetHasVoipEnabled($jids) /** * Get the current status message of a specific user. * - * @param string[] $jids The users' JIDs + * @param mixed $jids The users' JIDs */ public function sendGetStatuses($jids) { @@ -1347,12 +1337,10 @@ public function sendGroupsChatCreate($subject, $participants) } /** - * Change group subject + * Change group's subject. * - * @param string $gjid - * The group id - * @param string $subject - * The subject + * @param string $gjid The group id + * @param string $subject The subject */ public function sendSetGroupSubject($gjid, $subject) { @@ -1369,9 +1357,9 @@ public function sendSetGroupSubject($gjid, $subject) } /** - * End or delete a group chat + * End or delete a group chat. * - * @param string $gjid The group ID + * @param string $gjid The group's ID */ public function sendGroupsChatEnd($gjid) { @@ -1401,9 +1389,9 @@ public function sendGroupsChatEnd($gjid) } /** - * Leave a group chat + * Leave a group chat. * - * @param array $gjids An array of group IDs + * @param mixed $gjids Group or group's ID(s) */ public function sendGroupsLeave($gjids) { @@ -1441,10 +1429,8 @@ public function sendGroupsLeave($gjids) /** * Add participant(s) to a group. * - * @param string $groupId - * The group ID. - * @param array $participants - * An array with the participants numbers to add + * @param string $groupId The group ID. + * @param mixed $participants An array with the participants numbers to add */ public function sendGroupsParticipantsAdd($groupId, $participants) { @@ -1458,10 +1444,8 @@ public function sendGroupsParticipantsAdd($groupId, $participants) /** * Remove participant(s) from a group. * - * @param string $groupId - * The group ID. - * @param array $participants - * An array with the participants numbers to remove + * @param string $groupId The group ID. + * @param mixed $participants An array with the participants numbers to remove */ public function sendGroupsParticipantsRemove($groupId, $participants) { @@ -1473,11 +1457,10 @@ public function sendGroupsParticipantsRemove($groupId, $participants) } /** - * Promote participant(s) of a group - * Makes a participant admin of a group + * Promote participant(s) of a group; Make a participant an admin of a group. * * @param string $gId The group ID. - * @param array $participants An array with the participants numbers to promote + * @param mixed $participants An array with the participants numbers to promote */ public function sendPromoteParticipants($gId, $participants) { @@ -1489,8 +1472,7 @@ public function sendPromoteParticipants($gId, $participants) } /** - * Demote participant(s) of a group. - * Remove participant of being admin of a group. + * Demote participant(s) of a group; remove participant of being admin of a group. * * @param string $gId The group ID. * @param array $participants An array with the participants numbers to demote @@ -1505,8 +1487,7 @@ public function sendDemoteParticipants($gId, $participants) } /** - * Lock group: Paritipants cant change group subject or - * profile picture except admin + * Lock group: participants cant change group subject or profile picture except admin. * * @param string $gId The group ID. */ @@ -1527,8 +1508,7 @@ public function sendLockGroup($gId) } /** - * Unlock group: Any participant can change - * group subject or profile picture + * Unlock group: Any participant can change group subject or profile picture. * * * @param string $gId The group ID. @@ -1575,7 +1555,7 @@ public function sendMessage($to, $txt, $id = null) } /** - * Send a read receipt to a message + * Send a read receipt to a message. * * @param $to * The recipient. @@ -1619,8 +1599,7 @@ public function sendMessageAudio($to, $filepath, $storeURLmedia = false, $fsize /** * Send the composing message status. When typing a message. * - * @param string $to - * The recipient to send status to. + * @param string $to The recipient to send status to. */ public function sendMessageComposing($to) { @@ -1628,7 +1607,7 @@ public function sendMessageComposing($to) } /** - * Send an image file to group/user + * Send an image file to group/user. * * @param string $to Recipient number * @param string $filepath The url/uri to the image file. @@ -1657,13 +1636,13 @@ public function sendMessageImage($to, $filepath, $storeURLmedia = false, $fsize * If no name is supplied , receiver will see large sized google map * thumbnail of entered Lat/Long but NO name/url for location. * - * With name supplied, a combined map thumbnail/name box is displayed + * With name supplied, a combined map thumbnail/name box is displayed. * - * @param array|string $to The recipient(s) to send to. - * @param float $long The longitude of the location eg 54.31652 - * @param float $lat The latitude if the location eg -6.833496 - * @param string $name (Optional) The custom name you would like to give this location. - * @param string $url (Optional) A URL to attach to the location. + * @param mixed $to The recipient(s) to send to. + * @param float $long The longitude of the location eg 54.31652 + * @param float $lat The latitude if the location eg -6.833496 + * @param string $name (Optional) The custom name you would like to give this location. + * @param string $url (Optional) A URL to attach to the location. */ public function sendMessageLocation($to, $long, $lat, $name = null, $url = null) { @@ -1697,8 +1676,7 @@ public function sendMessageLocation($to, $long, $lat, $name = null, $url = null) /** * Send the 'paused composing message' status. * - * @param string $to - * The recipient number or ID. + * @param string $to The recipient number or ID. */ public function sendMessagePaused($to) { @@ -1768,8 +1746,7 @@ public function sendOfflineStatus() /** * Send a pong to the whatsapp server. I'm alive! * - * @param string $msgid - * The id of the message. + * @param string $msgid The id of the message. */ public function sendPong($msgid) { @@ -1804,8 +1781,7 @@ public function sendAvailableForChat($nickname = null) /** * Send presence status. * - * @param string $type - * The presence status. + * @param string $type The presence status. */ public function sendPresence($type = "active") { @@ -1826,8 +1802,7 @@ public function sendPresence($type = "active") /** * Send presence subscription, automatically receive presence updates as long as the socket is open. * - * @param string $to - * Phone number. + * @param string $to Phone number. */ public function sendPresenceSubscription($to) { @@ -1836,10 +1811,9 @@ public function sendPresenceSubscription($to) } /** - * Unsubscribe, will stop subscription + * Unsubscribe, will stop subscription. * - * @param string $to - * Phone number. + * @param string $to Phone number. */ public function sendPresenceUnsubscription($to) { @@ -1848,10 +1822,10 @@ public function sendPresenceUnsubscription($to) } /** - * Set the picture for the group + * Set the picture for the group. * - * @param string $gjid The groupID - * @param string $path The URL/URI of the image to use + * @param string $gjid The groupID + * @param string $path The URL/URI of the image to use */ public function sendSetGroupPicture($gjid, $path) { @@ -1861,7 +1835,7 @@ public function sendSetGroupPicture($gjid, $path) /** * Set the list of numbers you wish to block receiving from. * - * @param array $blockedJids Array of numbers to block messages from. + * @param mixed $blockedJids One or more numbers to block messages from. */ public function sendSetPrivacyBlockedList($blockedJids = array()) { @@ -1898,9 +1872,9 @@ public function sendSetPrivacyBlockedList($blockedJids = array()) } /** - * Set your profile picture + * Set your profile picture. * - * @param string $path URL/URI of image + * @param string $path URL/URI of image */ public function sendSetProfilePicture($path) { @@ -1908,7 +1882,7 @@ public function sendSetProfilePicture($path) } /* - * Removes the profile photo + * Removes the profile photo. */ public function sendRemoveProfilePicture() { @@ -1933,8 +1907,8 @@ public function sendRemoveProfilePicture() } /** - * Set the recovery token for your account to allow you to - * retrieve your password at a later stage. + * Set the recovery token for your account to allow you to retrieve your password at a later stage. + * * @param string $token A user generated token. */ public function sendSetRecoveryToken($token) @@ -1957,8 +1931,7 @@ public function sendSetRecoveryToken($token) /** * Update the user status. * - * @param string $txt - * The text of the message status to send. + * @param string $txt The text of the message status to send. */ public function sendStatusUpdate($txt) { @@ -1982,12 +1955,9 @@ public function sendStatusUpdate($txt) /** * Send a vCard to the user/group. * - * @param $to - * The recipient to send. - * @param $name - * The contact name. - * @param $vCard - * The contact vCard to send. + * @param string $to The recipient to send. + * @param string $name The contact name. + * @param object $vCard The contact vCard to send. */ public function sendVcard($to, $name, $vCard) { @@ -2007,12 +1977,9 @@ public function sendVcard($to, $name, $vCard) /** * Send a vCard to the user/group as Broadcast. * - * @param $targets - * Array of recipients to send. - * @param $name - * The vCard contact name. - * @param $vCard - * The contact vCard to send. + * @param array $targets An array of recipients to send to. + * @param string $name The vCard contact name. + * @param object $vCard The contact vCard to send. */ public function sendBroadcastVcard($targets, $name, $vCard) { @@ -2031,6 +1998,7 @@ public function sendBroadcastVcard($targets, $name, $vCard) /** * Sets the bind of the new message. + * * @param $bind */ public function setNewMessageBind($bind) @@ -2041,11 +2009,9 @@ public function setNewMessageBind($bind) /** * Upload file to WhatsApp servers. * - * @param $file - * The uri of the file. + * @param string $file The uri of the file. * - * @return string|bool - * Return the remote url or false on failure. + * @return string|bool Return the remote url or false on failure. */ public function uploadFile($file) { @@ -2083,9 +2049,9 @@ public function uploadFile($file) } /** - * Wait for Whatsapp server to acknowledge *it* has received message. - * @param string $id The id of the node sent that we are awaiting acknowledgement of. - * @param int $timeout + * Wait for WhatsApp server to acknowledge *it* has received message. + * @param string $id The id of the node sent that we are awaiting acknowledgement of. + * @param int $timeout */ public function waitForServer($id, $timeout = 5) { @@ -2097,10 +2063,9 @@ public function waitForServer($id, $timeout = 5) } /** - * Authenticate with the Whatsapp Server. + * Authenticate with the WhatsApp Server. * - * @return String - * Returns binary string + * @return string Returns binary string */ protected function authenticate() { @@ -2115,8 +2080,7 @@ protected function authenticate() /** * Add the authentication nodes. * - * @return ProtocolNode - * Return itself. + * @return ProtocolNode Returns itself. */ protected function createAuthNode() { @@ -2194,9 +2158,8 @@ protected function createMsgId($prefix) /** * Print a message to the debug console. * - * @param mixed $debugMsg - * The debug message. - * @return string + * @param mixed $debugMsg The debug message. + * @return bool */ protected function debugPrint($debugMsg) { @@ -2275,10 +2238,10 @@ protected function dissectPhone() } /** - * Detects mnc from specified carrier + * Detects mnc from specified carrier. * - * @param $lc LangCode - * @param $carrierName Name of the carrier + * @param string $lc LangCode + * @param string $carrierName Name of the carrier * @return string * * Returns mnc value @@ -2305,7 +2268,7 @@ protected function detectMnc($lc, $carrierName) } /** - * Send the nodes to the Whatsapp server to log in. + * Send the nodes to the WhatsApp server to log in. * * @throws Exception */ @@ -2350,6 +2313,7 @@ protected function doLogin() /** * Have we an active connection with WhatsAPP AND a valid login already? + * * @return bool */ protected function isLoggedIn(){ @@ -2504,10 +2468,8 @@ protected function getJID($number) /** * Retrieves media file and info from either a URL or localpath * - * @param $filepath - * The URL or path to the mediafile you wish to send - * @param $maxsizebytes - * The maximum size in bytes the media file can be. Default 1MB + * @param string $filepath The URL or path to the mediafile you wish to send + * @param integer $maxsizebytes The maximum size in bytes the media file can be. Default 1MB * * @return bool false if file information can not be obtained. */ @@ -2582,8 +2544,8 @@ protected function getMediaFile($filepath, $maxsizebytes = 1048576) * Get a decoded JSON response from Whatsapp server * * @param string $host The host URL - * @param array $query A associative array of keys and values to send to server. - * @return object NULL is returned if the json cannot be decoded or if the encoded data is deeper than the recursion limit + * @param array $query A associative array of keys and values to send to server. + * @return null|object NULL if the json cannot be decoded or if the encoded data is deeper than the recursion limit */ protected function getResponse($host, $query) { @@ -2614,9 +2576,7 @@ protected function getResponse($host, $query) /** * Process the challenge. * - * - * @param ProtocolNode $node - * The node that contains the challenge. + * @param ProtocolNode $node The node that contains the challenge. */ protected function processChallenge($node) { @@ -2629,6 +2589,7 @@ protected function processChallenge($node) * @param $data * @param bool $autoReceipt * @param $type + * * @throws Exception */ protected function processInboundData($data, $autoReceipt = true, $type = "read") @@ -2646,6 +2607,7 @@ protected function processInboundData($data, $autoReceipt = true, $type = "read" * @param ProtocolNode $node * @param bool $autoReceipt * @param $type + * * @throws Exception */ protected function processInboundDataNode(ProtocolNode $node, $autoReceipt = true, $type = "read") { @@ -3480,10 +3442,9 @@ protected function sendNotificationAck($node) } /** - * Process and save media image + * Process and save media image. * - * @param ProtocolNode $node - * ProtocolNode containing media + * @param ProtocolNode $node ProtocolNode containing media */ protected function processMediaImage($node) { @@ -3511,10 +3472,9 @@ protected function processMediaImage($node) } /** - * Processes received picture node + * Processes received picture node. * - * @param ProtocolNode $node - * ProtocolNode containing the picture + * @param ProtocolNode $node ProtocolNode containing the picture */ protected function processProfilePicture($node) { @@ -3560,8 +3520,7 @@ protected function processTempMediaFile($storeURLmedia) /** * Process media upload response * - * @param ProtocolNode $node - * Message node + * @param ProtocolNode $node Message node * @return bool */ protected function processUploadResponse($node) @@ -3673,6 +3632,8 @@ protected function processUploadResponse($node) /** * Read 1024 bytes from the whatsapp server. + * + * @throws Exception */ public function readStanza() { @@ -3813,6 +3774,8 @@ protected function sendBroadcast($targets, $node, $type) /** * Send data to the whatsapp server. * @param string $data + * + * @throws Exception */ protected function sendData($data) { @@ -3880,7 +3843,8 @@ protected function sendGroupsChangeParticipants($groupId, $participants, $tag, $ * @param $to * @param ProtocolNode $node * @param null $id - * @return null|string + * + * @return string Message ID. */ protected function sendMessageNode($to, $node, $id = null) { @@ -3957,7 +3921,7 @@ protected function sendNode($node, $encrypt = true) * @param string $type File type * @param string $size File size * @param string $filepath Path to image file - * @param string $to Recipient + * @param mixed $to Recipient(s) * @param string $caption */ protected function sendRequestFileUpload($b64hash, $type, $size, $filepath, $to, $caption = "") @@ -3991,8 +3955,7 @@ protected function sendRequestFileUpload($b64hash, $type, $size, $filepath, $to, * Set your profile picture * * @param string $jid - * @param string $filepath - * URL or localpath to image file + * @param string $filepath URL or localpath to image file */ protected function sendSetPicture($jid, $filepath) { @@ -4032,8 +3995,7 @@ protected function sendSetPicture($jid, $filepath) * with an underscore. * * - * @param string $txt - * The message to be parsed for emoji code. + * @param string $txt The message to be parsed for emoji code. * * @return string */ @@ -4053,7 +4015,8 @@ private function parseMessageForEmojis($txt) /** * Creates the correct unicode character from the unicode code point * - * @param int $int + * @param integer $int + * * @return string */ private function unichr($int) @@ -4070,6 +4033,7 @@ private function unichr($int) /** * @param string $jid + * * @return string */ public static function parseJID($jid) From 670888ebbee2f3610313bbe2b332d4d4630e556b Mon Sep 17 00:00:00 2001 From: ducch Date: Sun, 22 Feb 2015 03:13:31 +0200 Subject: [PATCH 254/436] apply PSR-1/PSR-2 standards --- src/whatsprot.class.php | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index eef24ac3..c71852db 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -1267,8 +1267,7 @@ public function sendGetStatuses($jids) } $children = array(); - foreach ($jids as $jid) - { + foreach ($jids as $jid) { $children[] = new ProtocolNode("user", array("jid" => $this->getJID($jid)), null, null); } @@ -2777,9 +2776,7 @@ protected function processInboundDataNode(ProtocolNode $node, $autoReceipt = tru $node->getChild("media")->getAttribute('caption') )); } - } elseif ($node->getChild("media")->getAttribute('type') == 'video') { - if ($node->getAttribute("participant") == null) { $this->eventManager()->fire("onGetVideo", array( @@ -3860,6 +3857,7 @@ protected function sendMessageNode($to, $node, $id = null) $messageNode = new ProtocolNode("message", $messageHash, array($node), ""); $this->sendNode($messageNode); + $this->eventManager()->fire("onSendMessage", array( $this->phoneNumber, @@ -3881,7 +3879,6 @@ protected function sendMessageNode($to, $node, $id = null) */ protected function sendMessageReceived($msg, $type = "read", $participant = null) { - $messageHash = array(); if ($type == "read") { $messageHash["type"] = $type; @@ -3892,6 +3889,7 @@ protected function sendMessageReceived($msg, $type = "read", $participant = null $messageHash["to"] = $msg->getAttribute("from"); $messageHash["id"] = $msg->getAttribute("id"); $messageHash["t"] = time(); + $messageNode = new ProtocolNode("receipt", $messageHash, null, null); $this->sendNode($messageNode); $this->eventManager()->fire("onSendMessageReceived", From f9ad4904e756f57d27b21edd45214c757a074130 Mon Sep 17 00:00:00 2001 From: ducch Date: Sun, 22 Feb 2015 03:14:37 +0200 Subject: [PATCH 255/436] improve readability --- src/whatsprot.class.php | 79 +++++++++++++++++++++++------------------ 1 file changed, 44 insertions(+), 35 deletions(-) diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index c71852db..55f0d066 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -3845,29 +3845,29 @@ protected function sendGroupsChangeParticipants($groupId, $participants, $tag, $ */ protected function sendMessageNode($to, $node, $id = null) { - $messageHash = array(); - $messageHash["to"] = $this->getJID($to); - if ($node->getTag() == "body") { - $messageHash["type"] = "text"; - } else { - $messageHash["type"] = "media"; - } - $messageHash["id"] = ($id == null?$this->createMsgId("message"):$id); - $messageHash["t"] = time(); + $msgId = ($id == null) ? $this->createMsgId("message") : $id; + $to = $this->getJID($to); + + $messageNode = new ProtocolNode("message", array( + 'to' => $to, + 'type' => ($node->getTag() == "body") ? 'text' : 'media', + 'id' => $msgId, + 't' => time() + ), array($node), ""); - $messageNode = new ProtocolNode("message", $messageHash, array($node), ""); $this->sendNode($messageNode); $this->eventManager()->fire("onSendMessage", array( $this->phoneNumber, - $this->getJID($to), - $messageHash["id"], + $to, + $msgId, $node )); - $this->waitForServer($messageHash["id"]); - return $messageHash["id"]; + $this->waitForServer($msgId); + + return $msgId; } /** @@ -3924,29 +3924,37 @@ protected function sendNode($node, $encrypt = true) */ protected function sendRequestFileUpload($b64hash, $type, $size, $filepath, $to, $caption = "") { - $hash = array(); - $hash["hash"] = $b64hash; - $hash["type"] = $type; - $hash["size"] = $size; - $mediaNode = new ProtocolNode("media", $hash, null, null); - - $hash = array(); $id = $this->createMsgId("upload"); - $hash["id"] = $id; - $hash["to"] = static::WHATSAPP_SERVER; - $hash["type"] = "set"; - $hash["xmlns"] = "w:m"; - $node = new ProtocolNode("iq", $hash, array($mediaNode), null); if (!is_array($to)) { $to = $this->getJID($to); } + + $mediaNode = new ProtocolNode("media", array( + 'hash' => $b64hash, + 'type' => $type, + 'size' => $size + ), null, null); + + $node = new ProtocolNode("iq", array( + 'id' => $id, + 'to' => static::WHATSAPP_SERVER, + 'type' => 'set', + 'xmlns' => 'w:m' + ), array($mediaNode), null); + //add to queue $messageId = $this->createMsgId("message"); - $this->mediaQueue[$id] = array("messageNode" => $node, "filePath" => $filepath, "to" => $to, "message_id" => $messageId, "caption" => $caption); + $this->mediaQueue[$id] = array( + "messageNode" => $node, + "filePath" => $filepath, + "to" => $to, + "message_id" => $messageId, + "caption" => $caption + ); $this->sendNode($node); - $this->waitForServer($hash["id"]); + $this->waitForServer($id); } /** @@ -3957,19 +3965,20 @@ protected function sendRequestFileUpload($b64hash, $type, $size, $filepath, $to, */ protected function sendSetPicture($jid, $filepath) { + $nodeID = $this->createMsgId("setphoto"); + $data = preprocessProfilePicture($filepath); $preview = createIconGD($filepath, 96, true); $picture = new ProtocolNode("picture", array("type" => "image"), null, $data); $preview = new ProtocolNode("picture", array("type" => "preview"), null, $preview); - $hash = array(); - $nodeID = $this->createMsgId("setphoto"); - $hash["id"] = $nodeID; - $hash["to"] = $this->getJID($jid); - $hash["type"] = "set"; - $hash["xmlns"] = "w:profile:picture"; - $node = new ProtocolNode("iq", $hash, array($picture, $preview), null); + $node = new ProtocolNode("iq", array( + 'id' => $nodeID, + 'to' => $this->getJID($jid), + 'type' => 'set', + 'xmlns' => 'w:profile:picture' + ), array($picture, $preview), null); $this->sendNode($node); $this->waitForServer($nodeID); From b3eddbc4ff27401224b323a0801f06e092878a2e Mon Sep 17 00:00:00 2001 From: ducch Date: Sun, 22 Feb 2015 03:15:26 +0200 Subject: [PATCH 256/436] newline is not needed as debugPrint() uses var_dump() --- src/whatsprot.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index 55f0d066..6f571b8b 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -3908,7 +3908,7 @@ protected function sendMessageReceived($msg, $type = "read", $participant = null */ protected function sendNode($node, $encrypt = true) { - $this->debugPrint($node->nodeString("tx ") . "\n"); + $this->debugPrint($node->nodeString("tx ")); $this->sendData($this->writer->write($node, $encrypt)); } From 4f841f0dbae847fa30113aee9c5843a9ebb66a68 Mon Sep 17 00:00:00 2001 From: ducch Date: Sun, 22 Feb 2015 03:17:53 +0200 Subject: [PATCH 257/436] don't expect parameters that aren't being considered --- src/whatsprot.class.php | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index 6f571b8b..45f778b7 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -292,12 +292,8 @@ public function codeRegister($code) /** * Request a registration code from WhatsApp. * - * @param string $method - * Accepts only 'sms' or 'voice' as a value. - * @param string $countryCode - * ISO Country Code, 2 Digit. - * @param string $langCode - * ISO 639-1 Language Code: two-letter codes. + * @param string $method Accepts only 'sms' or 'voice' as a value. + * @param string $carrier * * @return object * An object with server response. @@ -310,7 +306,7 @@ public function codeRegister($code) * * @throws Exception */ - public function codeRequest($method = 'sms', $carrier = "T-Mobile5", $countryCode = null, $langCode = null) + public function codeRequest($method = 'sms', $carrier = "T-Mobile5") { if (!$phone = $this->dissectPhone()) { throw new Exception('The provided phone number is not valid.'); From a5b7134bb2e9a6d2bd778adbf6d4b2c9d6f50c07 Mon Sep 17 00:00:00 2001 From: ducch Date: Sun, 22 Feb 2015 03:18:59 +0200 Subject: [PATCH 258/436] comment out unused variable --- src/whatsprot.class.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index 45f778b7..60fac644 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -424,7 +424,7 @@ public function connect() return true; } - $WAver = trim(file_get_contents(static::WHATSAPP_VER_CHECKER)); + //$WAver = trim(file_get_contents(static::WHATSAPP_VER_CHECKER)); //$WAverS = str_replace(".","",$WAver); //$ver = str_replace(".","",static::WHATSAPP_VER); @@ -3658,9 +3658,9 @@ public function readStanza() //read full length $buff = socket_read($this->socket, $treeLength); - $trlen = $treeLength; + //$trlen = $treeLength; $len = strlen($buff); - $prev = 0; + //$prev = 0; while (strlen($buff) < $treeLength) { $toRead = $treeLength - strlen($buff); $buff .= socket_read($this->socket, $toRead); From 05da97e1185ce6abaaf17ddf52c3b77a6ec48b4c Mon Sep 17 00:00:00 2001 From: ducch Date: Sun, 22 Feb 2015 03:24:19 +0200 Subject: [PATCH 259/436] deal with theoretical situation in which an empty is provided --- src/whatsprot.class.php | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index 60fac644..2787e538 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -999,8 +999,8 @@ public function sendGetProfilePicture($number, $large = false) } /** - * @param string array $numbers - * Numbers of your contacts + * @param mixed $numbers Numbers to get profile profile photos of. + * @return bool */ public function sendGetProfilePhotoIds($numbers) { @@ -1010,6 +1010,7 @@ public function sendGetProfilePhotoIds($numbers) $msgId = $this->createMsgId("get_picture_ids"); + $userNode = array(); for ($i=0; $i < count($numbers); $i++) { $userNode[$i] = new ProtocolNode("user", array( @@ -1017,6 +1018,10 @@ public function sendGetProfilePhotoIds($numbers) ), null, null); } + if (!sizeof($userNode)) { + return false; + } + $listNode = new ProtocolNode("list", null, $userNode, null); $iqNode = new ProtocolNode("iq", @@ -1027,6 +1032,8 @@ public function sendGetProfilePhotoIds($numbers) ), array($listNode), null); $this->sendNode($iqNode); + + return true; } /** @@ -1297,6 +1304,7 @@ public function sendGroupsChatCreate($subject, $participants) $participants = array($participants); } + $participantNode = array(); foreach ($participants as $participant) { $participantNode[] = new ProtocolNode("participant", array( "jid" => $this->getJID($participant) From 56b173f5c28f14474075a87fb63206c5edf60a64 Mon Sep 17 00:00:00 2001 From: ducch Date: Sun, 22 Feb 2015 04:41:25 +0200 Subject: [PATCH 260/436] fix incorrect logic --- src/whatsprot.class.php | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index 2787e538..c5f87950 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -2304,14 +2304,16 @@ protected function doLogin() } if ($this->loginStatus === static::DISCONNECTED_STATUS) { - $this->eventManager()->fire("onLogin", - array( - $this->phoneNumber - )); - $this->sendAvailableForChat(); + throw new Exception('Login Failure'); } - throw new Exception('Login Failure'); + $this->eventManager()->fire("onLogin", + array( + $this->phoneNumber + )); + $this->sendAvailableForChat(); + + return true; } /** From 0907d2e209c054c237ae58f0563d5ef37fa98b43 Mon Sep 17 00:00:00 2001 From: mgp25 Date: Sun, 22 Feb 2015 10:13:46 +0100 Subject: [PATCH 261/436] updated debug without var_dump --- src/whatsprot.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index c5f87950..0b006fd8 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -2167,7 +2167,7 @@ protected function createMsgId($prefix) protected function debugPrint($debugMsg) { if ($this->debug) { - var_dump($debugMsg); + echo $debugMsg; return true; } @@ -3914,7 +3914,7 @@ protected function sendMessageReceived($msg, $type = "read", $participant = null */ protected function sendNode($node, $encrypt = true) { - $this->debugPrint($node->nodeString("tx ")); + $this->debugPrint($node->nodeString("tx ") . "\n"); $this->sendData($this->writer->write($node, $encrypt)); } From 420bfb4d1c1dd4ad118dd41d5b305217b0f73931 Mon Sep 17 00:00:00 2001 From: mgp25 Date: Mon, 23 Feb 2015 00:24:10 +0100 Subject: [PATCH 262/436] apply PSR-1/PSR-2 standards + fix typos Completed PHPDoc details --- src/vCard.php | 25 ++++++++++++++----------- src/whatsprot.class.php | 12 +++++------- 2 files changed, 19 insertions(+), 18 deletions(-) diff --git a/src/vCard.php b/src/vCard.php index 44f2b40b..a3bdc4bb 100755 --- a/src/vCard.php +++ b/src/vCard.php @@ -5,7 +5,6 @@ */ class vCard { - // An array of this vCard's contact data. protected $data; // Filename for download file naming. @@ -99,22 +98,22 @@ public function set($key, $value) */ function build() { - if ( ! $this->class) { + if (!$this->class) { $this->class = 'PUBLIC'; } - if ( ! $this->data['display_name']) { + if (!$this->data['display_name']) { $this->data['display_name'] = $this->data['first_name'] . ' ' . $this->data['last_name']; } - if ( ! $this->data['sort_string']) { + if (!$this->data['sort_string']) { $this->data['sort_string'] = $this->data['last_name']; } - if ( ! $this->data['sort_string']) { + if (!$this->data['sort_string']) { $this->data['sort_string'] = $this->data['company']; } - if ( ! $this->data['timezone']) { + if (!$this->data['timezone']) { $this->data['timezone'] = date("O"); } - if ( ! $this->revisionDate) { + if (!$this->revisionDate) { $this->revisionDate = date('Y-m-d H:i:s'); } @@ -226,14 +225,16 @@ protected function generatePhotoData() /** * Streams the vcard to the browser client. + * + * @return bool */ function download() { - if ( ! $this->card) { + if (!$this->card) { $this->build(); } - if ( ! $this->filename) { + if (!$this->filename) { $this->filename = $this->data['display_name']; } @@ -248,11 +249,13 @@ function download() } /** - * Show the vcard. + * Show the vCard. + * + * @return object vCard */ function show() { - if ( ! $this->card) { + if (!$this->card) { $this->build(); } diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index 0b006fd8..b995a2ca 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -2349,11 +2349,9 @@ protected function buildIdentity($identity) protected function checkIdentity($identity) { - if (file_exists($identity.".dat")) - { + if (file_exists($identity.".dat")) { $id = strlen(urldecode(file_get_contents($identity.'.dat'))); - if ($id == 20 || $id == 16) - { + if ($id == 20 || $id == 16) { return true; } } @@ -3700,7 +3698,7 @@ public function readStanza() * Checks that the media file to send is of allowable filetype and within size limits. * * @param string $filepath The URL/URI to the media file - * @param int $maxSize Maximim filesize allowed for media type + * @param int $maxSize Maximum filesize allowed for media type * @param string $to Recipient ID/number * @param string $type media filetype. 'audio', 'video', 'image' * @param array $allowedExtensions An array of allowable file types for the media file @@ -3775,7 +3773,7 @@ protected function sendBroadcast($targets, $node, $type) } /** - * Send data to the whatsapp server. + * Send data to the WhatsApp server. * @param string $data * * @throws Exception @@ -3791,7 +3789,7 @@ protected function sendData($data) } /** - * Send the getGroupList request to Whatsapp + * Send the getGroupList request to WhatsApp * @param string $type Type of list of groups to retrieve. "owning" or "participating" */ protected function sendGetGroupsFiltered($type) From 77272e3218a75932d816a9756ab6cd47fa5e4337 Mon Sep 17 00:00:00 2001 From: mgp25 Date: Mon, 23 Feb 2015 00:25:31 +0100 Subject: [PATCH 263/436] remove redundant variable declaration and improve readability --- src/func.php | 38 +++++++++++++++----------------------- src/protocol.class.php | 12 +++--------- 2 files changed, 18 insertions(+), 32 deletions(-) diff --git a/src/func.php b/src/func.php index 189beec9..9e513038 100755 --- a/src/func.php +++ b/src/func.php @@ -157,13 +157,13 @@ function createVideoIcon($file) function checkFFMPEG() { - //check if ffmpeg is intalled - $cmd = "ffmpeg -version"; - $res = exec($cmd, $output, $returnvalue); - if ($returnvalue == 0) { - return true; - } - return false; + //check if ffmpeg is installed. + $output = array(); + $returnvalue = false; + + exec('ffmpeg -version', $output, $returnvalue); + + return ($returnvalue === 0); } function giftThumbnail() @@ -203,26 +203,18 @@ function updateData($nameFile, $WAver, $classesMD5 = "") /** * This function generates a paymentLink where you can extend the account-expiration. * - * @param string $number - * Your number with international code, e.g. 49123456789 - * @param int $sku - * The Time in years (1, 3 or 5) you want to extend the account-expiration. - * - * @return string - * Returns the link. + * @param string $number Your number with international code, e.g. 49123456789 + * @param int $sku The Time in years (1, 3 or 5) you want to extend the account-expiration. * + * @return string Returns the link. **/ function generatePaymentLink($number, $sku) { - if ($sku != 1 or $sku != 3 or $sku != 5) { - $sku = 1; - } - $base = "https://www.whatsapp.com/payments/cksum_pay.php?phone="; - $middle = "&cksum="; - $end = "&sku=" . $sku; - $checksum = md5($number . "abc"); - $link = $base . $number . $middle . $checksum . $end; - return $link; + return sprintf("https://www.whatsapp.com/payments/cksum_pay.php?phone=%s&cksum=%s&sku=%d", + $number, + md5($number."abc"), + $sku, + ($sku != 1 && $sku != 3 && $sku != 5) ? 1 : $sku); } // Gets mime type of a file using various methods diff --git a/src/protocol.class.php b/src/protocol.class.php index 07193e01..4de9e789 100755 --- a/src/protocol.class.php +++ b/src/protocol.class.php @@ -1,5 +1,4 @@ readInt8(); } elseif ($token == 0xf9) { return $this->readInt16(); - } else { - throw new Exception("BinTreeNodeReader->readListSize: Invalid token $token"); } - return false; //should never be reached. + throw new Exception("BinTreeNodeReader->readListSize: Invalid token $token"); } protected function peekInt24($offset = 0) @@ -535,9 +532,6 @@ public function setKey($key) public function StartStream($domain, $resource) { $attributes = array(); - $header = "WA"; - $header .= $this->writeInt8(1); - $header .= $this->writeInt8(5); $attributes["to"] = $domain; $attributes["resource"] = $resource; @@ -545,14 +539,14 @@ public function StartStream($domain, $resource) $this->output .= "\x01"; $this->writeAttributes($attributes); - $ret = $header . $this->flushBuffer(); - return $ret; + return "WA" . $this->writeInt8(1) . $this->writeInt8(5) . $this->flushBuffer(); } /** * @param ProtocolNode $node * @param bool $encrypt + * * @return string */ public function write($node, $encrypt = true) From e2b44f8791e00807f3765e26515e61edbfdd9381 Mon Sep 17 00:00:00 2001 From: mgp25 Date: Mon, 23 Feb 2015 09:25:33 +0100 Subject: [PATCH 264/436] updated disconnect function --- src/whatsprot.class.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index b995a2ca..2812735f 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -487,8 +487,10 @@ public function isConnected() public function disconnect() { if (is_resource($this->socket)) { - socket_close($this->socket); + @socket_shutdown($this->socket, 2); + @socket_close($this->socket); $this->socket = null; + $this->loginStatus = static::DISCONNECTED_STATUS; $this->eventManager()->fire("onDisconnect", array( $this->phoneNumber, From 1df003f70c2eaa3053bb9995b451119abae90642 Mon Sep 17 00:00:00 2001 From: mgp25 Date: Mon, 23 Feb 2015 09:36:20 +0100 Subject: [PATCH 265/436] Not used anymore --- tests/WhatAppEventTest.php | 239 ------------------------- tests/WhatsAppEventListenerCapture.php | 20 --- 2 files changed, 259 deletions(-) delete mode 100755 tests/WhatAppEventTest.php delete mode 100755 tests/WhatsAppEventListenerCapture.php diff --git a/tests/WhatAppEventTest.php b/tests/WhatAppEventTest.php deleted file mode 100755 index c65367ba..00000000 --- a/tests/WhatAppEventTest.php +++ /dev/null @@ -1,239 +0,0 @@ -eventManager()->addEventListener($listener); - -// Old event bindings: -$old_function1_called = array(); -$old_function2_called = array(); - -// Function bound to variable: -$oldFunction = function( - $phone, - $from, - $msgid, - $type, - $time, - $name, - $message -) use (&$old_function1_called) { - array_push($old_function1_called, array( - 'onGetMessage', - array( - $phone, - $from, - $msgid, - $type, - $time, - $name, - $message - ) - ) ); -}; - -// Named funciton: -function oldFunction2( - $phone, - $from, - $msgid, - $type, - $time, - $name, - $message -) { - global $old_function2_called; - - array_push($old_function2_called, array( - 'onGetMessage', - array( - $phone, - $from, - $msgid, - $type, - $time, - $name, - $message - ) - ) ); -}; - -// Callback approach: -$w->eventManager()->bind('onGetMessage', $oldFunction ); -// String approach: -$w->eventManager()->bind('onGetMessage', 'oldFunction2' ); - -print( "Test #1: onGetMessage\n" ); -/* -rx -rx -rx -rx TestMessage -rx -*/ - -// To be moved to config: -$node = new ProtocolNode("message",array( - 'from' => '441234123456', - 'id' => '1234567890-123', - 'type' => 'chat', - 't' => '1234567890' -), array( - new ProtocolNode('notify', array('xmlns'=>'urn:xmpp:whatsapp','name'=>'First LastName'), NULL, ''), - new ProtocolNode('request', array('xmlns'=>'urn:xmpp:receipts'), NULL, ''), - new ProtocolNode('body', NULL, NULL, 'TestMessage') -), '' ); - -// Send the data into the framework: -$w->processInboundDataNode($node); - -// Analyze the results: -$actual = $listener->getAndResetCapture(); -// Assert expected result: -$expected = array( - //First event raised: - array( - 'onSendMessageReceived', - array( - 0 => '$username', - // 1 = This is the current time. - 2 => '441234123456' - ) - ), - //Second event raised: - array( - // Event name: - 'onGetMessage', - // Event Arguments: - array( - '$username', - '441234123456', - '1234567890-123', - 'chat', - '1234567890', - 'First LastName', - 'TestMessage' - ) - ) -); -$old_expected = array($expected[1]); - -unset($actual[0][1][1]); // Remove the time. - -// Analyze the results: -if ($expected === $actual - && $old_expected === $old_function1_called - && $old_expected === $old_function2_called ) { - print("Test 1 Passed.\n"); -} else { - print("Test 1 Failed!!!!!\n"); -} -$old_function1_called = array(); -$old_function2_called = array(); - -$expected = array( - //First event raised: - array( - // Event name: - 'onGetMessage', - // Event Arguments: - array( - '$username', - '441234123456', - '1234567890-123', - 'chat', - '1234567890', - 'First LastName', - 'TestMessage' - ) - ) -); -$old_expected = $expected; - -print( "Test #2: Legacy Fire\n" ); -$w->eventManager()->fire('onGetMessage', array( - '$username', - '441234123456', - '1234567890-123', - 'chat', - '1234567890', - 'First LastName', - 'TestMessage' -) ); - -// Analyze the results: -$actual = $listener->getAndResetCapture(); -if ($expected === $actual - && $old_expected === $old_function1_called - && $old_expected === $old_function2_called ) { - print("Test 2 Passed.\n"); -} else { - print("Test 2 Failed!!!!!\n" ); -} -$old_function1_called = array(); -$old_function2_called = array(); - -print( "Test #3: onGetGroupMessage\n" ); -/* -rx -rx -rx -rx Are you real, or are you a bot? -rx -*/ - -$node = new ProtocolNode("message",array( - 'from' => '441234123456-1234567890@g.us', - 'id' => '1234567890-123', - 'type' => 'chat', - 't' => '1234567890', - 'author' => '11231231234@s.whatsapp.net' -), array( - new ProtocolNode('notify', array('xmlns'=>'urn:xmpp:whatsapp','name'=>'Fun Guy'), NULL, ''), - new ProtocolNode('request', array('xmlns'=>'urn:xmpp:receipts'), NULL, ''), - new ProtocolNode('body', NULL, NULL, 'Are you real, or are you a bot?') -), '' ); -// Send the data into the framework: -$w->processInboundDataNode($node); -// Analyze the results: -$actual = $listener->getAndResetCapture(); -// Assert expected result: -$expected = array( - //First event raised: - array( - 'onSendMessageReceived', - array( - 0 => '$username', - // 1 = This is the current time. - 2 => '441234123456-1234567890@g.us' - ) - ), - // Second event raised: - array( - // Event name: - 'onGetGroupMessage', - // Event Arguments: - array( - '$username', - '441234123456-1234567890@g.us', - '11231231234@s.whatsapp.net', - '1234567890-123', - 'chat', - '1234567890', - 'Fun Guy', - 'Are you real, or are you a bot?' - ) - ) -); -unset($actual[0][1][1]); // Remove the time. - -if ($expected === $actual) { - print("Test 3 Passed.\n"); -} else { - print("Test 3 Failed!!!!!\n" ); -} diff --git a/tests/WhatsAppEventListenerCapture.php b/tests/WhatsAppEventListenerCapture.php deleted file mode 100755 index f6312064..00000000 --- a/tests/WhatsAppEventListenerCapture.php +++ /dev/null @@ -1,20 +0,0 @@ -capture, array($eventName,$arguments)); - } - - public function getAndResetCapture() { - $ret = $this->capture; - $this->capture = array(); - return $ret; - } -} From d7ba1e58fb8dee1623218911b44ae2fb52decd6d Mon Sep 17 00:00:00 2001 From: mgp25 Date: Mon, 23 Feb 2015 09:38:21 +0100 Subject: [PATCH 266/436] updated string --- tests/whatsapp.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/whatsapp.php b/tests/whatsapp.php index 37215c42..33d095c9 100755 --- a/tests/whatsapp.php +++ b/tests/whatsapp.php @@ -39,7 +39,7 @@ function fgets_u($pStdn) } echo "[] Logging in as '$nickname' ($sender)\n"; -$wa = new WhatsProt($sender, $imei, $nickname, TRUE); +$wa = new WhatsProt($sender, $identity, $nickname, TRUE); $wa->connect(); $wa->loginWithPassword($password); From b37183e82bfcb3ac08497a7436d628db8540315d Mon Sep 17 00:00:00 2001 From: mgp25 Date: Mon, 23 Feb 2015 09:58:40 +0100 Subject: [PATCH 267/436] removed unnecessary condition --- src/whatsprot.class.php | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index 2812735f..b96f4614 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -3412,10 +3412,6 @@ protected function processInboundDataNode(ProtocolNode $node, $autoReceipt = tru } } } - if ($node->getTag() == "ack") { - ////on get ack - } - } /** From e7364098447f08b5fe1bc6aac6229b1a7bb3ce32 Mon Sep 17 00:00:00 2001 From: mgp25 Date: Mon, 23 Feb 2015 10:11:24 +0100 Subject: [PATCH 268/436] media folders --- src/media/.gitkeep | 0 src/pictures/.gitkeep | 0 2 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 src/media/.gitkeep create mode 100644 src/pictures/.gitkeep diff --git a/src/media/.gitkeep b/src/media/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/src/pictures/.gitkeep b/src/pictures/.gitkeep new file mode 100644 index 00000000..e69de29b From 6a5d0c972788e639a3f61b1c896b280e4add341f Mon Sep 17 00:00:00 2001 From: mgp25 Date: Mon, 23 Feb 2015 10:19:02 +0100 Subject: [PATCH 269/436] replaced strings by it consts --- src/whatsprot.class.php | 29 ++++++++++++++--------------- 1 file changed, 14 insertions(+), 15 deletions(-) diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index b96f4614..dcd59055 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -761,7 +761,7 @@ public function sendDeleteBroadcastLists($lists) "id" => $msgId, "xmlns" => "w:b", "type" => "set", - "to" => "s.whatsapp.net" + "to" => static::WHATSAPP_SERVER ), array($deleteNode), null); $this->sendNode($node); @@ -785,7 +785,7 @@ protected function sendClearDirty($categories) array( "id" => $msgId, "type" => "set", - "to" => "s.whatsapp.net", + "to" => static::WHATSAPP_SERVER, "xmlns" => "urn:xmpp:whatsapp:dirty" ), $catnodes, null); @@ -1073,8 +1073,7 @@ public function sendGetServerProperties() "id" => $id, "type" => "get", "xmlns" => "w", - "to" => "s.whatsapp.net" - + "to" => static::WHATSAPP_SERVER ), array($child), null); $this->sendNode($node); @@ -1102,7 +1101,7 @@ public function sendGetServicePricing($lg, $lc) "id" => $msgId, "xmlns" => "urn:xmpp:whatsapp:account", "type" => "get", - "to" => "s.whatsapp.net" + "to" => static::WHATSAPP_SERVER ), array($pricingNode), null); $this->sendNode($node); @@ -1121,7 +1120,7 @@ public function sendExtendAccount() "id" => $msgId, "xmlns" => "urn:xmpp:whatsapp:account", "type" => "set", - "to" => "s.whatsapp.net" + "to" => static::WHATSAPP_SERVER ), array($extendingNode), null); $this->sendNode($node); @@ -1139,7 +1138,7 @@ public function sendGetBroadcastLists() "id" => $msgId, "xmlns" => "w:b", "type" => "get", - "to" => "s.whatsapp.net" + "to" => static::WHATSAPP_SERVER ), array($listsNode), null); $this->sendNode($node); @@ -1162,7 +1161,7 @@ public function sendGetNormalizedJid($countryCode, $number) "id" => $msgId, "xmlns" => "urn:xmpp:whatsapp:account", "type" => "get", - "to" => "s.whatsapp.net" + "to" => static::WHATSAPP_SERVER ), array($normalizeNode), null); $this->sendNode($node); @@ -1201,7 +1200,7 @@ public function sendRemoveAccount($lg = null, $lc = null, $feedback = null) $removeNode = new ProtocolNode("remove", null, $childNode, null); $node = new ProtocolNode("iq", array( - "to" => "s.whatsapp.net", + "to" => static::WHATSAPP_SERVER, "xmlns" => "urn:xmpp:whatsapp:account", "type" => "get", "id" => $msgId @@ -1222,7 +1221,7 @@ public function sendPing() "id" => $msgId, "xmlns" => "w:p", "type" => "get", - "to" => "s.whatsapp.net" + "to" => static::WHATSAPP_SERVER ), array($pingNode), null); $this->sendNode($node); @@ -1278,7 +1277,7 @@ public function sendGetStatuses($jids) $node = new ProtocolNode("iq", array( - "to" => "s.whatsapp.net", + "to" => static::WHATSAPP_SERVER, "type" => "get", "xmlns" => "status", "id" => $this->createMsgId("getstatus") @@ -1325,7 +1324,7 @@ public function sendGroupsChatCreate($subject, $participants) "xmlns" => "w:g2", "id" => $id, "type" => "set", - "to" => "g.us" + "to" => static::WHATSAPP_GROUP_SERVER ), array($createNode), null); $this->sendNode($iqNode); @@ -1927,7 +1926,7 @@ public function sendSetRecoveryToken($token) array( "id" => $this->createMsgId("settoken"), "type" => "set", - "to" => "s.whatsapp.net" + "to" => static::WHATSAPP_SERVER ), array($child), null); $this->sendNode($node); @@ -1943,7 +1942,7 @@ public function sendStatusUpdate($txt) $child = new ProtocolNode("status", null, null, $txt); $node = new ProtocolNode("iq", array( - "to" => "s.whatsapp.net", + "to" => static::WHATSAPP_SERVER, "type" => "set", "id" => $this->createMsgId("sendstatus"), "xmlns" => "status" @@ -3799,7 +3798,7 @@ protected function sendGetGroupsFiltered($type) "id" => $msgID, "type" => "get", "xmlns" => "w:g2", - "to" => "g.us" + "to" => static::WHATSAPP_GROUP_SERVER ), array($child), null); $this->sendNode($node); From 25b094007f9ccf301a277e76e20ae49c71d911e9 Mon Sep 17 00:00:00 2001 From: ducch Date: Mon, 23 Feb 2015 15:32:29 +0200 Subject: [PATCH 270/436] remove decode.php as it's not being used --- src/decode.php | 42 ------------------------------------------ 1 file changed, 42 deletions(-) delete mode 100755 src/decode.php diff --git a/src/decode.php b/src/decode.php deleted file mode 100755 index 8df9fef0..00000000 --- a/src/decode.php +++ /dev/null @@ -1,42 +0,0 @@ - $v) { - $str .= " " . getToken(hexdec($v)); - } - - return $str; -} - -function str2hex($string) -{ - $hexstr = unpack('H*', $string); - - return array_shift($hexstr); -} - -function hex2str($hexstr) -{ - $hexstr = str_replace(' ', '', $hexstr); - $hexstr = str_replace('\x', '', $hexstr); - $retstr = pack('H*', $hexstr); - - return $retstr; -} - -function printhexstr($data, $name) -{ - $data = str2hex($data); - $len = strlen($data); - print("Len: $len - $name\n"); - for ($i = 0; $i < $len; $i += 2) { - if ((($i - 1) % 32) == 31) { - print("\n"); - } - printf(" %s%s", $data[$i], $data[$i + 1]); - } - - print("\n"); -} From 92abf4b0aa32dadda252e8d2d3b309bf68182582 Mon Sep 17 00:00:00 2001 From: ducch Date: Mon, 23 Feb 2015 15:32:57 +0200 Subject: [PATCH 271/436] remove redundant ifs and elses and improve readability --- src/func.php | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/src/func.php b/src/func.php index 9e513038..1a25efde 100755 --- a/src/func.php +++ b/src/func.php @@ -225,19 +225,19 @@ function get_mime($file) $mime = finfo_file($finfo, $file); finfo_close($finfo); return $mime; - } else { - if (function_exists("mime_content_type")) { - return mime_content_type($file); - } else { - if ( ! strncasecmp(PHP_OS, 'WIN', 3) == 0 && ! stristr(ini_get("disable_functions"), "shell_exec")) { - $file = escapeshellarg($file); - $mime = shell_exec("file -bi " . $file); - return $mime; - } else { - return false; - } - } } + + if (function_exists("mime_content_type")) { + return mime_content_type($file); + } + + if (!strncasecmp(PHP_OS, 'WIN', 3) == 0 && !stristr(ini_get("disable_functions"), "shell_exec")) { + $file = escapeshellarg($file); + $mime = shell_exec("file -bi " . $file); + return $mime; + } + + return false; } //Generate Array of Emojis iOS2, iOS5 and iOS7 From 60e59e29a4538ec2d1715d4759e2502e46dcf0fa Mon Sep 17 00:00:00 2001 From: ducch Date: Mon, 23 Feb 2015 15:36:07 +0200 Subject: [PATCH 272/436] complete PHPDoc details --- src/whatsprot.class.php | 40 +++++++++++++++++++--------------------- 1 file changed, 19 insertions(+), 21 deletions(-) diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index dcd59055..6a8a7010 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -1536,13 +1536,11 @@ public function sendUnlockGroup($gId) /** * Send a text message to the user/group. * - * @param $to - * The recipient. - * @param string $txt - * The text message. + * @param string $to The recipient. + * @param string $txt The text message. * @param $id * - * @return string + * @return string Message ID. */ public function sendMessage($to, $txt, $id = null) { @@ -1561,8 +1559,7 @@ public function sendMessage($to, $txt, $id = null) /** * Send a read receipt to a message. * - * @param $to - * The recipient. + * @param $to The recipient. * @param $id */ public function sendMessageRead($to, $id) @@ -1586,6 +1583,7 @@ public function sendMessageRead($to, $id) * @param bool $storeURLmedia Keep copy of file * @param int $fsize * @param string $fhash + * * @return bool */ public function sendMessageAudio($to, $filepath, $storeURLmedia = false, $fsize = 0, $fhash = "") @@ -1637,16 +1635,16 @@ public function sendMessageImage($to, $filepath, $storeURLmedia = false, $fsize /** * Send a location to the user/group. * - * If no name is supplied , receiver will see large sized google map - * thumbnail of entered Lat/Long but NO name/url for location. + * If no name is supplied, the receiver will see a large google maps thumbnail of the lat/long, + * but NO name or url of the location. * - * With name supplied, a combined map thumbnail/name box is displayed. + * When a name supplied, a combined map thumbnail/name box is displayed. * - * @param mixed $to The recipient(s) to send to. - * @param float $long The longitude of the location eg 54.31652 - * @param float $lat The latitude if the location eg -6.833496 - * @param string $name (Optional) The custom name you would like to give this location. - * @param string $url (Optional) A URL to attach to the location. + * @param mixed $to The recipient(s) to send the location to. + * @param float $long The longitude of the location, e.g. 54.31652. + * @param float $lat The latitude of the location, e.g. -6.833496. + * @param string $name (Optional) A custom name for the specified location. + * @param string $url (Optional) A URL to attach to the specified location. */ public function sendMessageLocation($to, $long, $lat, $name = null, $url = null) { @@ -1701,9 +1699,9 @@ protected function sendChatState($to, $state) * Send a video to the user/group. * * @param string $to The recipient to send. - * @param string $filepath The url/uri to the MP4/MOV video. + * @param string $filepath A URL/URI to the MP4/MOV video. * @param bool $storeURLmedia Keep a copy of media file. - * @param int $fsize size of the media file + * @param int $fsize Size of the media file * @param string $fhash base64 hash of the media file * @param string $caption * @@ -1748,7 +1746,7 @@ public function sendOfflineStatus() } /** - * Send a pong to the whatsapp server. I'm alive! + * Send a pong to the WhatsApp server. I'm alive! * * @param string $msgid The id of the message. */ @@ -2084,7 +2082,7 @@ protected function authenticate() /** * Add the authentication nodes. * - * @return ProtocolNode Returns itself. + * @return ProtocolNode Returns an authentication node. */ protected function createAuthNode() { @@ -2117,8 +2115,7 @@ protected function createAuthBlob() /** * Add the auth response to protocoltreenode. * - * @return ProtocolNode - * Return itself. + * @return ProtocolNode Returns a response node. */ protected function createAuthResponseNode() { @@ -2549,6 +2546,7 @@ protected function getMediaFile($filepath, $maxsizebytes = 1048576) * * @param string $host The host URL * @param array $query A associative array of keys and values to send to server. + * * @return null|object NULL if the json cannot be decoded or if the encoded data is deeper than the recursion limit */ protected function getResponse($host, $query) From 70994ee5ab0c473dc80c38b8064c1dbc53e28db1 Mon Sep 17 00:00:00 2001 From: ducch Date: Mon, 23 Feb 2015 15:38:09 +0200 Subject: [PATCH 273/436] remove unused variable declaration --- src/whatsprot.class.php | 28 ++++++---------------------- 1 file changed, 6 insertions(+), 22 deletions(-) diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index 6a8a7010..898a876e 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -1648,14 +1648,6 @@ public function sendMessageImage($to, $filepath, $storeURLmedia = false, $fsize */ public function sendMessageLocation($to, $long, $lat, $name = null, $url = null) { - $mediaHash = array(); - $mediaHash['type'] = "location"; - $mediaHash['encoding'] = "raw"; - $mediaHash['latitude'] = $lat; - $mediaHash['longitude'] = $long; - $mediaHash['name'] = $name; - $mediaHash['url'] = $url; - $mediaNode = new ProtocolNode("media", array( "type" => "location", @@ -1666,11 +1658,7 @@ public function sendMessageLocation($to, $long, $lat, $name = null, $url = null) "url" => $url ), null, null); - if (is_array($to)) { - $id = $this->sendBroadcast($to, $mediaNode, "media"); - } else { - $id = $this->sendMessageNode($to, $mediaNode); - } + $id = (is_array($to)) ? $this->sendBroadcast($to, $mediaNode, "media") : $this->sendMessageNode($to, $mediaNode); $this->waitForServer($id); } @@ -2086,12 +2074,11 @@ protected function authenticate() */ protected function createAuthNode() { - $authHash = array(); - $authHash["mechanism"] = "WAUTH-2"; - $authHash["user"] = $this->phoneNumber; - //$authHash["passive"] = "true"; $data = $this->createAuthBlob(); - $node = new ProtocolNode("auth", $authHash, null, $data); + $node = new ProtocolNode("auth", array( + 'mechanism' => 'WAUTH-2', + 'user' => $this->phoneNumber + ), null, $data); return $node; } @@ -2119,10 +2106,7 @@ protected function createAuthBlob() */ protected function createAuthResponseNode() { - $resp = $this->authenticate(); - $node = new ProtocolNode("response", null, null, $resp); - - return $node; + return new ProtocolNode("response", null, null, $this->authenticate()); } /** From 567f240f3d9e722bb50f16788475ee275bb5e1db Mon Sep 17 00:00:00 2001 From: ducch Date: Mon, 23 Feb 2015 16:05:28 +0200 Subject: [PATCH 274/436] apply PSR-1/PSR-2 standards --- src/events/AllEvents.php | 140 +++++++++++++-------------- src/events/WhatsApiEventsManager.php | 2 +- 2 files changed, 71 insertions(+), 71 deletions(-) diff --git a/src/events/AllEvents.php b/src/events/AllEvents.php index fea7fdcb..95025c8e 100644 --- a/src/events/AllEvents.php +++ b/src/events/AllEvents.php @@ -37,74 +37,74 @@ protected function startListening() } //Adding to this list? Please put them in alphabetical order! - public function onClose($mynumber, $error){} - public function onCodeRegister( $mynumber, $login, $password, $type, $expiration, $kind, $price, $cost, $currency, $price_expiration ){} - public function onCodeRegisterFailed( $mynumber, $status, $reason, $retry_after ){} - public function onCodeRequest( $mynumber, $method, $length ){} - public function onCodeRequestFailed( $mynumber, $method, $reason, $param ){} - public function onCodeRequestFailedTooRecent( $mynumber, $method, $reason, $retry_after ){} - public function onCodeRequestFailedTooManyGuesses( $mynumber, $method, $reason, $retry_after ){} - public function onConnect( $mynumber, $socket ) {} - public function onConnectError( $mynumber, $socket ){} - public function onCredentialsBad( $mynumber, $status, $reason ){} - public function onCredentialsGood( $mynumber, $login, $password, $type, $expiration, $kind, $price, $cost, $currency, $price_expiration ){} - public function onDisconnect( $mynumber, $socket ) {} - public function onDissectPhone( $mynumber, $phonecountry, $phonecc, $phone, $phonemcc, $phoneISO3166, $phoneISO639, $phonemnc ) {} - public function onDissectPhoneFailed( $mynumber ){} - public function onGetAudio( $mynumber, $from, $id, $type, $time, $name, $size, $url, $file, $mimeType, $fileHash, $duration, $acodec, $fromJID_ifGroup = null){} - public function onGetBroadcastLists( $mynumber, $broadcastLists ){} - public function onGetError( $mynumber, $from, $id, $data ){} - public function onGetExtendAccount( $mynumber, $kind, $status, $creation, $expiration ){} - public function onGetFeature( $mynumber, $from, $encrypt ){} - public function onGetGroupMessage( $mynumber, $from_group_jid, $from_user_jid, $id, $type, $time, $name, $body ){} - public function onGetGroupParticipants( $mynumber, $groupId, $groupList ){} - public function onGetGroups( $mynumber, $groupList ){} - public function onGetGroupsInfo( $mynumber, $groupList ){} - public function onGetGroupV2Info( $mynumber, $creator, $creation, $subject, $participants, $admin ){} - public function onGetGroupsSubject( $mynumber, $group_jid, $time, $author, $name, $subject ){} - public function onGetImage( $mynumber, $from, $id, $type, $time, $name, $size, $url, $file, $mimeType, $fileHash, $width, $height, $preview, $caption ){} - public function onGetGroupImage( $mynumber, $from_group_jid, $from_user_jid, $id, $type, $time, $name, $size, $url, $file, $mimeType, $fileHash, $width, $height, $preview, $caption ){} - public function onGetGroupVideo( $mynumber, $from_group_jid, $from_user_jid, $id, $type, $time, $name, $url, $file, $size, $mimeType, $fileHash, $duration, $vcodec, $acodec, $preview, $caption ){} - public function onGetKeysLeft( $mynumber, $keysLeft){} - public function onGetLocation( $mynumber, $from, $id, $type, $time, $name, $name, $longitude, $latitude, $url, $preview, $fromJID_ifGroup = null){} - public function onGetMessage( $mynumber, $from, $id, $type, $time, $name, $body ){} - public function onGetNormalizedJid( $mynumber, $data ){} - public function onGetPrivacyBlockedList( $mynumber, $data ){} - public function onGetProfilePicture( $mynumber, $from, $type, $data ){} - public function onGetReceipt( $from, $id, $offline, $retry ){} - public function onGetRequestLastSeen( $mynumber, $from, $id, $seconds ){} - public function onGetServerProperties( $mynumber, $version, $props ){} - public function onGetServicePricing( $mynumber, $price, $cost, $currency, $expiration ){} - public function onGetStatus( $mynumber, $from, $requested, $id, $time, $data ){} - public function onGetSyncResult( $result ){} - public function onGetVideo( $mynumber, $from, $id, $type, $time, $name, $url, $file, $size, $mimeType, $fileHash, $duration, $vcodec, $acodec, $preview, $caption ){} - public function onGetvCard( $mynumber, $from, $id, $type, $time, $name, $vcardname, $vcard, $fromJID_ifGroup = null){} - public function onGroupCreate( $mynumber, $groupId ){} - public function onGroupisCreated( $mynumber, $creator, $gid, $subject, $admin, $creation, $members = array()){} - public function onGroupsChatCreate( $mynumber, $gid ){} - public function onGroupsChatEnd( $mynumber, $gid ){} - public function onGroupsParticipantsAdd( $mynumber, $groupId, $jid ){} - public function onGroupsParticipantsRemove( $mynumber, $groupId, $jid){} - public function onLogin( $mynumber ){} - public function onLoginFailed( $mynumber, $data ){} - public function onAccountExpired( $mynumber, $kind, $status, $creation, $expiration ){} - public function onMediaMessageSent( $mynumber, $to, $id, $filetype, $url, $filename, $filesize, $filehash, $caption, $icon ){} - public function onMediaUploadFailed( $mynumber, $id, $node, $messageNode, $statusMessage ){} - public function onMessageComposing( $mynumber, $from, $id, $type, $time ){} - public function onMessagePaused( $mynumber, $from, $id, $type, $time ){} - public function onMessageReceivedClient( $mynumber, $from, $id, $type, $time ){} - public function onMessageReceivedServer( $mynumber, $from, $id, $type, $time ){} - public function onPaidAccount( $mynumber, $author, $kind, $status, $creation, $expiration ){} - public function onPing( $mynumber, $id ){} - public function onPresence( $mynumber, $from, $status ){} - public function onProfilePictureChanged( $mynumber, $from, $id, $time ){} - public function onProfilePictureDeleted( $mynumber, $from, $id, $time ){} - public function onSendMessage( $mynumber, $target, $messageId, $node ){} - public function onSendMessageReceived( $mynumber, $id, $from, $type ){} - public function onSendPong( $mynumber, $msgid ){} - public function onSendPresence( $mynumber, $type, $name ){} - public function onSendStatusUpdate( $mynumber, $txt ){} - public function onStreamError( $data ){} - public function onUploadFile( $mynumber, $filename, $url ){} - public function onUploadFileFailed( $mynumber, $filename ){} + public function onClose($mynumber, $error) {} + public function onCodeRegister($mynumber, $login, $password, $type, $expiration, $kind, $price, $cost, $currency, $price_expiration) {} + public function onCodeRegisterFailed($mynumber, $status, $reason, $retry_after) {} + public function onCodeRequest($mynumber, $method, $length) {} + public function onCodeRequestFailed($mynumber, $method, $reason, $param) {} + public function onCodeRequestFailedTooRecent($mynumber, $method, $reason, $retry_after) {} + public function onCodeRequestFailedTooManyGuesses($mynumber, $method, $reason, $retry_after) {} + public function onConnect($mynumber, $socket) {} + public function onConnectError($mynumber, $socket) {} + public function onCredentialsBad($mynumber, $status, $reason) {} + public function onCredentialsGood($mynumber, $login, $password, $type, $expiration, $kind, $price, $cost, $currency, $price_expiration) {} + public function onDisconnect($mynumber, $socket) {} + public function onDissectPhone($mynumber, $phonecountry, $phonecc, $phone, $phonemcc, $phoneISO3166, $phoneISO639, $phonemnc) {} + public function onDissectPhoneFailed($mynumber) {} + public function onGetAudio($mynumber, $from, $id, $type, $time, $name, $size, $url, $file, $mimeType, $fileHash, $duration, $acodec, $fromJID_ifGroup = null) {} + public function onGetBroadcastLists($mynumber, $broadcastLists){} + public function onGetError($mynumber, $from, $id, $data) {} + public function onGetExtendAccount($mynumber, $kind, $status, $creation, $expiration) {} + public function onGetFeature($mynumber, $from, $encrypt) {} + public function onGetGroupMessage($mynumber, $from_group_jid, $from_user_jid, $id, $type, $time, $name, $body) {} + public function onGetGroupParticipants($mynumber, $groupId, $groupList) {} + public function onGetGroups($mynumber, $groupList) {} + public function onGetGroupsInfo($mynumber, $groupList) {} + public function onGetGroupV2Info($mynumber, $creator, $creation, $subject, $participants, $admin) {} + public function onGetGroupsSubject($mynumber, $group_jid, $time, $author, $name, $subject) {} + public function onGetImage($mynumber, $from, $id, $type, $time, $name, $size, $url, $file, $mimeType, $fileHash, $width, $height, $preview, $caption) {} + public function onGetGroupImage($mynumber, $from_group_jid, $from_user_jid, $id, $type, $time, $name, $size, $url, $file, $mimeType, $fileHash, $width, $height, $preview, $caption) {} + public function onGetGroupVideo($mynumber, $from_group_jid, $from_user_jid, $id, $type, $time, $name, $url, $file, $size, $mimeType, $fileHash, $duration, $vcodec, $acodec, $preview, $caption) {} + public function onGetKeysLeft($mynumber, $keysLeft) {} + public function onGetLocation($mynumber, $from, $id, $type, $time, $name, $name, $longitude, $latitude, $url, $preview, $fromJID_ifGroup = null) {} + public function onGetMessage($mynumber, $from, $id, $type, $time, $name, $body) {} + public function onGetNormalizedJid($mynumber, $data) {} + public function onGetPrivacyBlockedList($mynumber, $data) {} + public function onGetProfilePicture($mynumber, $from, $type, $data) {} + public function onGetReceipt($from, $id, $offline, $retry) {} + public function onGetRequestLastSeen($mynumber, $from, $id, $seconds) {} + public function onGetServerProperties($mynumber, $version, $props) {} + public function onGetServicePricing($mynumber, $price, $cost, $currency, $expiration) {} + public function onGetStatus($mynumber, $from, $requested, $id, $time, $data) {} + public function onGetSyncResult($result) {} + public function onGetVideo($mynumber, $from, $id, $type, $time, $name, $url, $file, $size, $mimeType, $fileHash, $duration, $vcodec, $acodec, $preview, $caption) {} + public function onGetvCard($mynumber, $from, $id, $type, $time, $name, $vcardname, $vcard, $fromJID_ifGroup = null) {} + public function onGroupCreate($mynumber, $groupId) {} + public function onGroupisCreated($mynumber, $creator, $gid, $subject, $admin, $creation, $members = array()) {} + public function onGroupsChatCreate($mynumber, $gid) {} + public function onGroupsChatEnd($mynumber, $gid) {} + public function onGroupsParticipantsAdd($mynumber, $groupId, $jid) {} + public function onGroupsParticipantsRemove($mynumber, $groupId, $jid) {} + public function onLogin($mynumber) {} + public function onLoginFailed($mynumber, $data) {} + public function onAccountExpired($mynumber, $kind, $status, $creation, $expiration ){} + public function onMediaMessageSent($mynumber, $to, $id, $filetype, $url, $filename, $filesize, $filehash, $caption, $icon) {} + public function onMediaUploadFailed($mynumber, $id, $node, $messageNode, $statusMessage) {} + public function onMessageComposing($mynumber, $from, $id, $type, $time) {} + public function onMessagePaused($mynumber, $from, $id, $type, $time) {} + public function onMessageReceivedClient($mynumber, $from, $id, $type, $time) {} + public function onMessageReceivedServer($mynumber, $from, $id, $type, $time) {} + public function onPaidAccount($mynumber, $author, $kind, $status, $creation, $expiration) {} + public function onPing($mynumber, $id) {} + public function onPresence($mynumber, $from, $status) {} + public function onProfilePictureChanged($mynumber, $from, $id, $time) {} + public function onProfilePictureDeleted($mynumber, $from, $id, $time) {} + public function onSendMessage($mynumber, $target, $messageId, $node) {} + public function onSendMessageReceived($mynumber, $id, $from, $type) {} + public function onSendPong($mynumber, $msgid) {} + public function onSendPresence($mynumber, $type, $name ) {} + public function onSendStatusUpdate($mynumber, $txt ) {} + public function onStreamError($data) {} + public function onUploadFile($mynumber, $filename, $url) {} + public function onUploadFileFailed($mynumber, $filename) {} } diff --git a/src/events/WhatsApiEventsManager.php b/src/events/WhatsApiEventsManager.php index 2fda0765..ad785661 100644 --- a/src/events/WhatsApiEventsManager.php +++ b/src/events/WhatsApiEventsManager.php @@ -10,7 +10,7 @@ public function bind($event, $callback) public function fire($event, array $parameters) { - if ( ! empty($this->listeners[$event])) { + if (!empty($this->listeners[$event])) { foreach ($this->listeners[$event] as $listener) { call_user_func_array($listener, $parameters); } From 47b40de1039f25e83aed160794f0b13af79d42af Mon Sep 17 00:00:00 2001 From: mgp25 Date: Mon, 23 Feb 2015 21:32:56 +0100 Subject: [PATCH 275/436] updated debug --- src/whatsprot.class.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index 898a876e..a8de4995 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -2149,7 +2149,12 @@ protected function createMsgId($prefix) protected function debugPrint($debugMsg) { if ($this->debug) { - echo $debugMsg; + if (is_array($debugMsg) || is_object($debugMsg)) { + print_r($debugMsg); + } + else { + echo $debugMsg; + } return true; } From 5823e3531a452fa1a3318fce45db47411acd7bb5 Mon Sep 17 00:00:00 2001 From: ducch Date: Tue, 24 Feb 2015 17:47:49 +0200 Subject: [PATCH 276/436] put next challenge files in a cache folder (#225) --- src/cache/README | 4 ++++ src/whatsprot.class.php | 9 ++++++++- 2 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 src/cache/README diff --git a/src/cache/README b/src/cache/README new file mode 100644 index 00000000..b7631e33 --- /dev/null +++ b/src/cache/README @@ -0,0 +1,4 @@ +This folder will be used to store occasional cache files, such as challenges +and identities used by WhatsAPI. Please leave it readable and writeable by +the script. + diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index 898a876e..4f6ac0a3 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -36,6 +36,7 @@ class WhatsProt const DISCONNECTED_STATUS = 'disconnected'; // Describes the connection status with the WhatsApp server. const MEDIA_FOLDER = 'media'; // The relative folder to store received media files const PICTURES_FOLDER = 'pictures'; // The relative folder to store picture files + const CACHE_FOLDER = 'cache'; // The relative folder to store cache files. const PORT = 443; // The port of the WhatsApp server. const TIMEOUT_SEC = 2; // The timeout for the connection with the WhatsApp servers. const TIMEOUT_USEC = 0; @@ -55,7 +56,7 @@ class WhatsProt * Property declarations. */ protected $accountInfo; // The AccountInfo object. - protected $challengeFilename = 'nextChallenge.dat'; + protected $challengeFilename; // Path to nextChallenge.dat. protected $challengeData; // protected $debug; // Determines whether debug mode is on or off. protected $event; // An instance of the WhatsApiEvent Manager. @@ -108,6 +109,12 @@ public function __construct($number, $identity, $nickname, $debug = false) //use provided identity hash $this->identity = urldecode(file_get_contents($identity.'.dat')); } + //e.g. ./cache/nextChallenge.12125557788.dat + $this->challengeFilename = sprintf('%s%s.nextChallenge.%s.dat', + self::CACHE_FOLDER, + DIRECTORY_SEPARATOR, + $number); + $this->name = $nickname; $this->loginStatus = static::DISCONNECTED_STATUS; $this->eventManager = new WhatsApiEventsManager(); From a5705c2378f76ea315f1e2670f9857f00d0f09c1 Mon Sep 17 00:00:00 2001 From: ducch Date: Tue, 24 Feb 2015 17:49:32 +0200 Subject: [PATCH 277/436] merge checkIdentity() as it's only used once. improve buildIdentity() to handle all checks. put identity cache files in a cache folder. (#225) --- src/whatsprot.class.php | 42 ++++++++++++++++++----------------------- 1 file changed, 18 insertions(+), 24 deletions(-) diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index 4f6ac0a3..cbb0fdfd 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -102,19 +102,14 @@ public function __construct($number, $identity, $nickname, $debug = false) $this->debug = $debug; $this->phoneNumber = $number; - if (!$this->checkIdentity($identity)) { - //compute identity with pseudo_random_bytes - $this->identity = $this->buildIdentity($identity); - } else { - //use provided identity hash - $this->identity = urldecode(file_get_contents($identity.'.dat')); - } //e.g. ./cache/nextChallenge.12125557788.dat $this->challengeFilename = sprintf('%s%s.nextChallenge.%s.dat', self::CACHE_FOLDER, DIRECTORY_SEPARATOR, $number); + $this->identity = $this->buildIdentity($identity); + $this->name = $nickname; $this->loginStatus = static::DISCONNECTED_STATUS; $this->eventManager = new WhatsApiEventsManager(); @@ -2319,33 +2314,32 @@ protected function isLoggedIn(){ /** * Create an identity string * - * @param string $identity File name where identity is going to be saved. + * @param string $identity Identity. + * @return string Correctly formatted identity + * + * @throws Exception Error when cannot write identity data to file. */ protected function buildIdentity($identity) { - if (file_exists($identity.".dat")) { - return urldecode(file_get_contents($identity.'.dat')); + $identity_file = sprintf('%s%sid.%s.dat', self::CACHE_FOLDER, DIRECTORY_SEPARATOR, $identity); + + if (is_readable($identity_file)) { + $data = file_get_contents($identity_file); + $length = strlen($data); + + if ($length == 20 || $length == 16) { + return urldecode($data); + } } - $id = fopen($identity.".dat", "w"); $bytes = strtolower(openssl_random_pseudo_bytes(20)); - fwrite($id, urlencode($bytes)); - fclose($id); - return $bytes; - } - - protected function checkIdentity($identity) - { - if (file_exists($identity.".dat")) { - $id = strlen(urldecode(file_get_contents($identity.'.dat'))); - if ($id == 20 || $id == 16) { - return true; - } + if (file_put_contents($identity_file.'.dat', urlencode($bytes)) === false) { + throw new Exception('Unable to write identity file to ' . $identity_file); } - return false; + return $bytes; } public function sendSync(array $numbers, array $deletedNumbers = null, $syncType = 4, $index = 0, $last = true) From f0db627d97fdf7f3f939cc3dba2241d5985ec474 Mon Sep 17 00:00:00 2001 From: ducch Date: Tue, 24 Feb 2015 17:56:31 +0200 Subject: [PATCH 278/436] improve readability --- examples/exampleFunctional.php | 16 ++++++---------- src/func.php | 4 +--- src/whatsprot.class.php | 31 ++++++++----------------------- 3 files changed, 15 insertions(+), 36 deletions(-) diff --git a/examples/exampleFunctional.php b/examples/exampleFunctional.php index bddac582..5224fd59 100755 --- a/examples/exampleFunctional.php +++ b/examples/exampleFunctional.php @@ -41,23 +41,19 @@ function onGetProfilePicture($from, $target, $type, $data) } else { $filename = $target . ".jpg"; } + $filename = WhatsProt::PICTURES_FOLDER."/" . $filename; - $fp = @fopen($filename, "w"); - if ($fp) { - fwrite($fp, $data); - fclose($fp); - } + + file_put_contents($filename, $data); echo "- Profile picture saved in /".WhatsProt::PICTURES_FOLDER."\n"; } function onPresenceReceived($username, $from, $type) { - $dFrom = str_replace(array("@s.whatsapp.net","@g.us"), "", $from); - if ($type == "available") - echo "<$dFrom is online>\n\n"; - else - echo "<$dFrom is offline>\n\n"; + printf("<%s is %s>\n\n", + str_replace(array("@s.whatsapp.net","@g.us"), "", $from), + ($type == 'available') ? 'online' : 'offline'); } echo "[] Logging in as '$nickname' ($username)\n"; diff --git a/src/func.php b/src/func.php index 1a25efde..5402dfcc 100755 --- a/src/func.php +++ b/src/func.php @@ -195,9 +195,7 @@ function updateData($nameFile, $WAver, $classesMD5 = "") $content = implode("\n", $content); - $open = fopen($file, 'w'); - fwrite($open, $content); - fclose($open); + file_put_contents($file, $content); } /** diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index 898a876e..a7d6eba6 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -3429,25 +3429,15 @@ protected function sendNotificationAck($node) protected function processMediaImage($node) { $media = $node->getChild("media"); + if ($media != null) { $filename = $media->getAttribute("file"); $url = $media->getAttribute("url"); //save thumbnail - $data = $media->getData(); - $fp = @fopen(static::MEDIA_FOLDER . "/thumb_" . $filename, "w"); - if ($fp) { - fwrite($fp, $data); - fclose($fp); - } - + file_put_contents(static::MEDIA_FOLDER . DIRECTORY_SEPARATOR . 'thumb_' . $filename, $media->getData()); //download and save original - $data = file_get_contents($url); - $fp = @fopen(static::MEDIA_FOLDER . "/" . $filename, "w"); - if ($fp) { - fwrite($fp, $data); - fclose($fp); - } + file_put_contents(static::MEDIA_FOLDER . DIRECTORY_SEPARATOR . $filename, file_get_contents($url)); } } @@ -3461,18 +3451,13 @@ protected function processProfilePicture($node) $pictureNode = $node->getChild("picture"); if ($pictureNode != null) { - $type = $pictureNode->getAttribute("type"); - $data = $pictureNode->getData(); - if ($type == "preview") { - $filename = static::PICTURES_FOLDER . "/preview_" . $node->getAttribute("from") . ".jpg"; + if ($pictureNode->getAttribute("type") == "preview") { + $filename = static::PICTURES_FOLDER . DIRECTORY_SEPARATOR . 'preview_' . $node->getAttribute('from') . 'jpg'; } else { - $filename = static::PICTURES_FOLDER . "/" . $node->getAttribute("from") . ".jpg"; - } - $fp = @fopen($filename, "w"); - if ($fp) { - fwrite($fp, $data); - fclose($fp); + $filename = static::PICTURES_FOLDER . DIRECTORY_SEPARATOR . $node->getAttribute('from') . '.jpg'; } + + file_put_contents($filename, $pictureNode->getData()); } } From 61e720b43f0c9f858cf30b6b69811a05393e43b1 Mon Sep 17 00:00:00 2001 From: mgp25 Date: Wed, 25 Feb 2015 01:21:48 +0100 Subject: [PATCH 279/436] fixes and changes (paths) see description Fixed code and set names, thinking of changing cache folder to other name and set the path of .db too. The code now works, tomorrow ill continue the testing --- src/whatsprot.class.php | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index 5ac9e029..850b6e80 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -36,7 +36,7 @@ class WhatsProt const DISCONNECTED_STATUS = 'disconnected'; // Describes the connection status with the WhatsApp server. const MEDIA_FOLDER = 'media'; // The relative folder to store received media files const PICTURES_FOLDER = 'pictures'; // The relative folder to store picture files - const CACHE_FOLDER = 'cache'; // The relative folder to store cache files. + const CACHE_FOLDER = 'cache/'; // The relative folder to store cache files. const PORT = 443; // The port of the WhatsApp server. const TIMEOUT_SEC = 2; // The timeout for the connection with the WhatsApp servers. const TIMEOUT_USEC = 0; @@ -80,6 +80,7 @@ class WhatsProt protected $socket; // A socket to connect to the WhatsApp network. protected $writer; // An instance of the BinaryTreeNodeWriter class. protected $messageStore; + protected $storagePath; public $reader; // An instance of the BinaryTreeNodeReader class. /** @@ -95,20 +96,22 @@ class WhatsProt * @param $debug * Debug on or off, false by default. */ - public function __construct($number, $identity, $nickname, $debug = false) + public function __construct($number, $storagePath, $nickname, $debug = false) { $this->writer = new BinTreeNodeWriter(); $this->reader = new BinTreeNodeReader(); $this->debug = $debug; $this->phoneNumber = $number; + $this->storagePath = $storagePath; //e.g. ./cache/nextChallenge.12125557788.dat - $this->challengeFilename = sprintf('%s%s.nextChallenge.%s.dat', - self::CACHE_FOLDER, + $this->challengeFilename = sprintf('%s%s%snextChallenge.%s.dat', + $storagePath, DIRECTORY_SEPARATOR, + self::CACHE_FOLDER, $number); - $this->identity = $this->buildIdentity($identity); + $this->identity = $this->buildIdentity(); $this->name = $nickname; $this->loginStatus = static::DISCONNECTED_STATUS; @@ -2320,9 +2323,9 @@ protected function isLoggedIn(){ * * @throws Exception Error when cannot write identity data to file. */ - protected function buildIdentity($identity) + protected function buildIdentity() { - $identity_file = sprintf('%s%sid.%s.dat', self::CACHE_FOLDER, DIRECTORY_SEPARATOR, $identity); + $identity_file = sprintf('%s%s%sid.%s.dat', $this->storagePath, DIRECTORY_SEPARATOR, self::CACHE_FOLDER, $this->phoneNumber); if (is_readable($identity_file)) { $data = file_get_contents($identity_file); From 2c6c820fb94830357c6a56f0f397340713adcf80 Mon Sep 17 00:00:00 2001 From: riekelt Date: Wed, 25 Feb 2015 13:36:07 +0100 Subject: [PATCH 280/436] Additional events fired, process inbound node for "account" update --- src/whatsprot.class.php | 36 ++++++++++++++++++++++++++++-------- 1 file changed, 28 insertions(+), 8 deletions(-) diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index a8de4995..ae52afa3 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -2191,14 +2191,14 @@ protected function dissectPhone() } $phone = array( - 'country' => $data[0], - 'cc' => $data[1], - 'phone' => substr($this->phoneNumber, strlen($data[1]), strlen($this->phoneNumber)), - 'mcc' => $mcc, - 'ISO3166' => @$data[3], - 'ISO639' => @$data[4], - 'mnc' => $data[5] - ); + 'country' => $data[0], + 'cc' => $data[1], + 'phone' => substr($this->phoneNumber, strlen($data[1]), strlen($this->phoneNumber)), + 'mcc' => $mcc, + 'ISO3166' => @$data[3], + 'ISO639' => @$data[4], + 'mnc' => $data[5] + ); $this->eventManager()->fire("onDissectPhone", array( @@ -2605,6 +2605,8 @@ protected function processInboundDataNode(ProtocolNode $node, $autoReceipt = tru $this->debugPrint($node->nodeString("rx ") . "\n"); $this->serverReceivedId = $node->getAttribute('id'); + //var_dump($node); + if ($node->getTag() == "challenge") { $this->processChallenge($node); } elseif ($node->getTag() == "failure") { @@ -2615,6 +2617,15 @@ protected function processInboundDataNode(ProtocolNode $node, $autoReceipt = tru $challengeData = $node->getData(); file_put_contents($this->challengeFilename, $challengeData); $this->writer->setKey($this->outputKey); + + $this->eventManager()->fire("onLoginSuccess", + array( + $this->phoneNumber, + $node->getAttribute("kind"), + $node->getAttribute("status"), + $node->getAttribute("creation"), + $node->getAttribute("expiration") + )); } elseif ($node->getAttribute("status") == "expired") { $this->eventManager()->fire("onAccountExpired", array( @@ -3390,6 +3401,15 @@ protected function processInboundDataNode(ProtocolNode $node, $autoReceipt = tru case "dirty": $this->sendClearDirty(array($child->getAttribute("type"))); break; + case "account": + $this->eventManager()->fire("onPaymentRecieved",[ + $this->phoneNumber, + $child->getAttribute("kind"), + $child->getAttribute("status"), + $child->getAttribute("creation"), + $child->getAttribute("expiration") + ]); + break; case "offline": break; From 4a49afd33bf9d06628a325881b50460663c43b94 Mon Sep 17 00:00:00 2001 From: riekelt Date: Wed, 25 Feb 2015 13:38:14 +0100 Subject: [PATCH 281/436] Add events onLoginSuccess and onPaymentRecieved - Add event onLoginSuccess to retrieve account status - Add event onPaymentRecieved to retrieve account status, which is pushed after a payment is recieved --- src/events/AllEvents.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/events/AllEvents.php b/src/events/AllEvents.php index 95025c8e..a0fd45e0 100644 --- a/src/events/AllEvents.php +++ b/src/events/AllEvents.php @@ -87,6 +87,7 @@ public function onGroupsParticipantsAdd($mynumber, $groupId, $jid) {} public function onGroupsParticipantsRemove($mynumber, $groupId, $jid) {} public function onLogin($mynumber) {} public function onLoginFailed($mynumber, $data) {} + public function onLoginSuccess($mynumber, $kind, $status, $creation, $expiration) {} public function onAccountExpired($mynumber, $kind, $status, $creation, $expiration ){} public function onMediaMessageSent($mynumber, $to, $id, $filetype, $url, $filename, $filesize, $filehash, $caption, $icon) {} public function onMediaUploadFailed($mynumber, $id, $node, $messageNode, $statusMessage) {} @@ -95,6 +96,7 @@ public function onMessagePaused($mynumber, $from, $id, $type, $time) {} public function onMessageReceivedClient($mynumber, $from, $id, $type, $time) {} public function onMessageReceivedServer($mynumber, $from, $id, $type, $time) {} public function onPaidAccount($mynumber, $author, $kind, $status, $creation, $expiration) {} + public function onPaymentRecieved($mynumber, $kind, $status, $creation, $expiration) {} public function onPing($mynumber, $id) {} public function onPresence($mynumber, $from, $status) {} public function onProfilePictureChanged($mynumber, $from, $id, $time) {} From 2db687791b05efc6b3e6c427e5f4e9fd63e8cbe0 Mon Sep 17 00:00:00 2001 From: riekelt Date: Wed, 25 Feb 2015 14:08:51 +0100 Subject: [PATCH 282/436] Remove var_dump --- src/whatsprot.class.php | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index ae52afa3..ee024687 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -2605,8 +2605,6 @@ protected function processInboundDataNode(ProtocolNode $node, $autoReceipt = tru $this->debugPrint($node->nodeString("rx ") . "\n"); $this->serverReceivedId = $node->getAttribute('id'); - //var_dump($node); - if ($node->getTag() == "challenge") { $this->processChallenge($node); } elseif ($node->getTag() == "failure") { From f09dcbd1fcc6472d06e5b92f799e4fa2a2b2d065 Mon Sep 17 00:00:00 2001 From: mgp25 Date: Wed, 25 Feb 2015 16:07:31 +0100 Subject: [PATCH 283/436] Data folder and buildIdentity updated --- src/whatsprot.class.php | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index 850b6e80..ba454e68 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -36,7 +36,7 @@ class WhatsProt const DISCONNECTED_STATUS = 'disconnected'; // Describes the connection status with the WhatsApp server. const MEDIA_FOLDER = 'media'; // The relative folder to store received media files const PICTURES_FOLDER = 'pictures'; // The relative folder to store picture files - const CACHE_FOLDER = 'cache/'; // The relative folder to store cache files. + const DATA_FOLDER = 'wadata'; // The relative folder to store cache files. const PORT = 443; // The port of the WhatsApp server. const TIMEOUT_SEC = 2; // The timeout for the connection with the WhatsApp servers. const TIMEOUT_USEC = 0; @@ -108,7 +108,7 @@ public function __construct($number, $storagePath, $nickname, $debug = false) $this->challengeFilename = sprintf('%s%s%snextChallenge.%s.dat', $storagePath, DIRECTORY_SEPARATOR, - self::CACHE_FOLDER, + self::DATA_FOLDER . DIRECTORY_SEPARATOR, $number); $this->identity = $this->buildIdentity(); @@ -2325,14 +2325,14 @@ protected function isLoggedIn(){ */ protected function buildIdentity() { - $identity_file = sprintf('%s%s%sid.%s.dat', $this->storagePath, DIRECTORY_SEPARATOR, self::CACHE_FOLDER, $this->phoneNumber); + $identity_file = sprintf('%s%s%sid.%s.dat', $this->storagePath, DIRECTORY_SEPARATOR, self::DATA_FOLDER . DIRECTORY_SEPARATOR, $this->phoneNumber); if (is_readable($identity_file)) { - $data = file_get_contents($identity_file); + $data = urldecode(file_get_contents($identity_file)); $length = strlen($data); if ($length == 20 || $length == 16) { - return urldecode($data); + return $data; } } @@ -2491,7 +2491,7 @@ protected function getMediaFile($filepath, $maxsizebytes = 1048576) //TODO check what max file size whatsapp server accepts. if ($this->mediaFileInfo['filesize'] < $maxsizebytes) { //Create temp file in media folder. Media folder must be writable! - $this->mediaFileInfo['filepath'] = tempnam(getcwd() . '/' . static::MEDIA_FOLDER, 'WHA'); + $this->mediaFileInfo['filepath'] = tempnam($this->storagePath . DIRECTORY_SEPARATOR . self::DATA_FOLDER . DIRECTORY_SEPARATOR . self::MEDIA_FOLDER, 'WHA'); $fp = fopen($this->mediaFileInfo['filepath'], 'w'); if ($fp) { curl_setopt($curl, CURLOPT_NOBODY, false); @@ -3439,9 +3439,9 @@ protected function processMediaImage($node) $url = $media->getAttribute("url"); //save thumbnail - file_put_contents(static::MEDIA_FOLDER . DIRECTORY_SEPARATOR . 'thumb_' . $filename, $media->getData()); + file_put_contents($this->storagePath . DIRECTORY_SEPARATOR . self::DATA_FOLDER . DIRECTORY_SEPARATOR . self::MEDIA_FOLDER . DIRECTORY_SEPARATOR . 'thumb_' . $filename, $media->getData()); //download and save original - file_put_contents(static::MEDIA_FOLDER . DIRECTORY_SEPARATOR . $filename, file_get_contents($url)); + file_put_contents($this->storagePath . DIRECTORY_SEPARATOR . self::DATA_FOLDER . DIRECTORY_SEPARATOR . self::MEDIA_FOLDER . DIRECTORY_SEPARATOR . $filename, file_get_contents($url)); } } @@ -3456,9 +3456,9 @@ protected function processProfilePicture($node) if ($pictureNode != null) { if ($pictureNode->getAttribute("type") == "preview") { - $filename = static::PICTURES_FOLDER . DIRECTORY_SEPARATOR . 'preview_' . $node->getAttribute('from') . 'jpg'; + $filename = $this->storagePath . DIRECTORY_SEPARATOR . self::DATA_FOLDER . DIRECTORY_SEPARATOR . self::PICTURES_FOLDER . DIRECTORY_SEPARATOR . 'preview_' . $node->getAttribute('from') . 'jpg'; } else { - $filename = static::PICTURES_FOLDER . DIRECTORY_SEPARATOR . $node->getAttribute('from') . '.jpg'; + $filename = $this->storagePath . DIRECTORY_SEPARATOR . self::DATA_FOLDER . DIRECTORY_SEPARATOR . self::PICTURES_FOLDER . DIRECTORY_SEPARATOR . $node->getAttribute('from') . '.jpg'; } file_put_contents($filename, $pictureNode->getData()); From 0da44a0d31939c1da69edcf127fef09aad59f659 Mon Sep 17 00:00:00 2001 From: mgp25 Date: Wed, 25 Feb 2015 16:18:06 +0100 Subject: [PATCH 284/436] fix buildIdentity check --- src/whatsprot.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index ba454e68..71dbe670 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -2338,7 +2338,7 @@ protected function buildIdentity() $bytes = strtolower(openssl_random_pseudo_bytes(20)); - if (file_put_contents($identity_file.'.dat', urlencode($bytes)) === false) { + if (file_put_contents($identity_file, urlencode($bytes)) === false) { throw new Exception('Unable to write identity file to ' . $identity_file); } From df45a2ceaa9ea20086c37f5c3ad5a44ed7c988d8 Mon Sep 17 00:00:00 2001 From: mgp25 Date: Wed, 25 Feb 2015 16:49:48 +0100 Subject: [PATCH 285/436] Creating db inside wadata folder --- src/SqliteMessageStore.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/SqliteMessageStore.php b/src/SqliteMessageStore.php index 1be2e826..18508918 100644 --- a/src/SqliteMessageStore.php +++ b/src/SqliteMessageStore.php @@ -6,11 +6,13 @@ public function saveMessage($from, $to, $txt, $id, $t); class SqliteMessageStore implements MessageStoreInterface { + const DATA_FOLDER = 'wadata'; + private $db; - public function __construct($number) + public function __construct($number, $pathStore) { - $fileName = 'msgstore-'.$number.'.db'; + $fileName = $pathStore . DIRECTORY_SEPARATOR . self::DATA_FOLDER . DIRECTORY_SEPARATOR . 'msgstore-'.$number.'.db'; $createTable = !file_exists($fileName); $this->db = new \PDO("sqlite:" . $fileName, null, null, array(PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC, PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION)); From 3b7ee1fbcf5c16a0ae9f4b29bd0166811a532510 Mon Sep 17 00:00:00 2001 From: mgp25 Date: Thu, 26 Feb 2015 20:56:05 +0100 Subject: [PATCH 286/436] storage path --- src/SqliteMessageStore.php | 4 ++-- src/cache/README | 4 ---- src/{ => wadata}/media/.gitkeep | 0 src/{ => wadata}/pictures/.gitkeep | 0 src/whatsprot.class.php | 16 ++++++++-------- 5 files changed, 10 insertions(+), 14 deletions(-) delete mode 100644 src/cache/README rename src/{ => wadata}/media/.gitkeep (100%) rename src/{ => wadata}/pictures/.gitkeep (100%) diff --git a/src/SqliteMessageStore.php b/src/SqliteMessageStore.php index 18508918..82105da3 100644 --- a/src/SqliteMessageStore.php +++ b/src/SqliteMessageStore.php @@ -10,9 +10,9 @@ class SqliteMessageStore implements MessageStoreInterface private $db; - public function __construct($number, $pathStore) + public function __construct($number) { - $fileName = $pathStore . DIRECTORY_SEPARATOR . self::DATA_FOLDER . DIRECTORY_SEPARATOR . 'msgstore-'.$number.'.db'; + $fileName = __DIR__ . DIRECTORY_SEPARATOR . self::DATA_FOLDER . DIRECTORY_SEPARATOR . 'msgstore-'.$number.'.db'; $createTable = !file_exists($fileName); $this->db = new \PDO("sqlite:" . $fileName, null, null, array(PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC, PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION)); diff --git a/src/cache/README b/src/cache/README deleted file mode 100644 index b7631e33..00000000 --- a/src/cache/README +++ /dev/null @@ -1,4 +0,0 @@ -This folder will be used to store occasional cache files, such as challenges -and identities used by WhatsAPI. Please leave it readable and writeable by -the script. - diff --git a/src/media/.gitkeep b/src/wadata/media/.gitkeep similarity index 100% rename from src/media/.gitkeep rename to src/wadata/media/.gitkeep diff --git a/src/pictures/.gitkeep b/src/wadata/pictures/.gitkeep similarity index 100% rename from src/pictures/.gitkeep rename to src/wadata/pictures/.gitkeep diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index 71dbe670..09a8c122 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -96,7 +96,7 @@ class WhatsProt * @param $debug * Debug on or off, false by default. */ - public function __construct($number, $storagePath, $nickname, $debug = false) + public function __construct($number, $nickname, $debug = false) { $this->writer = new BinTreeNodeWriter(); $this->reader = new BinTreeNodeReader(); @@ -106,7 +106,7 @@ public function __construct($number, $storagePath, $nickname, $debug = false) //e.g. ./cache/nextChallenge.12125557788.dat $this->challengeFilename = sprintf('%s%s%snextChallenge.%s.dat', - $storagePath, + __DIR__, DIRECTORY_SEPARATOR, self::DATA_FOLDER . DIRECTORY_SEPARATOR, $number); @@ -2325,7 +2325,7 @@ protected function isLoggedIn(){ */ protected function buildIdentity() { - $identity_file = sprintf('%s%s%sid.%s.dat', $this->storagePath, DIRECTORY_SEPARATOR, self::DATA_FOLDER . DIRECTORY_SEPARATOR, $this->phoneNumber); + $identity_file = sprintf('%s%s%sid.%s.dat', __DIR__, DIRECTORY_SEPARATOR, self::DATA_FOLDER . DIRECTORY_SEPARATOR, $this->phoneNumber); if (is_readable($identity_file)) { $data = urldecode(file_get_contents($identity_file)); @@ -2491,7 +2491,7 @@ protected function getMediaFile($filepath, $maxsizebytes = 1048576) //TODO check what max file size whatsapp server accepts. if ($this->mediaFileInfo['filesize'] < $maxsizebytes) { //Create temp file in media folder. Media folder must be writable! - $this->mediaFileInfo['filepath'] = tempnam($this->storagePath . DIRECTORY_SEPARATOR . self::DATA_FOLDER . DIRECTORY_SEPARATOR . self::MEDIA_FOLDER, 'WHA'); + $this->mediaFileInfo['filepath'] = tempnam(__DIR__ . DIRECTORY_SEPARATOR . self::DATA_FOLDER . DIRECTORY_SEPARATOR . self::MEDIA_FOLDER, 'WHA'); $fp = fopen($this->mediaFileInfo['filepath'], 'w'); if ($fp) { curl_setopt($curl, CURLOPT_NOBODY, false); @@ -3439,9 +3439,9 @@ protected function processMediaImage($node) $url = $media->getAttribute("url"); //save thumbnail - file_put_contents($this->storagePath . DIRECTORY_SEPARATOR . self::DATA_FOLDER . DIRECTORY_SEPARATOR . self::MEDIA_FOLDER . DIRECTORY_SEPARATOR . 'thumb_' . $filename, $media->getData()); + file_put_contents(__DIR__ . DIRECTORY_SEPARATOR . self::DATA_FOLDER . DIRECTORY_SEPARATOR . self::MEDIA_FOLDER . DIRECTORY_SEPARATOR . 'thumb_' . $filename, $media->getData()); //download and save original - file_put_contents($this->storagePath . DIRECTORY_SEPARATOR . self::DATA_FOLDER . DIRECTORY_SEPARATOR . self::MEDIA_FOLDER . DIRECTORY_SEPARATOR . $filename, file_get_contents($url)); + file_put_contents(__DIR__ . DIRECTORY_SEPARATOR . self::DATA_FOLDER . DIRECTORY_SEPARATOR . self::MEDIA_FOLDER . DIRECTORY_SEPARATOR . $filename, file_get_contents($url)); } } @@ -3456,9 +3456,9 @@ protected function processProfilePicture($node) if ($pictureNode != null) { if ($pictureNode->getAttribute("type") == "preview") { - $filename = $this->storagePath . DIRECTORY_SEPARATOR . self::DATA_FOLDER . DIRECTORY_SEPARATOR . self::PICTURES_FOLDER . DIRECTORY_SEPARATOR . 'preview_' . $node->getAttribute('from') . 'jpg'; + $filename = __DIR__ . DIRECTORY_SEPARATOR . self::DATA_FOLDER . DIRECTORY_SEPARATOR . self::PICTURES_FOLDER . DIRECTORY_SEPARATOR . 'preview_' . $node->getAttribute('from') . 'jpg'; } else { - $filename = $this->storagePath . DIRECTORY_SEPARATOR . self::DATA_FOLDER . DIRECTORY_SEPARATOR . self::PICTURES_FOLDER . DIRECTORY_SEPARATOR . $node->getAttribute('from') . '.jpg'; + $filename = __DIR__ . DIRECTORY_SEPARATOR . self::DATA_FOLDER . DIRECTORY_SEPARATOR . self::PICTURES_FOLDER . DIRECTORY_SEPARATOR . $node->getAttribute('from') . '.jpg'; } file_put_contents($filename, $pictureNode->getData()); From 435da71776b5be8005c40e8eb3cefaad9ab5dea5 Mon Sep 17 00:00:00 2001 From: mgp25 Date: Thu, 26 Feb 2015 21:01:29 +0100 Subject: [PATCH 287/436] added wait to sendBroadcast --- src/whatsprot.class.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index 09a8c122..ad416c64 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -3728,6 +3728,7 @@ protected function sendBroadcast($targets, $node, $type) ), array($node, $broadcastNode), null); $this->sendNode($messageNode); + $this->waitForServer($msgID); //listen for response $this->eventManager()->fire("onSendMessage", array( From 5b0b20fe29d2130c6cc855961057be603d344b82 Mon Sep 17 00:00:00 2001 From: mgp25 Date: Fri, 27 Feb 2015 10:39:19 +0100 Subject: [PATCH 288/436] removed unused variable --- src/whatsprot.class.php | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index 90a1a761..52118f8e 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -80,7 +80,6 @@ class WhatsProt protected $socket; // A socket to connect to the WhatsApp network. protected $writer; // An instance of the BinaryTreeNodeWriter class. protected $messageStore; - protected $storagePath; public $reader; // An instance of the BinaryTreeNodeReader class. /** @@ -102,7 +101,6 @@ public function __construct($number, $nickname, $debug = false) $this->reader = new BinTreeNodeReader(); $this->debug = $debug; $this->phoneNumber = $number; - $this->storagePath = $storagePath; //e.g. ./cache/nextChallenge.12125557788.dat $this->challengeFilename = sprintf('%s%s%snextChallenge.%s.dat', From c9bb7f681cecf2e60c462aa071b55576da1919db Mon Sep 17 00:00:00 2001 From: mgp25 Date: Fri, 27 Feb 2015 10:57:26 +0100 Subject: [PATCH 289/436] Update examples --- examples/Simple CLI client.php | 7 +++---- examples/contactsync.php | 2 +- examples/exampleFunctional.php | 20 +++++++------------- examples/exampleRegister.php | 3 +-- examples/registerTool.php | 9 ++------- examples/whatsapp.php | 2 +- 6 files changed, 15 insertions(+), 28 deletions(-) diff --git a/examples/Simple CLI client.php b/examples/Simple CLI client.php index 04f4b6ea..0b85db3f 100755 --- a/examples/Simple CLI client.php +++ b/examples/Simple CLI client.php @@ -18,12 +18,11 @@ //////////////////////////////////////////////////// $username = ""; $password = ""; -$identity = ""; $nickname = ""; $debug = false; ///////////////////////////////////////////////////// if ($_SERVER['argv'][1] == null) { - echo "USO: php ".$_SERVER['argv'][0]." \n\nEj: php cliente.php 34123456789\n\n"; + echo "USAGE: php ".$_SERVER['argv'][0]." \n\nEj: php client.php 34123456789\n\n"; exit(1); } $target = $_SERVER['argv'][1]; @@ -51,7 +50,7 @@ function onPresenceReceived($username, $from, $type) } echo "[] logging in as '$nickname' ($username)\n"; -$w = new WhatsProt($username, $identity, $nickname, false); +$w = new WhatsProt($username, $nickname, $debug); $w->eventManager()->bind("onPresence", "onPresenceReceived"); @@ -118,4 +117,4 @@ public function process($node) echo "\n- ".$notify.": ".$text." ".date('H:i')."\n"; } -} +} diff --git a/examples/contactsync.php b/examples/contactsync.php index 210abbe2..5786ee39 100755 --- a/examples/contactsync.php +++ b/examples/contactsync.php @@ -35,7 +35,7 @@ function onSyncResult($result) die(); //to break out of the while(true) loop } -$wa = new WhatsProt($username, "", "WhatsApp", false); +$wa = new WhatsProt($username, "WhatsApp", false); //bind event handler $wa->eventManager()->bind('onGetSyncResult', 'onSyncResult'); diff --git a/examples/exampleFunctional.php b/examples/exampleFunctional.php index 5224fd59..74c0d3be 100755 --- a/examples/exampleFunctional.php +++ b/examples/exampleFunctional.php @@ -4,16 +4,11 @@ //Change to your time zone date_default_timezone_set('Europe/Madrid'); -// phone number, deviceIdentity, and name. -$options = getopt("d::", array("debug::")); -$debug = (array_key_exists("debug", $options) || array_key_exists("d", $options)) ? true : false; - ########## DO NOT COMMIT THIS FILE WITH YOUR CREDENTIALS ########### ///////////////////////CONFIGURATION/////////////////////// ////////////////////////////////////////////////////////// $username = "**your phone number**"; // Telephone number including the country code without '+' or '00'. $password = "**server generated whatsapp password**"; // Use registerTool.php or exampleRegister.php to obtain your password -$identity = "myIdentity"; // Name of the file where the identity will be stored. In this exaple, a file called myIdentity.dat will be created $nickname = "**your nickname**"; // This is the username (or nickname) displayed by WhatsApp clients. $target = "**contact's phone number**"; // Destination telephone number including the country code without '+' or '00'. $debug = false; // Set this to true, to see debug mode. @@ -42,11 +37,11 @@ function onGetProfilePicture($from, $target, $type, $data) $filename = $target . ".jpg"; } - $filename = WhatsProt::PICTURES_FOLDER."/" . $filename; + $filename = WhatsProt::PICTURES_FOLDER. "/" . $filename; file_put_contents($filename, $data); - echo "- Profile picture saved in /".WhatsProt::PICTURES_FOLDER."\n"; + echo "- Profile picture saved in " . WhatsProt::PICTURES_FOLDER. "/" . $filename . "\n"; } function onPresenceReceived($username, $from, $type) @@ -58,14 +53,9 @@ function onPresenceReceived($username, $from, $type) echo "[] Logging in as '$nickname' ($username)\n"; //Create the whatsapp object and setup a connection. -$w = new WhatsProt($username, $identity, $nickname, $debug); +$w = new WhatsProt($username, $nickname, $debug); $w->connect(); -// Now loginWithPassword function sends Nickname and (Available) Presence -$w->loginWithPassword($password); - -echo "[*] Connected to WhatsApp\n\n"; - //Retrieve large profile picture. Output is in /src/php/pictures/ (you need to bind a function //to the event onProfilePicture so the script knows what to do. $w->eventManager()->bind("onGetProfilePicture", "onGetProfilePicture"); @@ -75,6 +65,10 @@ function onPresenceReceived($username, $from, $type) //so the script knows what to do) $w->eventManager()->bind("onPresence", "onPresenceReceived"); +// Now loginWithPassword function sends Nickname and (Available) Presence +$w->loginWithPassword($password); + +echo "[*] Connected to WhatsApp\n\n"; //update your profile picture $w->sendSetProfilePicture("demo/venom.jpg"); diff --git a/examples/exampleRegister.php b/examples/exampleRegister.php index 4ba5c6ba..199da01a 100755 --- a/examples/exampleRegister.php +++ b/examples/exampleRegister.php @@ -16,11 +16,10 @@ $debug = true; $username = '34666554433'; // Telephone number including the country code without '+' or '00'. -$identity = 'myIdentity'; // Name of the file where the identity will be stored. In this exaple, a file called myIdentity.dat will be created $nickname = 'John Doe'; // This is the username displayed by WhatsApp clients. // Create a instance of WhastPort. -$w = new WhatsProt($username, $identity, $nickname, $debug); +$w = new WhatsProt($username, $nickname, $debug); // How to create an account __ONLY__ if you do not have a associated to our phone number. // You can test your credentials with: $w->checkCredentials() (BUT ONLY ONLY IF YOU HAVE THE IDENTITY); diff --git a/examples/registerTool.php b/examples/registerTool.php index a076932d..6a310cdd 100644 --- a/examples/registerTool.php +++ b/examples/registerTool.php @@ -11,20 +11,15 @@ echo "\n\nUsername (country code + number without + or 00): "; $username = trim(fgets(STDIN)); -$identity = "identity"; -echo "\nNickname: "; -$nickname = trim(fgets(STDIN)); -echo "\nCarrier: "; -$carrier = trim(fgets(STDIN)); // Create a instance of WhastPort. -$w = new WhatsProt($username, $identity, $nickname, $debug); +$w = new WhatsProt($username, '', $debug); echo "\n\nType sms or voice: "; $option = fgets(STDIN); try { - $w->codeRequest(trim($option), $carrier); + $w->codeRequest(trim($option)); } catch(Exception $e) { echo $e->getMessage(); exit(0); diff --git a/examples/whatsapp.php b/examples/whatsapp.php index a04607bf..146946fc 100755 --- a/examples/whatsapp.php +++ b/examples/whatsapp.php @@ -325,7 +325,7 @@ public function __construct(array $config) $this->nick = $this->config[$this->from]['nick']; $this->password = $this->config[$this->from]['waPassword']; - $this->wa = new WhatsProt($this->number, $this->id, $this->nick, false); + $this->wa = new WhatsProt($this->number, $this->nick, false); $this->wa->eventManager()->bind('onGetMessage', array($this, 'processReceivedMessage')); $this->wa->eventManager()->bind('onConnect', array($this, 'connected')); $this->wa->eventManager()->bind('onGetGroups', array($this, 'processGroupArray')); From ae524d4e7663448e2fd2d312a40f5747f60fd42a Mon Sep 17 00:00:00 2001 From: mgp25 Date: Fri, 27 Feb 2015 10:58:32 +0100 Subject: [PATCH 290/436] Update tests --- tests/whatsapp.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tests/whatsapp.php b/tests/whatsapp.php index 33d095c9..5c876c5c 100755 --- a/tests/whatsapp.php +++ b/tests/whatsapp.php @@ -19,7 +19,6 @@ function fgets_u($pStdn) // #### DO NOT ADD YOUR INFO AND THEN COMMIT THIS FILE! #### $sender = ""; // Mobile number with country code (but without + or 00) -$identity = ""; // Obtained during registration $password = ""; // Password you received from WhatsApp if ($argc < 2) { @@ -39,7 +38,7 @@ function fgets_u($pStdn) } echo "[] Logging in as '$nickname' ($sender)\n"; -$wa = new WhatsProt($sender, $identity, $nickname, TRUE); +$wa = new WhatsProt($sender, $nickname, TRUE); $wa->connect(); $wa->loginWithPassword($password); From e0f60921688f97fc1d5e3b30e7ddd565aa3925d3 Mon Sep 17 00:00:00 2001 From: Eduardo Soares Date: Fri, 27 Feb 2015 09:51:52 -0300 Subject: [PATCH 291/436] Update whatsprot.class.php --- src/whatsprot.class.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index dc7e2d0a..54b5c2d7 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -3402,13 +3402,14 @@ protected function processInboundDataNode(ProtocolNode $node, $autoReceipt = tru $this->sendClearDirty(array($child->getAttribute("type"))); break; case "account": - $this->eventManager()->fire("onPaymentRecieved",[ + $this->eventManager()->fire("onPaymentRecieved", + array( $this->phoneNumber, $child->getAttribute("kind"), $child->getAttribute("status"), $child->getAttribute("creation"), $child->getAttribute("expiration") - ]); + )); break; case "offline": From 406d70e0d898dc84836ff0fbcd970c8f9e0a28dd Mon Sep 17 00:00:00 2001 From: mgp25 Date: Fri, 27 Feb 2015 23:15:35 +0100 Subject: [PATCH 292/436] updated composer --- composer.json | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/composer.json b/composer.json index 877fdab3..852c0734 100644 --- a/composer.json +++ b/composer.json @@ -1,16 +1,15 @@ { "name": "mgp25/whatsapi", - "description": "PHP Interface for WhatsApp Messenger", + "description": "The php WhatsApp library ", "license": "MIT", "keywords": [ "WhatsApp", - "TextMessage", - "sms" + "WhatsAPI" ], "authors": [ { - "role": "Contributers", - "name": "WhatsApi Contributing Team", + "role": "Contributors", + "name": "WhatsAPI Official Contributing Team", "homepage": "https://github.com/mgp25/WhatsAPI-Official/graphs/contributors" } ], @@ -27,9 +26,12 @@ }, "require": { "php": ">=5.3", - "ext-curl": "*" - }, - "suggest": { - "williamson/larawhatsapi": "A laravel Wrapper for WhatsApi" + "ext-curl": "*", + "ext-gd" : "*", + "ext-sockets" : "*", + "ext-ffmpeg" : "*", + "ext-openssl" : "*", + "ext-pdo" : "*", + "ext-sqlite3" : "*" } -} \ No newline at end of file +} From 4da63550d57830bae0ba1781d032dfeab09fc811 Mon Sep 17 00:00:00 2001 From: kraken Date: Sat, 28 Feb 2015 15:18:40 +0500 Subject: [PATCH 293/436] icon is square --- src/func.php | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/src/func.php b/src/func.php index 5402dfcc..b6c5311e 100755 --- a/src/func.php +++ b/src/func.php @@ -114,18 +114,19 @@ function createIconGD($file, $size = 100, $raw = true) { list($width, $height) = getimagesize($file); if ($width > $height) { - //landscape - $nheight = ($height / $width) * $size; - $nwidth = $size; + $y = 0; + $x = ($width - $height) / 2; + $smallestSide = $height; } else { - $nwidth = ($width / $height) * $size; - $nheight = $size; + $x = 0; + $y = ($height - $width) / 2; + $smallestSide = $width; } - $image_p = imagecreatetruecolor($nwidth, $nheight); + $image_p = imagecreatetruecolor($size, $size); $image = imagecreatefromstring(file_get_contents($file)); - imagecopyresampled($image_p, $image, 0, 0, 0, 0, $nwidth, $nheight, $width, $height); + imagecopyresampled($image_p, $image, 0, 0, $x, $y, $size, $size, $smallestSide, $smallestSide); ob_start(); imagejpeg($image_p); $i = ob_get_contents(); From bf060432350e118e6c08bfa0ddb9f320e4a47a82 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Iv=C3=A1n=20Gabriel=20Sosa?= Date: Sun, 1 Mar 2015 06:39:19 -0300 Subject: [PATCH 294/436] Migrating to Bootstrap v3.3.2. Update jQuery to v1.9.1 (minimum required for Bootstrap 3) and included jQuery Migrate v1.2.1. Incorporated Font-Awesome 4.3.0. Minor changes. --- examples/whatsapp.php | 1873 +++++++++++++++++++++-------------------- 1 file changed, 963 insertions(+), 910 deletions(-) diff --git a/examples/whatsapp.php b/examples/whatsapp.php index 146946fc..cf81da42 100755 --- a/examples/whatsapp.php +++ b/examples/whatsapp.php @@ -730,69 +730,88 @@ public function showWebLoginForm($error = null) ?> - - - Personal Whatsapp Login - - - - - - - - - - - - -
-
"; - } - ?> - - - -
- -
- - - + + + + Personal Whatsapp Login + + + + + + + + + + +
+
+
+
+
+

Whatsapp! Login

+
+
+

'; + } + ?> + + +
+
+
+ +
+
+
+ +
+
+ +
+
+ +
+
+
+
+ + - - - - Personal Whatsapp - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-

Whatsapp! Messenger

-
- -
-
-
-
- -
-
- - -
-
-
-
- -
-
- - -
-
-
-
- -
-
- - -
-
-
-
- -
-
- -
-
-
-
- -
- -
-
- - -
-
-
-
- -
-
- - -
-
-
-
- -
-
- - -
-
-
-
- -
-
- - -
- - - - -
-
- -
-
-
-
-
-
-
- - -
-
-
-
-
- - + + + + + Personal Whatsapp + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+
+
+

Whatsapp! Messenger

+
+
+
+ +
+
+ +
+ +
+
+ + +
+
+
+
+ +
+
+ + +
+
+
+
+ +
+
+ + +
+
+
+ +
+
+
+ +
+
+
+ +
+ +
+
+
+
+ +
+ +
+
+ + +
+
+
+
+ +
+
+ + +
+
+
+
+ +
+
+ + +
+
+
+
+ +
+
+ + +
+
+
+ +
+
+
+ + +
+
+ + +
+
+ +
+
+
+ +
+
+
+ + +
+
+
+
+ +
+
+ +
+
+ +
+
+
+
+
+
+
+
+ + Date: Mon, 2 Mar 2015 09:57:27 +0100 Subject: [PATCH 295/436] removed ffmpeg from composer --- composer.json | 1 - 1 file changed, 1 deletion(-) diff --git a/composer.json b/composer.json index 852c0734..12ad72f4 100644 --- a/composer.json +++ b/composer.json @@ -29,7 +29,6 @@ "ext-curl": "*", "ext-gd" : "*", "ext-sockets" : "*", - "ext-ffmpeg" : "*", "ext-openssl" : "*", "ext-pdo" : "*", "ext-sqlite3" : "*" From 3397be8be63159beee8bfcf8b3f84322871aa66f Mon Sep 17 00:00:00 2001 From: mgp25 Date: Mon, 2 Mar 2015 15:18:29 +0100 Subject: [PATCH 296/436] identity not required --- examples/whatsapp.php | 3 --- 1 file changed, 3 deletions(-) diff --git a/examples/whatsapp.php b/examples/whatsapp.php index cf81da42..3ec7f0de 100755 --- a/examples/whatsapp.php +++ b/examples/whatsapp.php @@ -37,7 +37,6 @@ //Config Template //$config['YourFirstName'] = array( -// 'id' => '', // 'fromNumber' => '', // 'nick' => '', // 'waPassword' => "" @@ -51,7 +50,6 @@ // //Example //$config['Jonathan'] = array( -// 'id' => 'e807f1fcf82d132f9bb018ca6738a19f', // 'fromNumber' => '441234567890', // 'nick' => "Jonathan's iPhone", // 'waPassword' => "EsdfsawS+/ffdskjsdhwebdgxbs=", @@ -60,7 +58,6 @@ //); $config['YOURNAME'] = array( - 'id' => 'e807f1fcf82d132f9bb018ca6738a19f', 'fromNumber' => '441234567890', 'nick' => "YOURNICKNAME", 'waPassword' => "EsdfsawS+/ffdskjsdhwebdgxbs=", From 4219ff4a4754980b7c1d55b5c2ceb75de13f7153 Mon Sep 17 00:00:00 2001 From: mgp25 Date: Mon, 2 Mar 2015 15:29:24 +0100 Subject: [PATCH 297/436] fixed firing onGetPrivacyBlockedList event --- src/whatsprot.class.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index 54b5c2d7..c2cbcebf 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -3031,13 +3031,15 @@ protected function processInboundDataNode(ProtocolNode $node, $autoReceipt = tru if ($node->getTag() == "iq" && $node->getAttribute('type') == "result") { if ($node->getChild("query") != null) { - if ($node->getChild(0)->getAttribute('xmlns') == 'jabber:iq:privacy') { - // ToDo: We need to get explicitly list out the children as arguments - // here. + if ($node->nodeIdContains("getprivacy")) { + $listChild = $node->getChild(0)->getChild(0); + foreach ($listChild->getChildren() as $child) { + $blockedJids[] = $child->getAttribute('value'); + } $this->eventManager()->fire("onGetPrivacyBlockedList", array( $this->phoneNumber, - $node->getChild(0)->getChild(0)->getChildren() + $blockedJids )); } $this->eventManager()->fire("onGetRequestLastSeen", From 40c1459b56910bf16a64e0ce59b38b2756e31d6f Mon Sep 17 00:00:00 2001 From: Eduardo Soares Date: Tue, 3 Mar 2015 16:08:22 -0300 Subject: [PATCH 298/436] Update whatsprot.class.php --- src/whatsprot.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index 54b5c2d7..1933bedb 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -2690,7 +2690,7 @@ protected function processInboundDataNode(ProtocolNode $node, $autoReceipt = tru if ($node->hasChild('x') && $this->lastId == $node->getAttribute('id')) { $this->sendNextMessage(); } - if ($this->newMsgBind && $node->getChild('body')) { + if ($this->newMsgBind && ($node->getChild('body') || $node->getChild('media'))) { $this->newMsgBind->process($node); } if ($node->getAttribute("type") == "text" && $node->getChild('body') != null) { From 18600de59e03db88be1ac5295a38105ae0d75577 Mon Sep 17 00:00:00 2001 From: riekelt Date: Wed, 4 Mar 2015 11:04:56 +0100 Subject: [PATCH 299/436] Fixed typo in $msgID --- src/whatsprot.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index c2cbcebf..9ab1ef0b 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -3752,7 +3752,7 @@ protected function sendBroadcast($targets, $node, $type) ), array($node, $broadcastNode), null); $this->sendNode($messageNode); - $this->waitForServer($msgID); + $this->waitForServer($msgId); //listen for response $this->eventManager()->fire("onSendMessage", array( From 5f351ff6175a16e1d9130bd99716d5b22bde551d Mon Sep 17 00:00:00 2001 From: mgp25 Date: Thu, 5 Mar 2015 20:22:18 +0100 Subject: [PATCH 300/436] updated gitignote --- .gitignore | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 0daaa6cf..94f4a472 100644 --- a/.gitignore +++ b/.gitignore @@ -6,4 +6,5 @@ composer.phar .env.*.php .env.php .DS_Store -Thumbs.db \ No newline at end of file +Thumbs.db +*.dat From 27df0561bcc15df63ef3cdf8c95a295dbe4403d4 Mon Sep 17 00:00:00 2001 From: mgp25 Date: Fri, 6 Mar 2015 14:53:50 +0100 Subject: [PATCH 301/436] removed sendGetGroupsOwning --- src/whatsprot.class.php | 9 --------- 1 file changed, 9 deletions(-) diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index 9ab1ef0b..2e37e5a8 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -890,15 +890,6 @@ public function sendGetGroupV2Info($groupID) $this->sendNode($node); } - /** - * Send a request to return a list of groups user has started in. - * - * To capture this list you will need to bind the "onGetGroups" event. - */ - public function sendGetGroupsOwning() - { - $this->sendGetGroupsFiltered("owning"); - } /** * Send a request to get a list of people you have currently blocked. From bbffbcaff3d688b59ff86d313670862a88845ed7 Mon Sep 17 00:00:00 2001 From: mgp25 Date: Sun, 8 Mar 2015 02:17:08 +0100 Subject: [PATCH 302/436] Removed unnecessary string --- src/whatsprot.class.php | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index 1a3f3665..f8c934f8 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -462,8 +462,6 @@ public function connect() ); return true; } else { - $this->debugPrint("Firing onConnectError\n"); - $this->eventManager()->fire("onConnectError", array( $this->phoneNumber, From 1a16af831b14cd4fa9f5478360db78d62803fc9f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20Rodr=C3=ADguez?= Date: Tue, 10 Mar 2015 12:39:08 -0500 Subject: [PATCH 303/436] Update to AllEvents.php onGetLocation Renamed to $author as $name was already used by the notify attribute. --- src/events/AllEvents.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/events/AllEvents.php b/src/events/AllEvents.php index a0fd45e0..cd2f97f3 100644 --- a/src/events/AllEvents.php +++ b/src/events/AllEvents.php @@ -66,7 +66,7 @@ public function onGetImage($mynumber, $from, $id, $type, $time, $name, $size, $u public function onGetGroupImage($mynumber, $from_group_jid, $from_user_jid, $id, $type, $time, $name, $size, $url, $file, $mimeType, $fileHash, $width, $height, $preview, $caption) {} public function onGetGroupVideo($mynumber, $from_group_jid, $from_user_jid, $id, $type, $time, $name, $url, $file, $size, $mimeType, $fileHash, $duration, $vcodec, $acodec, $preview, $caption) {} public function onGetKeysLeft($mynumber, $keysLeft) {} - public function onGetLocation($mynumber, $from, $id, $type, $time, $name, $name, $longitude, $latitude, $url, $preview, $fromJID_ifGroup = null) {} + public function onGetLocation($mynumber, $from, $id, $type, $time, $name, $author, $longitude, $latitude, $url, $preview, $fromJID_ifGroup = null) {} public function onGetMessage($mynumber, $from, $id, $type, $time, $name, $body) {} public function onGetNormalizedJid($mynumber, $data) {} public function onGetPrivacyBlockedList($mynumber, $data) {} From 5253f50fffa49bc54ca205002ae4e8f1b0d93b63 Mon Sep 17 00:00:00 2001 From: mgp25 Date: Tue, 10 Mar 2015 20:09:11 +0100 Subject: [PATCH 304/436] update gitignore --- .gitignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitignore b/.gitignore index 94f4a472..62556abc 100644 --- a/.gitignore +++ b/.gitignore @@ -8,3 +8,5 @@ composer.phar .DS_Store Thumbs.db *.dat + +*.db From f79797458df17da35015ce86cf9c69f3c55d9ab8 Mon Sep 17 00:00:00 2001 From: mgp25 Date: Tue, 10 Mar 2015 20:09:33 +0100 Subject: [PATCH 305/436] Update WA version --- src/whatsprot.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index f8c934f8..2942b57d 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -48,7 +48,7 @@ class WhatsProt const WHATSAPP_SERVER = 's.whatsapp.net'; // The hostname used to login/send messages. const WHATSAPP_UPLOAD_HOST = 'https://mms.whatsapp.net/client/iphone/upload.php'; // The upload host. const WHATSAPP_DEVICE = 'iPhone'; // The device name. - const WHATSAPP_VER = '2.11.14'; // The WhatsApp version. + const WHATSAPP_VER = '2.11.16'; // The WhatsApp version. const WHATSAPP_USER_AGENT = 'WhatsApp/2.12.61 S40Version/14.26 Device/Nokia302'; // User agent used in request/registration code. const WHATSAPP_VER_CHECKER = 'https://coderus.openrepos.net/whitesoft/whatsapp_version'; // Check WhatsApp version From c53feb7062fdc0b2c61bcc215272a402c6a87ac8 Mon Sep 17 00:00:00 2001 From: mgp25 Date: Thu, 12 Mar 2015 09:19:59 +0100 Subject: [PATCH 306/436] update registerTool MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit code explainedโ€ฆ sigh, read the wiki please D: --- examples/registerTool.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/registerTool.php b/examples/registerTool.php index 6a310cdd..f0ab0132 100644 --- a/examples/registerTool.php +++ b/examples/registerTool.php @@ -25,7 +25,7 @@ exit(0); } -echo "\n\nEnter the received code: "; +echo "\n\nEnter the received code, if you receive 123-456, write it like this 123456: "; $code = fgets(STDIN); try { From 5c453c450eefa67c842c53c62af56ebc9b3eff82 Mon Sep 17 00:00:00 2001 From: mgp25 Date: Thu, 12 Mar 2015 19:18:35 +0100 Subject: [PATCH 307/436] update registerTool --- examples/registerTool.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/registerTool.php b/examples/registerTool.php index f0ab0132..bbd9f742 100644 --- a/examples/registerTool.php +++ b/examples/registerTool.php @@ -25,8 +25,8 @@ exit(0); } -echo "\n\nEnter the received code, if you receive 123-456, write it like this 123456: "; -$code = fgets(STDIN); +echo "\n\nEnter the received code: "; +$code = str_replace("-", "", fgets(STDIN)); try { $result = $w->codeRegister(trim($code)); From 2eba3b5bbc01adec1758ddd90308fa808365ee30 Mon Sep 17 00:00:00 2001 From: Xaamin Date: Sun, 15 Mar 2015 11:11:16 -0600 Subject: [PATCH 308/436] Added return message IDs Update WA version. Added return statement to retrieve messade IDs for every message type (location, audio, video, vcard, image). --- src/whatsprot.class.php | 99 +++++++++++++++++++++++++---------------- 1 file changed, 60 insertions(+), 39 deletions(-) diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index 2942b57d..a5aa0475 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -48,8 +48,8 @@ class WhatsProt const WHATSAPP_SERVER = 's.whatsapp.net'; // The hostname used to login/send messages. const WHATSAPP_UPLOAD_HOST = 'https://mms.whatsapp.net/client/iphone/upload.php'; // The upload host. const WHATSAPP_DEVICE = 'iPhone'; // The device name. - const WHATSAPP_VER = '2.11.16'; // The WhatsApp version. - const WHATSAPP_USER_AGENT = 'WhatsApp/2.12.61 S40Version/14.26 Device/Nokia302'; // User agent used in request/registration code. + const WHATSAPP_VER = '2.12.7'; // The WhatsApp version. + const WHATSAPP_USER_AGENT = 'WhatsApp/2.12.7 S40Version/14.26 Device/Nokia302'; // User agent used in request/registration code. const WHATSAPP_VER_CHECKER = 'https://coderus.openrepos.net/whitesoft/whatsapp_version'; // Check WhatsApp version /** @@ -639,13 +639,15 @@ public function sendGetCipherKeysFromUser($number) * @param bool $storeURLmedia Keep a copy of the audio file on your server * @param int $fsize * @param string $fhash + * @return string|null Message ID if successfully, null if not. */ public function sendBroadcastAudio($targets, $path, $storeURLmedia = false, $fsize = 0, $fhash = "") { if (!is_array($targets)) { $targets = array($targets); } - $this->sendMessageAudio($targets, $path, $storeURLmedia, $fsize, $fhash); + // Return message ID. Make pull request for this. + return $this->sendMessageAudio($targets, $path, $storeURLmedia, $fsize, $fhash); } /** @@ -662,13 +664,15 @@ public function sendBroadcastAudio($targets, $path, $storeURLmedia = false, $fsi * @param int $fsize * @param string $fhash * @param string $caption + * @return string|null Message ID if successfully, null if not. */ public function sendBroadcastImage($targets, $path, $storeURLmedia = false, $fsize = 0, $fhash = "", $caption = "") { if (!is_array($targets)) { $targets = array($targets); } - $this->sendMessageImage($targets, $path, $storeURLmedia, $fsize, $fhash, $caption); + // Return message ID. Make pull request for this. + return $this->sendMessageImage($targets, $path, $storeURLmedia, $fsize, $fhash, $caption); } /** @@ -681,21 +685,22 @@ public function sendBroadcastImage($targets, $path, $storeURLmedia = false, $fsi * thumbnail of entered Lat/Long but NO name/url for location. * * With name supplied, a combined map thumbnail/name box is displayed - * Approx 20 (unverified) is the maximum number of targets * - * @param array $targets An array of numbers to send to. - * @param float $long The longitude of the location eg 54.31652 - * @param float $lat The latitude if the location eg -6.833496 - * @param string $name (Optional) A name to describe the location - * @param string $url (Optional) A URL to link location to web resource + * @param array $targets An array of numbers to send to. + * @param float $long The longitude of the location eg 54.31652 + * @param float $lat The latitude if the location eg -6.833496 + * @param string $name (Optional) A name to describe the location + * @param string $url (Optional) A URL to link location to web resource + * @return string Message ID */ public function sendBroadcastLocation($targets, $long, $lat, $name = null, $url = null) { if (!is_array($targets)) { $targets = array($targets); } - $this->sendMessageLocation($targets, $long, $lat, $name, $url); + // Return message ID. Make pull request for this. + return $this->sendMessageLocation($targets, $long, $lat, $name, $url); } /** @@ -706,14 +711,16 @@ public function sendBroadcastLocation($targets, $long, $lat, $name = null, $url * * Approx 20 (unverified) is the maximum number of targets * - * @param array $targets An array of numbers to send to. - * @param string $message Your message + * @param array $targets An array of numbers to send to. + * @param string $message Your message + * @return string Message ID */ public function sendBroadcastMessage($targets, $message) { $message = $this->parseMessageForEmojis($message); $bodyNode = new ProtocolNode("body", null, null, $message); - $this->sendBroadcast($targets, $bodyNode, "text"); + // Return message ID. Make pull request for this. + return $this->sendBroadcast($targets, $bodyNode, "text"); } /** @@ -730,13 +737,15 @@ public function sendBroadcastMessage($targets, $message) * @param int $fsize * @param string $fhash * @param string $caption + * @return string|null Message ID if successfully, null if not. */ public function sendBroadcastVideo($targets, $path, $storeURLmedia = false, $fsize = 0, $fhash = "", $caption = "") { if (!is_array($targets)) { $targets = array($targets); } - $this->sendMessageVideo($targets, $path, $storeURLmedia, $fsize, $fhash, $caption); + // Return message ID. Make pull request for this. + return $this->sendMessageVideo($targets, $path, $storeURLmedia, $fsize, $fhash, $caption); } /** @@ -1574,19 +1583,19 @@ public function sendMessageRead($to, $id) * @param string $filepath The url/uri to the audio file. * @param bool $storeURLmedia Keep copy of file * @param int $fsize - * @param string $fhash - * - * @return bool + * @param string $fhash * + * @return string|null Message ID if successfully, null if not. */ public function sendMessageAudio($to, $filepath, $storeURLmedia = false, $fsize = 0, $fhash = "") { if ($fsize == 0 || $fhash == "") { $allowedExtensions = array('3gp', 'caf', 'wav', 'mp3', 'wma', 'ogg', 'aif', 'aac', 'm4a'); $size = 10 * 1024 * 1024; // Easy way to set maximum file size for this media type. + // Return message ID. Make pull request for this. return $this->sendCheckAndSendMedia($filepath, $size, $to, 'audio', $allowedExtensions, $storeURLmedia); } else { - $this->sendRequestFileUpload($fhash, 'audio', $fsize, $filepath, $to); - return true; + // Return message ID. Make pull request for this. + return $this->sendRequestFileUpload($fhash, 'audio', $fsize, $filepath, $to); } } @@ -1609,7 +1618,7 @@ public function sendMessageComposing($to) * @param int $fsize size of the media file * @param string $fhash base64 hash of the media file * @param string $caption - * @return bool + * @return string|null Message ID if successfully, null if not. */ public function sendMessageImage($to, $filepath, $storeURLmedia = false, $fsize = 0, $fhash = "", $caption = "") { @@ -1617,10 +1626,11 @@ public function sendMessageImage($to, $filepath, $storeURLmedia = false, $fsize if ($fsize == 0 || $fhash == "") { $allowedExtensions = array('jpg', 'jpeg', 'gif', 'png'); $size = 5 * 1024 * 1024; // Easy way to set maximum file size for this media type. + // Return message ID. Make pull request for this. return $this->sendCheckAndSendMedia($filepath, $size, $to, 'image', $allowedExtensions, $storeURLmedia, $caption); } else { - $this->sendRequestFileUpload($fhash, 'image', $fsize, $filepath, $to, $caption); - return true; + // Return message ID. Make pull request for this. + return $this->sendRequestFileUpload($fhash, 'image', $fsize, $filepath, $to, $caption); } } @@ -1637,6 +1647,7 @@ public function sendMessageImage($to, $filepath, $storeURLmedia = false, $fsize * @param float $lat The latitude of the location, e.g. -6.833496. * @param string $name (Optional) A custom name for the specified location. * @param string $url (Optional) A URL to attach to the specified location. + * @return string Message ID */ public function sendMessageLocation($to, $long, $lat, $name = null, $url = null) { @@ -1653,6 +1664,9 @@ public function sendMessageLocation($to, $long, $lat, $name = null, $url = null) $id = (is_array($to)) ? $this->sendBroadcast($to, $mediaNode, "media") : $this->sendMessageNode($to, $mediaNode); $this->waitForServer($id); + + // Return message ID. Make pull request for this. + return $id; } /** @@ -1683,9 +1697,8 @@ protected function sendChatState($to, $state) * @param bool $storeURLmedia Keep a copy of media file. * @param int $fsize Size of the media file * @param string $fhash base64 hash of the media file - * @param string $caption - * - * @return bool + * @param string $caption * + * @return string|null Message ID if successfully, null if not. */ public function sendMessageVideo($to, $filepath, $storeURLmedia = false, $fsize = 0, $fhash = "", $caption = "") { @@ -1694,10 +1707,11 @@ public function sendMessageVideo($to, $filepath, $storeURLmedia = false, $fsize if ($fsize == 0 || $fhash == "") { $allowedExtensions = array('3gp', 'mp4', 'mov', 'avi'); $size = 20 * 1024 * 1024; // Easy way to set maximum file size for this media type. + // Return message ID. Make pull request for this. return $this->sendCheckAndSendMedia($filepath, $size, $to, 'video', $allowedExtensions, $storeURLmedia, $caption); } else { - $this->sendRequestFileUpload($fhash, 'video', $fsize, $filepath, $to, $caption); - return true; + // Return message ID. Make pull request for this. + return $this->sendRequestFileUpload($fhash, 'video', $fsize, $filepath, $to, $caption); } } @@ -1940,6 +1954,7 @@ public function sendStatusUpdate($txt) * @param string $to The recipient to send. * @param string $name The contact name. * @param object $vCard The contact vCard to send. + * @return string Message ID */ public function sendVcard($to, $name, $vCard) { @@ -1953,7 +1968,8 @@ public function sendVcard($to, $name, $vCard) "type" => "vcard" ), array($vCardNode), ""); - $this->sendMessageNode($to, $mediaNode); + // Return message ID. Make pull request for this. + return $this->sendMessageNode($to, $mediaNode); } /** @@ -1962,6 +1978,7 @@ public function sendVcard($to, $name, $vCard) * @param array $targets An array of recipients to send to. * @param string $name The vCard contact name. * @param object $vCard The contact vCard to send. + * @return string Message ID */ public function sendBroadcastVcard($targets, $name, $vCard) { @@ -1975,7 +1992,8 @@ public function sendBroadcastVcard($targets, $name, $vCard) "type" => "vcard" ), array($vCardNode), ""); - $this->sendBroadcast($targets, $mediaNode, "media"); + // Return message ID. Make pull request for this. + return $this->sendBroadcast($targets, $mediaNode, "media"); } /** @@ -2310,7 +2328,6 @@ protected function isLoggedIn(){ * Create an identity string * * @param string $identity Identity. - * @return string Correctly formatted identity * * @throws Exception Error when cannot write identity data to file. @@ -3684,27 +3701,27 @@ public function readStanza() * @param string $type media filetype. 'audio', 'video', 'image' * @param array $allowedExtensions An array of allowable file types for the media file * @param bool $storeURLmedia Keep a copy of the media file - * @param string $caption - * - * @return bool + * @param string $caption * + * @return string|null Message ID if successfully, null if not. */ protected function sendCheckAndSendMedia($filepath, $maxSize, $to, $type, $allowedExtensions, $storeURLmedia, $caption = "") { if ($this->getMediaFile($filepath, $maxSize) == true) { if (in_array($this->mediaFileInfo['fileextension'], $allowedExtensions)) { $b64hash = base64_encode(hash_file("sha256", $this->mediaFileInfo['filepath'], true)); - //request upload - $this->sendRequestFileUpload($b64hash, $type, $this->mediaFileInfo['filesize'], $this->mediaFileInfo['filepath'], $to, $caption); + //request upload and get Message ID + $id =$this->sendRequestFileUpload($b64hash, $type, $this->mediaFileInfo['filesize'], $this->mediaFileInfo['filepath'], $to, $caption); $this->processTempMediaFile($storeURLmedia); - return true; + // Return message ID. Make pull request for this. + return $id; } else { //Not allowed file type. $this->processTempMediaFile($storeURLmedia); - return false; + return null; } } else { //Didn't get media file details. - return false; + return null; } } @@ -3907,6 +3924,7 @@ protected function sendNode($node, $encrypt = true) * @param string $filepath Path to image file * @param mixed $to Recipient(s) * @param string $caption + * @return string Message ID */ protected function sendRequestFileUpload($b64hash, $type, $size, $filepath, $to, $caption = "") { @@ -3941,6 +3959,9 @@ protected function sendRequestFileUpload($b64hash, $type, $size, $filepath, $to, $this->sendNode($node); $this->waitForServer($id); + + // Return message ID. Make pull request for this. + return $messageId; } /** From dc7afb8dd4f97cc657a905119a1bb1f2e957ccb3 Mon Sep 17 00:00:00 2001 From: Xaamin Date: Sun, 15 Mar 2015 14:39:29 -0600 Subject: [PATCH 309/436] =?UTF-8?q?Rollback=20WA=20versi=C3=B3n=20for=20iP?= =?UTF-8?q?hone=20device.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Thanks to Marcos. --- src/whatsprot.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index a5aa0475..43b67cd8 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -48,8 +48,8 @@ class WhatsProt const WHATSAPP_SERVER = 's.whatsapp.net'; // The hostname used to login/send messages. const WHATSAPP_UPLOAD_HOST = 'https://mms.whatsapp.net/client/iphone/upload.php'; // The upload host. const WHATSAPP_DEVICE = 'iPhone'; // The device name. - const WHATSAPP_VER = '2.12.7'; // The WhatsApp version. - const WHATSAPP_USER_AGENT = 'WhatsApp/2.12.7 S40Version/14.26 Device/Nokia302'; // User agent used in request/registration code. + const WHATSAPP_VER = '2.11.16'; // The WhatsApp version. + const WHATSAPP_USER_AGENT = 'WhatsApp/2.12.61 S40Version/14.26 Device/Nokia302'; // User agent used in request/registration code. const WHATSAPP_VER_CHECKER = 'https://coderus.openrepos.net/whitesoft/whatsapp_version'; // Check WhatsApp version /** From e80d04ba48d2e42e257b6aaad5d44a653994b272 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjam=C3=ADn=20Mart=C3=ADnez=20Mateos?= Date: Mon, 16 Mar 2015 10:44:59 -0600 Subject: [PATCH 310/436] Send the same message id generated with sendRequestFileUpload on processUploadResponse --- src/whatsprot.class.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index 43b67cd8..b03a0168 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -3606,12 +3606,14 @@ protected function processUploadResponse($node) $icon = ''; break; } + //Retrieve Message ID + $message_id = $messageNode['message_id']; $mediaNode = new ProtocolNode("media", $mediaAttribs, null, $icon); if (is_array($to)) { $this->sendBroadcast($to, $mediaNode, "media"); } else { - $this->sendMessageNode($to, $mediaNode); + $this->sendMessageNode($to, $mediaNode, $message_id); } $this->eventManager()->fire("onMediaMessageSent", array( From 62343c031bc1f66219a6d3074020e8671d902807 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20Rodr=C3=ADguez?= Date: Mon, 16 Mar 2015 19:32:08 -0500 Subject: [PATCH 311/436] Update to WhatsApp main Split the onPresence event to get the last seen from those who share it. --- src/whatsprot.class.php | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index b03a0168..da38eca1 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -2923,18 +2923,17 @@ protected function processInboundDataNode(ProtocolNode $node, $autoReceipt = tru && strpos($node->getAttribute('from'), "-") === false) { $presence = array(); if ($node->getAttribute('type') == null) { - $this->eventManager()->fire("onPresence", + $this->eventManager()->fire("onPresenceAvailable", array( $this->phoneNumber, $node->getAttribute('from'), - $presence['type'] = "available" )); } else { - $this->eventManager()->fire("onPresence", + $this->eventManager()->fire("onPresenceUnavailable", array( $this->phoneNumber, $node->getAttribute('from'), - $presence['type'] = "unavailable" + $node->getAttribute('last') )); } } From 19f0b2d43e3ff4088367974b35e607fb3bc16d68 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20Rodr=C3=ADguez?= Date: Mon, 16 Mar 2015 19:33:12 -0500 Subject: [PATCH 312/436] Update AllEvents.php Split the onPresence event to track the last seen. --- src/events/AllEvents.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/events/AllEvents.php b/src/events/AllEvents.php index cd2f97f3..40ef21e6 100644 --- a/src/events/AllEvents.php +++ b/src/events/AllEvents.php @@ -98,7 +98,8 @@ public function onMessageReceivedServer($mynumber, $from, $id, $type, $time) {} public function onPaidAccount($mynumber, $author, $kind, $status, $creation, $expiration) {} public function onPaymentRecieved($mynumber, $kind, $status, $creation, $expiration) {} public function onPing($mynumber, $id) {} - public function onPresence($mynumber, $from, $status) {} + public function onPresenceAvailable($mynumber, $from) {} + public function onPresenceUnavailable($mynumber, $from, $last) {} public function onProfilePictureChanged($mynumber, $from, $id, $time) {} public function onProfilePictureDeleted($mynumber, $from, $id, $time) {} public function onSendMessage($mynumber, $target, $messageId, $node) {} From 23952c84a8f51aee4d9f3fc3f0fa2501b85c71bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20Rodr=C3=ADguez?= Date: Mon, 16 Mar 2015 19:33:55 -0500 Subject: [PATCH 313/436] Update MyEvents.php Split the onPresence event to track the last seen. --- src/events/MyEvents.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/events/MyEvents.php b/src/events/MyEvents.php index cc70c1c4..58cf0cff 100644 --- a/src/events/MyEvents.php +++ b/src/events/MyEvents.php @@ -62,7 +62,8 @@ class MyEvents extends AllEvents // 'onMessageReceivedServer', // 'onPaidAccount', // 'onPing', -// 'onPresence', +// 'onPresenceAvailable', +// 'onPresenceUnavailable', // 'onProfilePictureChanged', // 'onProfilePictureDeleted', // 'onSendMessage', From 60b8502319285740df2a95fe87e30155a7589506 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20Rodr=C3=ADguez?= Date: Mon, 16 Mar 2015 19:37:29 -0500 Subject: [PATCH 314/436] Update Simple CLI Client.php Split the onPresence event to track last seen if available --- examples/Simple CLI client.php | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/examples/Simple CLI client.php b/examples/Simple CLI client.php index 0b85db3f..bc5fd03a 100755 --- a/examples/Simple CLI client.php +++ b/examples/Simple CLI client.php @@ -40,19 +40,23 @@ function fgets_u($pStdn) return null; } -function onPresenceReceived($username, $from, $type) +function onPresenceAvailable($username, $from) { $dFrom = str_replace(array("@s.whatsapp.net","@g.us"), "", $from); - if($type == "available") - echo "<$dFrom is online>\n\n"; - else - echo "<$dFrom is offline>\n\n"; + echo "<$dFrom is online>\n\n"; +} + +function onPresenceUnavailable($username, $from, $last) +{ + $dFrom = str_replace(array("@s.whatsapp.net","@g.us"), "", $from); + echo "<$dFrom is offline>\n\n"; } echo "[] logging in as '$nickname' ($username)\n"; $w = new WhatsProt($username, $nickname, $debug); -$w->eventManager()->bind("onPresence", "onPresenceReceived"); +$w->eventManager()->bind("onPresenceAvailable", "onPresenceAvailable"); +$w->eventManager()->bind("onPresenceUnavailable", "onPresenceUnavailable"); $w->connect(); // Nos conectamos a la red de WhatsApp $w->loginWithPassword($password); // Iniciamos sesion con nuestra contraseรฑa From 0ce294f6102122b7af14ebd13f7e5b1a2a8c67eb Mon Sep 17 00:00:00 2001 From: mgp25 Date: Fri, 20 Mar 2015 10:57:48 +0100 Subject: [PATCH 315/436] blockChecker Check if your account is blocked or not --- examples/blockChecker.php | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 examples/blockChecker.php diff --git a/examples/blockChecker.php b/examples/blockChecker.php new file mode 100644 index 00000000..a1371070 --- /dev/null +++ b/examples/blockChecker.php @@ -0,0 +1,34 @@ +eventManager()->bind("onCredentialsBad", "onCredentialsBad"); +$w->eventManager()->bind("onCredentialsGood", "onCredentialsGood"); + + +$w->checkCredentials(); + +?> From 65ae97ecf0aea12b5bafe01214b10b3e855a6b52 Mon Sep 17 00:00:00 2001 From: mgp25 Date: Fri, 20 Mar 2015 13:51:56 +0100 Subject: [PATCH 316/436] update blockChecker --- examples/blockChecker.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/examples/blockChecker.php b/examples/blockChecker.php index a1371070..f27715df 100644 --- a/examples/blockChecker.php +++ b/examples/blockChecker.php @@ -8,6 +8,8 @@ function onCredentialsBad($mynumber, $status, $reason) { if ($reason == 'blocked') echo "\n\nYour number is blocked \n"; + if ($reason == 'incorrect') + echo "\n\nWrong identity. \n"; } function onCredentialsGood($mynumber, $login, $password, $type, $expiration, $kind, $price, $cost, $currency, $price_expiration) From 50ab338915fd787ac7f32e70bd50a28db4eedde0 Mon Sep 17 00:00:00 2001 From: mgp25 Date: Fri, 20 Mar 2015 15:37:07 +0100 Subject: [PATCH 317/436] Update reg. ver. --- src/token.php | 2 +- src/whatsprot.class.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/token.php b/src/token.php index bfa8f69f..d26cd719 100755 --- a/src/token.php +++ b/src/token.php @@ -20,7 +20,7 @@ function generateRequestToken($country, $phone) // return base64_encode($output); - $token = md5("PdA2DJyKoUrwLw1Bg6EIhzh502dF9noR9uFCllGk1419900749520".$phone); + $token = md5("PdA2DJyKoUrwLw1Bg6EIhzh502dF9noR9uFCllGk1425519315543".$phone); return $token; } diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index b03a0168..e1599103 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -49,7 +49,7 @@ class WhatsProt const WHATSAPP_UPLOAD_HOST = 'https://mms.whatsapp.net/client/iphone/upload.php'; // The upload host. const WHATSAPP_DEVICE = 'iPhone'; // The device name. const WHATSAPP_VER = '2.11.16'; // The WhatsApp version. - const WHATSAPP_USER_AGENT = 'WhatsApp/2.12.61 S40Version/14.26 Device/Nokia302'; // User agent used in request/registration code. + const WHATSAPP_USER_AGENT = 'WhatsApp/2.12.68 S40Version/14.26 Device/Nokia302'; // User agent used in request/registration code. const WHATSAPP_VER_CHECKER = 'https://coderus.openrepos.net/whitesoft/whatsapp_version'; // Check WhatsApp version /** From 3dc8921bea5238c9582bb1c8b2515c9a67c8cab3 Mon Sep 17 00:00:00 2001 From: mgp25 Date: Mon, 23 Mar 2015 12:17:06 +0100 Subject: [PATCH 318/436] Fixes #543 --- src/whatsprot.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index 36377425..17e5c58c 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -394,7 +394,7 @@ public function codeRequest($method = 'sms', $carrier = "T-Mobile5") $this->phoneNumber, $method, $response->reason, - $response->param + isset($response->param) ? $response->param : NULL )); throw new Exception('There was a problem trying to request the code.'); } From 2f6e28f3f204af13e080c86591ca7ba4a0421d70 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20P=C3=BCschel?= Date: Wed, 25 Mar 2015 17:41:33 +0100 Subject: [PATCH 319/436] call onGetGroupV2Info Event for all childs in onGetGroups (we have here already that data) --- src/events/AllEvents.php | 2 +- src/whatsprot.class.php | 66 +++++++++++++++++++++++++--------------- 2 files changed, 43 insertions(+), 25 deletions(-) diff --git a/src/events/AllEvents.php b/src/events/AllEvents.php index 40ef21e6..f4b9f119 100644 --- a/src/events/AllEvents.php +++ b/src/events/AllEvents.php @@ -60,7 +60,7 @@ public function onGetGroupMessage($mynumber, $from_group_jid, $from_user_jid, $i public function onGetGroupParticipants($mynumber, $groupId, $groupList) {} public function onGetGroups($mynumber, $groupList) {} public function onGetGroupsInfo($mynumber, $groupList) {} - public function onGetGroupV2Info($mynumber, $creator, $creation, $subject, $participants, $admin) {} + public function onGetGroupV2Info( $mynumber, $creator, $creation, $subject, $participants, $admins, $fromGetGroup ){} public function onGetGroupsSubject($mynumber, $group_jid, $time, $author, $name, $subject) {} public function onGetImage($mynumber, $from, $id, $type, $time, $name, $size, $url, $file, $mimeType, $fileHash, $width, $height, $preview, $caption) {} public function onGetGroupImage($mynumber, $from_group_jid, $from_user_jid, $id, $type, $time, $name, $size, $url, $file, $mimeType, $fileHash, $width, $height, $preview, $caption) {} diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index 17e5c58c..a5312d74 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -3085,9 +3085,11 @@ protected function processInboundDataNode(ProtocolNode $node, $autoReceipt = tru //There are multiple types of Group reponses. Also a valid group response can have NO children. //Events fired depend on text in the ID field. $groupList = array(); + $groupNodes = array(); if ($node->getChild(0) != null && $node->getChild(0)->getChildren() != null) { foreach ($node->getChild(0)->getChildren() as $child) { $groupList[] = $child->getAttributes(); + $groupNodes[] = $child; } } if ($node->nodeIdContains('creategroup')) { @@ -3112,6 +3114,13 @@ protected function processInboundDataNode(ProtocolNode $node, $autoReceipt = tru $this->phoneNumber, $groupList )); + //getGroups returns a array of nodes which are exactly the same as from getGroupV2Info + //so lets call this event, we have all data at hand, no need to call getGroupV2Info for every + //group we are interested + foreach ($groupNodes AS $groupNode) { + $this->handleGroupV2InfoResponse($groupNode, true); + } + } if ($node->nodeIdContains('getgroupinfo')) { $this->eventManager()->fire("onGetGroupsInfo", @@ -3131,33 +3140,10 @@ protected function processInboundDataNode(ProtocolNode $node, $autoReceipt = tru } } if ($node->nodeIdContains('get_groupv2_info')) { - $groupId = self::parseJID($node->getAttribute('from')); - - $groupList = array(); $groupChild = $node->getChild(0); if ($groupChild != null) { - $creator = $groupChild->getAttribute('creator'); - $creation = $groupChild->getAttribute('creation'); - $subject = $groupChild->getAttribute('subject'); - if ($groupChild->getChild(0) != null) { - foreach ($groupChild->getChildren() as $child) { - $participants[] = $child->getAttribute('jid'); - if ($child->getAttribute('type') != null) { - $admin = $child->getAttribute('jid'); - } - } - } + $this->handleGroupV2InfoResponse($groupChild); } - - $this->eventManager()->fire("onGetGroupV2Info", - array( - $this->phoneNumber, - $creator, - $creation, - $subject, - $participants, - $admin - )); } if ($node->nodeIdContains("get_lists")) { $broadcastLists = array(); @@ -4057,4 +4043,36 @@ public static function parseJID($jid) $parts = reset($parts); return $parts; } + + + + /** + * @param ProtocolNode $groupNode + */ + protected function handleGroupV2InfoResponse(ProtocolNode $groupNode, $fromGetGroups = false) + { + $creator = $groupNode->getAttribute('creator'); + $creation = $groupNode->getAttribute('creation'); + $subject = $groupNode->getAttribute('subject'); + $participants = array(); + $admins = array(); + if ($groupNode->getChild(0) != null) { + foreach ($groupNode->getChildren() as $child) { + $participants[] = $child->getAttribute('jid'); + if ($child->getAttribute('type') == "admin") + $admins[] = $child->getAttribute('jid'); + } + } + $this->eventManager()->fire("onGetGroupV2Info", + array( + $this->phoneNumber, + $creator, + $creation, + $subject, + $participants, + $admins, + $fromGetGroups + ) + ); + } } From f62408226564157c927523414230b66c5e4ba229 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20P=C3=BCschel?= Date: Thu, 26 Mar 2015 10:04:17 +0100 Subject: [PATCH 320/436] adding Event for Promote of GroupMembers --- src/events/AllEvents.php | 1 + src/events/MyEvents.php | 1 + src/whatsprot.class.php | 16 ++++++++++++++++ 3 files changed, 18 insertions(+) diff --git a/src/events/AllEvents.php b/src/events/AllEvents.php index 40ef21e6..ae5420b9 100644 --- a/src/events/AllEvents.php +++ b/src/events/AllEvents.php @@ -84,6 +84,7 @@ public function onGroupisCreated($mynumber, $creator, $gid, $subject, $admin, $c public function onGroupsChatCreate($mynumber, $gid) {} public function onGroupsChatEnd($mynumber, $gid) {} public function onGroupsParticipantsAdd($mynumber, $groupId, $jid) {} + public function onGroupsParticipantsPromote($myNumber, $groupJID, $time, $issuerJID, $issuerName, $promotedJIDs = array()) {} public function onGroupsParticipantsRemove($mynumber, $groupId, $jid) {} public function onLogin($mynumber) {} public function onLoginFailed($mynumber, $data) {} diff --git a/src/events/MyEvents.php b/src/events/MyEvents.php index 58cf0cff..457022bd 100644 --- a/src/events/MyEvents.php +++ b/src/events/MyEvents.php @@ -50,6 +50,7 @@ class MyEvents extends AllEvents // 'onGroupsChatCreate', // 'onGroupsChatEnd', // 'onGroupsParticipantsAdd', +// 'onGroupsParticipantsPromote', // 'onGroupsParticipantsRemove', // 'onLogin', // 'onLoginFailed', diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index 17e5c58c..f30a10be 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -3368,6 +3368,22 @@ protected function processInboundDataNode(ProtocolNode $node, $autoReceipt = tru $node->getChild(0)->getAttribute('subject') )); } + else if ($node->hasChild('promote')) { + $promotedJIDs = array(); + foreach ($node->getChild(0)->getChildren() AS $cn) { + $promotedJIDs[] = $cn->getAttribute('jid'); + } + $this->eventManager()->fire("onGroupParticipantsPromote", + array( + $this->phoneNumber, + $node->getAttribute('from'), //Group-JID + $node->getAttribute('t'), //Time + $node->getAttribute('participant'), //Issuer-JID + $node->getAttribute('notify'), //Issuer-Name + $promotedJIDs, + ) + ); + } break; case "account": if (($node->getChild(0)->getAttribute('author')) == "") From a23a334a4c950cbd82b268c3e3e29c5a4aa15706 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20P=C3=BCschel?= Date: Thu, 26 Mar 2015 10:42:59 +0100 Subject: [PATCH 321/436] fixing Typo --- src/whatsprot.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index f30a10be..ca57c12d 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -3373,7 +3373,7 @@ protected function processInboundDataNode(ProtocolNode $node, $autoReceipt = tru foreach ($node->getChild(0)->getChildren() AS $cn) { $promotedJIDs[] = $cn->getAttribute('jid'); } - $this->eventManager()->fire("onGroupParticipantsPromote", + $this->eventManager()->fire("onGroupsParticipantsPromote", array( $this->phoneNumber, $node->getAttribute('from'), //Group-JID From ebdacaa81b1eb2b2cce7e9733f17f6a79f2f6fed Mon Sep 17 00:00:00 2001 From: kraken Date: Sun, 29 Mar 2015 19:00:36 +0500 Subject: [PATCH 322/436] removing unreachable code --- src/whatsprot.class.php | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index 4ef22146..3fc2d83b 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -2617,6 +2617,11 @@ protected function processInboundDataNode(ProtocolNode $node, $autoReceipt = tru $this->processChallenge($node); } elseif ($node->getTag() == "failure") { $this->loginStatus = static::DISCONNECTED_STATUS; + $this->eventManager()->fire("onLoginFailed", + array( + $this->phoneNumber, + $node->getChild(0)->getTag() + )); } elseif ($node->getTag() == "success") { if ($node->getAttribute("status") == "active") { $this->loginStatus = static::CONNECTED_STATUS; @@ -2642,12 +2647,6 @@ protected function processInboundDataNode(ProtocolNode $node, $autoReceipt = tru $node->getAttribute("expiration") )); } - } elseif ($node->getTag() == "failure") { - $this->eventManager()->fire("onLoginFailed", - array( - $this->phoneNumber, - $node->getChild(0)->getTag() - )); } elseif ($node->getTag() == 'ack' && $node->getAttribute("class") == "message") { $this->eventManager()->fire("onMessageReceivedServer", array( From cb840c77b5deedbc3113232a120255b492486711 Mon Sep 17 00:00:00 2001 From: kraken Date: Sun, 29 Mar 2015 21:12:05 +0500 Subject: [PATCH 323/436] LoginFailureException --- src/exception.php | 4 +++- src/whatsprot.class.php | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/exception.php b/src/exception.php index 951eaec0..387ef571 100755 --- a/src/exception.php +++ b/src/exception.php @@ -46,4 +46,6 @@ public function __toString() * Exception occurs when we have no active socket * connection to whatsapp */ -class ConnectionException extends Exception{} \ No newline at end of file +class ConnectionException extends Exception{} + +class LoginFailureException extends Exception{} \ No newline at end of file diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index 4ef22146..253c9578 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -2301,7 +2301,7 @@ protected function doLogin() } if ($this->loginStatus === static::DISCONNECTED_STATUS) { - throw new Exception('Login Failure'); + throw new LoginFailureException(); } $this->eventManager()->fire("onLogin", From 5b96432bae7463bc133a734234c09e9e8dede8a6 Mon Sep 17 00:00:00 2001 From: mgp25 Date: Wed, 1 Apr 2015 12:12:39 +0200 Subject: [PATCH 324/436] update onMessageReceivedClient --- src/events/AllEvents.php | 2 +- src/whatsprot.class.php | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/events/AllEvents.php b/src/events/AllEvents.php index ac9c6984..1c5259f5 100644 --- a/src/events/AllEvents.php +++ b/src/events/AllEvents.php @@ -94,7 +94,7 @@ public function onMediaMessageSent($mynumber, $to, $id, $filetype, $url, $filena public function onMediaUploadFailed($mynumber, $id, $node, $messageNode, $statusMessage) {} public function onMessageComposing($mynumber, $from, $id, $type, $time) {} public function onMessagePaused($mynumber, $from, $id, $type, $time) {} - public function onMessageReceivedClient($mynumber, $from, $id, $type, $time) {} + public function onMessageReceivedClient($mynumber, $from, $id, $type, $time, $participant) {} public function onMessageReceivedServer($mynumber, $from, $id, $type, $time) {} public function onPaidAccount($mynumber, $author, $kind, $status, $creation, $expiration) {} public function onPaymentRecieved($mynumber, $kind, $status, $creation, $expiration) {} diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index ef238b65..16c1a70a 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -2665,7 +2665,8 @@ protected function processInboundDataNode(ProtocolNode $node, $autoReceipt = tru $node->getAttribute('from'), $child->getAttribute('id'), $node->getAttribute('type'), - $node->getAttribute('t') + $node->getAttribute('t'), + $node->getAttribute('participant') )); } } From ddd6af6d5383c8785e02a19482771668ab887282 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20P=C3=BCschel?= Date: Wed, 1 Apr 2015 14:54:57 +0200 Subject: [PATCH 325/436] add missing and needed Group ID to onGetGroupV2Info --- src/events/AllEvents.php | 2 +- src/whatsprot.class.php | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/events/AllEvents.php b/src/events/AllEvents.php index 1c5259f5..dd437cfa 100644 --- a/src/events/AllEvents.php +++ b/src/events/AllEvents.php @@ -60,7 +60,7 @@ public function onGetGroupMessage($mynumber, $from_group_jid, $from_user_jid, $i public function onGetGroupParticipants($mynumber, $groupId, $groupList) {} public function onGetGroups($mynumber, $groupList) {} public function onGetGroupsInfo($mynumber, $groupList) {} - public function onGetGroupV2Info( $mynumber, $creator, $creation, $subject, $participants, $admins, $fromGetGroup ){} + public function onGetGroupV2Info( $mynumber, $group_id, $creator, $creation, $subject, $participants, $admins, $fromGetGroup ){} public function onGetGroupsSubject($mynumber, $group_jid, $time, $author, $name, $subject) {} public function onGetImage($mynumber, $from, $id, $type, $time, $name, $size, $url, $file, $mimeType, $fileHash, $width, $height, $preview, $caption) {} public function onGetGroupImage($mynumber, $from_group_jid, $from_user_jid, $id, $type, $time, $name, $size, $url, $file, $mimeType, $fileHash, $width, $height, $preview, $caption) {} diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index 16c1a70a..01587fb5 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -4070,6 +4070,7 @@ protected function handleGroupV2InfoResponse(ProtocolNode $groupNode, $fromGetGr $creator = $groupNode->getAttribute('creator'); $creation = $groupNode->getAttribute('creation'); $subject = $groupNode->getAttribute('subject'); + $groupID = $groupNode->getAttribute('id'); $participants = array(); $admins = array(); if ($groupNode->getChild(0) != null) { @@ -4082,6 +4083,7 @@ protected function handleGroupV2InfoResponse(ProtocolNode $groupNode, $fromGetGr $this->eventManager()->fire("onGetGroupV2Info", array( $this->phoneNumber, + $groupID, $creator, $creation, $subject, From b156924022a0dcf5b88f70e1e58780c0d76b3669 Mon Sep 17 00:00:00 2001 From: mgp25 Date: Fri, 10 Apr 2015 01:06:34 +0200 Subject: [PATCH 326/436] Little improvements :) @0xtrycatch rocks :D --- src/whatsprot.class.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index 01587fb5..b6a89f0f 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -42,7 +42,6 @@ class WhatsProt const TIMEOUT_USEC = 0; const WHATSAPP_CHECK_HOST = 'v.whatsapp.net/v2/exist'; // The check credentials host. const WHATSAPP_GROUP_SERVER = 'g.us'; // The Group server hostname - const WHATSAPP_HOST = 'c.whatsapp.net'; // The hostname of the WhatsApp server. const WHATSAPP_REGISTER_HOST = 'v.whatsapp.net/v2/register'; // The register code host. const WHATSAPP_REQUEST_HOST = 'v.whatsapp.net/v2/code'; // The request code host. const WHATSAPP_SERVER = 's.whatsapp.net'; // The hostname used to login/send messages. @@ -50,6 +49,7 @@ class WhatsProt const WHATSAPP_DEVICE = 'iPhone'; // The device name. const WHATSAPP_VER = '2.11.16'; // The WhatsApp version. const WHATSAPP_USER_AGENT = 'WhatsApp/2.12.68 S40Version/14.26 Device/Nokia302'; // User agent used in request/registration code. + const WHATSAPP_AUTH_USER_AGENT = 'WhatsApp/2.11.16 iPhone_OS/8.1.3 Device/iPhone_5'; const WHATSAPP_VER_CHECKER = 'https://coderus.openrepos.net/whitesoft/whatsapp_version'; // Check WhatsApp version /** @@ -443,7 +443,7 @@ public function connect() /* Create a TCP/IP socket. */ $socket = socket_create(AF_INET, SOCK_STREAM, SOL_TCP); if ($socket !== false) { - $result = socket_connect($socket, static::WHATSAPP_HOST, static::PORT); + $result = socket_connect($socket, "e" . rand(1, 16) . ".whatsapp.net", static::PORT); if ($result === false) { $socket = false; } @@ -2102,7 +2102,7 @@ protected function createAuthBlob() $this->reader->setKey($this->inputKey); //$this->writer->setKey($this->outputKey); $phone = $this->dissectPhone(); - $array = "\0\0\0\0" . $this->phoneNumber . $this->challengeData . time() . static::WHATSAPP_USER_AGENT . " MccMnc/" . str_pad($phone["mcc"], 3, "0", STR_PAD_LEFT) . $phone["mnc"]; + $array = "\0\0\0\0" . $this->phoneNumber . $this->challengeData . time() . static::WHATSAPP_AUTH_USER_AGENT . " MccMnc/" . str_pad($phone["mcc"], 3, "0", STR_PAD_LEFT) . $phone["mnc"]; $this->challengeData = null; return $this->outputKey->EncodeMessage($array, 0, strlen($array), false); } From d88464b74a595882e40f55f305a04faf28945966 Mon Sep 17 00:00:00 2001 From: mgp25 Date: Sat, 11 Apr 2015 09:26:59 +0200 Subject: [PATCH 327/436] Update checkCredentials --- src/whatsprot.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index b6a89f0f..bc6b98a4 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -179,7 +179,7 @@ public function checkCredentials() 'id' => $this->identity, 'lg' => $langCode, 'lc' => $countryCode, - 'network_radio_type' => "1" + // 'network_radio_type' => "1" ); $response = $this->getResponse($host, $query); From cbbab1ecf7984d4403cf3d75dbe017cf70b85001 Mon Sep 17 00:00:00 2001 From: mgp25 Date: Tue, 14 Apr 2015 15:07:10 +0200 Subject: [PATCH 328/436] Fixes #601 --- src/whatsprot.class.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index bc6b98a4..d61e5c46 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -1,4 +1,4 @@ -getAttribute('from'), $node->getAttribute('id'), $node->getAttribute('type'), - $node->getAttribute('t') + $node->getAttribute('t'), + $node->getAttribute('participant') )); $ackNode = new ProtocolNode("ack", @@ -2902,7 +2903,8 @@ protected function processInboundDataNode(ProtocolNode $node, $autoReceipt = tru $node->getAttribute('from'), $node->getAttribute('id'), $node->getAttribute('type'), - $node->getAttribute('t') + $node->getAttribute('t'), + $node->getAttribute('participant') )); } } From fc618280645bfdf7e4a96a20e2f3692a54bb796a Mon Sep 17 00:00:00 2001 From: mgp25 Date: Tue, 14 Apr 2015 16:01:27 +0200 Subject: [PATCH 329/436] fixing weird typo --- src/whatsprot.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index d61e5c46..d505e4d5 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -1,4 +1,4 @@ -al Date: Wed, 15 Apr 2015 12:57:42 +0200 Subject: [PATCH 330/436] Disconnect socket when replaced by new connection When a new connection is initialized then the old connection should be disconnected. --- src/whatsprot.class.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index d505e4d5..86d3d430 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -3259,6 +3259,11 @@ protected function processInboundDataNode(ProtocolNode $node, $autoReceipt = tru $node->getChild(0)->getTag() )); } + + if ($node->getTag() == "stream:error" && $node->getChild(1)->getData() == 'Replaced by new connection') + { + $this->disconnect(); + } if ($node->getTag() == "notification") { $name = $node->getAttribute("notify"); From f68753577babccf612be7824edf92bab83aa0618 Mon Sep 17 00:00:00 2001 From: Jesper Veldhuizen Date: Wed, 15 Apr 2015 13:43:19 +0200 Subject: [PATCH 331/436] Disconnect on all errors --- src/whatsprot.class.php | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index 86d3d430..07dd5a6c 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -3260,11 +3260,6 @@ protected function processInboundDataNode(ProtocolNode $node, $autoReceipt = tru )); } - if ($node->getTag() == "stream:error" && $node->getChild(1)->getData() == 'Replaced by new connection') - { - $this->disconnect(); - } - if ($node->getTag() == "notification") { $name = $node->getAttribute("notify"); $type = $node->getAttribute("type"); @@ -3435,6 +3430,12 @@ protected function processInboundDataNode(ProtocolNode $node, $autoReceipt = tru } } } + + // Disconnect socket on stream error. + if ($node->getTag() == "stream:error") + { + $this->disconnect(); + } } /** From 9fac63111bc120acd53ed6353e1f4712a9272f05 Mon Sep 17 00:00:00 2001 From: mgp25 Date: Fri, 17 Apr 2015 23:59:16 +0200 Subject: [PATCH 332/436] General update - feedback required --- src/events/AllEvents.php | 2 -- src/token.php | 5 ++-- src/whatsprot.class.php | 64 +++++++++++----------------------------- 3 files changed, 21 insertions(+), 50 deletions(-) diff --git a/src/events/AllEvents.php b/src/events/AllEvents.php index dd437cfa..00e08639 100644 --- a/src/events/AllEvents.php +++ b/src/events/AllEvents.php @@ -57,9 +57,7 @@ public function onGetError($mynumber, $from, $id, $data) {} public function onGetExtendAccount($mynumber, $kind, $status, $creation, $expiration) {} public function onGetFeature($mynumber, $from, $encrypt) {} public function onGetGroupMessage($mynumber, $from_group_jid, $from_user_jid, $id, $type, $time, $name, $body) {} - public function onGetGroupParticipants($mynumber, $groupId, $groupList) {} public function onGetGroups($mynumber, $groupList) {} - public function onGetGroupsInfo($mynumber, $groupList) {} public function onGetGroupV2Info( $mynumber, $group_id, $creator, $creation, $subject, $participants, $admins, $fromGetGroup ){} public function onGetGroupsSubject($mynumber, $group_jid, $time, $author, $name, $subject) {} public function onGetImage($mynumber, $from, $id, $type, $time, $name, $size, $url, $file, $mimeType, $fileHash, $width, $height, $preview, $caption) {} diff --git a/src/token.php b/src/token.php index d26cd719..b9166990 100755 --- a/src/token.php +++ b/src/token.php @@ -19,8 +19,9 @@ function generateRequestToken($country, $phone) // $output = hash("sha1", $opad . hash("sha1", $ipad . $data, true), true); // return base64_encode($output); - - $token = md5("PdA2DJyKoUrwLw1Bg6EIhzh502dF9noR9uFCllGk1425519315543".$phone); + $const = 'PdA2DJyKoUrwLw1Bg6EIhzh502dF9noR9uFCllGk'; + $releaseTime = '1425519315543'; + $token = md5($const . $releaseTime . $phone); return $token; } diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index 07dd5a6c..266c564c 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -46,10 +46,9 @@ class WhatsProt const WHATSAPP_REQUEST_HOST = 'v.whatsapp.net/v2/code'; // The request code host. const WHATSAPP_SERVER = 's.whatsapp.net'; // The hostname used to login/send messages. const WHATSAPP_UPLOAD_HOST = 'https://mms.whatsapp.net/client/iphone/upload.php'; // The upload host. - const WHATSAPP_DEVICE = 'iPhone'; // The device name. - const WHATSAPP_VER = '2.11.16'; // The WhatsApp version. + const WHATSAPP_DEVICE = 'S40'; // The device name. + const WHATSAPP_VER = '2.12.68'; // The WhatsApp version. const WHATSAPP_USER_AGENT = 'WhatsApp/2.12.68 S40Version/14.26 Device/Nokia302'; // User agent used in request/registration code. - const WHATSAPP_AUTH_USER_AGENT = 'WhatsApp/2.11.16 iPhone_OS/8.1.3 Device/iPhone_5'; const WHATSAPP_VER_CHECKER = 'https://coderus.openrepos.net/whitesoft/whatsapp_version'; // Check WhatsApp version /** @@ -417,27 +416,16 @@ public function codeRequest($method = 'sms', $carrier = "T-Mobile5") */ public function connect() { - //If we have already connected AND the socket has not been closed from the remote side - then - //no need to connect again. - //WARNING: Lots of bugs in PHP's detection of socket timeout/remote disconnect. Be careful changing this code. - //http://ie2.php.net/manual/en/function.socket-read.php#115903 - //https://bugs.php.net/bug.php?id=47918 - //http://stackoverflow.com/questions/20334366/php-fsockopen-how-to-know-if-connection-is-alive if ($this->isConnected()) { return true; } - //$WAver = trim(file_get_contents(static::WHATSAPP_VER_CHECKER)); + //$WAData = json_decode(file_get_contents(static::WHATSAPP_VER_CHECKER), true); - //$WAverS = str_replace(".","",$WAver); - //$ver = str_replace(".","",static::WHATSAPP_VER); - - // if($ver<$WAverS) + // if(static::WHATSAPP_VER != $WAver) // { - // $classesMD5 = file_get_contents('https://coderus.openrepos.net/whitesoft/whatsapp_classes'); - // - // updateData('token.php', $WAver, $classesMD5); - // updateData('whatsprot.class.php', $WAver); + // updateData('token.php', $WAData->e, $WAData->h); + // updateData('whatsprot.class.php', $WAData->e); // } /* Create a TCP/IP socket. */ @@ -2102,7 +2090,7 @@ protected function createAuthBlob() $this->reader->setKey($this->inputKey); //$this->writer->setKey($this->outputKey); $phone = $this->dissectPhone(); - $array = "\0\0\0\0" . $this->phoneNumber . $this->challengeData . time() . static::WHATSAPP_AUTH_USER_AGENT . " MccMnc/" . str_pad($phone["mcc"], 3, "0", STR_PAD_LEFT) . $phone["mnc"]; + $array = "\0\0\0\0" . $this->phoneNumber . $this->challengeData . time() . static::WHATSAPP_USER_AGENT . " MccMnc/" . str_pad($phone["mcc"], 3, "0", STR_PAD_LEFT) . $phone["mnc"]; $this->challengeData = null; return $this->outputKey->EncodeMessage($array, 0, strlen($array), false); } @@ -3038,7 +3026,7 @@ protected function processInboundDataNode(ProtocolNode $node, $autoReceipt = tru if ($node->getTag() == "iq" && $node->getAttribute('type') == "result") { if ($node->getChild("query") != null) { - if ($node->nodeIdContains("getprivacy")) { + if (($node->getAttribute('xmlns') == 'jabber:iq:privacy') && ($node->getAttribute('type') == 'get')) { $listChild = $node->getChild(0)->getChild(0); foreach ($listChild->getChildren() as $child) { $blockedJids[] = $child->getAttribute('value'); @@ -3083,7 +3071,7 @@ protected function processInboundDataNode(ProtocolNode $node, $autoReceipt = tru if ($node->getChild("media") != null || $node->getChild("duplicate") != null) { $this->processUploadResponse($node); } - if ($node->nodeIdContains("group")) { + if ($node->getAttribute("xmlns") == 'w:gp2') { //There are multiple types of Group reponses. Also a valid group response can have NO children. //Events fired depend on text in the ID field. $groupList = array(); @@ -3094,7 +3082,7 @@ protected function processInboundDataNode(ProtocolNode $node, $autoReceipt = tru $groupNodes[] = $child; } } - if ($node->nodeIdContains('creategroup')) { + if ($node->getChild(0)->getTag() == 'create') { $this->groupId = $node->getChild(0)->getAttribute('id'); $this->eventManager()->fire("onGroupsChatCreate", array( @@ -3102,7 +3090,7 @@ protected function processInboundDataNode(ProtocolNode $node, $autoReceipt = tru $this->groupId )); } - if ($node->nodeIdContains('endgroup')) { + if ($node->getChild(0)->getTag() == 'leave') { $this->groupId = $node->getChild(0)->getChild(0)->getAttribute('id'); $this->eventManager()->fire("onGroupsChatEnd", array( @@ -3110,7 +3098,7 @@ protected function processInboundDataNode(ProtocolNode $node, $autoReceipt = tru $this->groupId )); } - if ($node->nodeIdContains('getgroups')) { + if (($node->getChild(0)->getTag() == 'owning') || ($node->getChild(0)->getTag() == 'participating')) { $this->eventManager()->fire("onGetGroups", array( $this->phoneNumber, @@ -3124,30 +3112,14 @@ protected function processInboundDataNode(ProtocolNode $node, $autoReceipt = tru } } - if ($node->nodeIdContains('getgroupinfo')) { - $this->eventManager()->fire("onGetGroupsInfo", - array( - $this->phoneNumber, - $groupList - )); - } - if ($node->nodeIdContains('getgroupparticipants')) { - $groupId = self::parseJID($node->getAttribute('from')); - $this->eventManager()->fire("onGetGroupParticipants", - array( - $this->phoneNumber, - $groupId, - $groupList - )); - } - } - if ($node->nodeIdContains('get_groupv2_info')) { + if ($node->getChild(0)->getTag() == 'query') { $groupChild = $node->getChild(0); if ($groupChild != null) { $this->handleGroupV2InfoResponse($groupChild); } } - if ($node->nodeIdContains("get_lists")) { + } + if (($node->getAttribute('xmlns') == 'w:b') && ($node->getChild(0)->getTag() == 'query')) { $broadcastLists = array(); if ($node->getChild(0) != null) { $childArray = $node->getChildren(); @@ -3259,7 +3231,7 @@ protected function processInboundDataNode(ProtocolNode $node, $autoReceipt = tru $node->getChild(0)->getTag() )); } - + if ($node->getTag() == "notification") { $name = $node->getAttribute("notify"); $type = $node->getAttribute("type"); @@ -3430,11 +3402,11 @@ protected function processInboundDataNode(ProtocolNode $node, $autoReceipt = tru } } } - + // Disconnect socket on stream error. if ($node->getTag() == "stream:error") { - $this->disconnect(); + $this->disconnect(); } } From 4da45150cf8c9610dfd820efa6806db724395fd9 Mon Sep 17 00:00:00 2001 From: mgp25 Date: Sat, 18 Apr 2015 00:21:54 +0200 Subject: [PATCH 333/436] createMsgId updated --- src/whatsprot.class.php | 93 ++++++++++++++++++++--------------------- 1 file changed, 46 insertions(+), 47 deletions(-) diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index 266c564c..c66fd09e 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -596,7 +596,7 @@ public function sendActiveStatus() */ public function sendGetCipherKeysFromUser($number) { - $msgId = $this->createMsgId("cipher_keys_"); + $msgId = $this->createMsgId(); $userNode = new ProtocolNode("user", array( @@ -744,7 +744,7 @@ public function sendBroadcastVideo($targets, $path, $storeURLmedia = false, $fsi */ public function sendDeleteBroadcastLists($lists) { - $msgId = $this->createMsgId("delete_list_"); + $msgId = $this->createMsgId(); $listNode = array(); if ($lists != null && count($lists) > 0) { for ($i = 0; $i < count($lists); $i++) { @@ -772,7 +772,7 @@ public function sendDeleteBroadcastLists($lists) */ protected function sendClearDirty($categories) { - $msgId = $this->createMsgId("cleardirty"); + $msgId = $this->createMsgId(); $catnodes = array(); foreach ($categories as $category) { @@ -798,7 +798,7 @@ public function sendClientConfig() $child = new ProtocolNode("config", $attr, null, ""); $node = new ProtocolNode("iq", array( - "id" => $this->createMsgId("config"), + "id" => $this->createMsgId(), "type" => "set", "xmlns" => "urn:xmpp:whatsapp:push", "to" => static::WHATSAPP_SERVER @@ -809,7 +809,7 @@ public function sendClientConfig() public function sendGetClientConfig() { - $msgId = $this->createMsgId("sendconfig"); + $msgId = $this->createMsgId(); $child = new ProtocolNode("config", null, null, null); $node = new ProtocolNode("iq", array( @@ -831,7 +831,7 @@ public function sendGetClientConfig() */ public function sendChangeNumber($number, $identity) { - $msgId = $this->createMsgId("change_number"); + $msgId = $this->createMsgId(); $usernameNode = new ProtocolNode("username", null, null, $number); $passwordNode = new ProtocolNode("password", null, null, urldecode($identity)); @@ -867,7 +867,7 @@ public function sendGetGroups() */ public function sendGetGroupV2Info($groupID) { - $msgId = $this->createMsgId("get_groupv2_info"); + $msgId = $this->createMsgId(); $queryNode = new ProtocolNode("query", array( @@ -891,7 +891,7 @@ public function sendGetGroupV2Info($groupID) */ public function sendGetPrivacyBlockedList() { - $msgId = $this->createMsgId("getprivacy"); + $msgId = $this->createMsgId(); $child = new ProtocolNode("list", array( "name" => "default" @@ -914,7 +914,7 @@ public function sendGetPrivacyBlockedList() */ public function sendGetPrivacySettings() { - $msgId = $this->createMsgId("get_privacy_settings_"); + $msgId = $this->createMsgId(); $privacyNode = new ProtocolNode("privacy", null, null, null); $node = new ProtocolNode("iq", array( @@ -938,7 +938,7 @@ public function sendGetPrivacySettings() */ public function sendSetPrivacySettings($category, $value) { - $msgId = $this->createMsgId("send_privacy_settings_"); + $msgId = $this->createMsgId(); $categoryNode = new ProtocolNode("category", array( "name" => $category, @@ -968,7 +968,7 @@ public function sendSetPrivacySettings($category, $value) */ public function sendGetProfilePicture($number, $large = false) { - $msgId = $this->createMsgId("getpicture"); + $msgId = $this->createMsgId(); $hash = array(); $hash["type"] = "image"; @@ -999,7 +999,7 @@ public function sendGetProfilePhotoIds($numbers) $numbers = array($numbers); } - $msgId = $this->createMsgId("get_picture_ids"); + $msgId = $this->createMsgId(); $userNode = array(); for ($i=0; $i < count($numbers); $i++) { @@ -1034,7 +1034,7 @@ public function sendGetProfilePhotoIds($numbers) */ public function sendGetRequestLastSeen($to) { - $msgId = $this->createMsgId("lastseen"); + $msgId = $this->createMsgId(); $queryNode = new ProtocolNode("query", null, null, null); @@ -1055,7 +1055,7 @@ public function sendGetRequestLastSeen($to) */ public function sendGetServerProperties() { - $id = $this->createMsgId("getproperties"); + $id = $this->createMsgId(); $child = new ProtocolNode("props", null, null, null); $node = new ProtocolNode("iq", array( @@ -1079,7 +1079,7 @@ public function sendGetServerProperties() public function sendGetServicePricing($lg, $lc) { - $msgId = $this->createMsgId("get_service_pricing_"); + $msgId = $this->createMsgId(); $pricingNode = new ProtocolNode("pricing", array( "lg" => $lg, @@ -1102,7 +1102,7 @@ public function sendGetServicePricing($lg, $lc) public function sendExtendAccount() { - $msgId = $this->createMsgId("extend_account_"); + $msgId = $this->createMsgId(); $extendingNode = new ProtocolNode("extend", null, null, null); $node = new ProtocolNode("iq", array( @@ -1120,7 +1120,7 @@ public function sendExtendAccount() */ public function sendGetBroadcastLists() { - $msgId = $this->createMsgId("get_lists_"); + $msgId = $this->createMsgId(); $listsNode = new ProtocolNode("lists", null, null, null); $node = new ProtocolNode("iq", array( @@ -1141,7 +1141,7 @@ public function sendGetBroadcastLists() */ public function sendGetNormalizedJid($countryCode, $number) { - $msgId = $this->createMsgId("get_normalized_jid_"); + $msgId = $this->createMsgId(); $ccNode = new ProtocolNode("cc", null, null, $countryCode); $inNode = new ProtocolNode("in", null, null, $number); $normalizeNode = new ProtocolNode("normalize", null, array($ccNode, $inNode), null); @@ -1165,7 +1165,7 @@ public function sendGetNormalizedJid($countryCode, $number) */ public function sendRemoveAccount($lg = null, $lc = null, $feedback = null) { - $msgId = $this->createMsgId("removeaccount_"); + $msgId = $this->createMsgId(); if ($feedback != null && strlen($feedback) > 0) { if ($lg == null) { @@ -1203,7 +1203,7 @@ public function sendRemoveAccount($lg = null, $lc = null, $feedback = null) */ public function sendPing() { - $msgId = $this->createMsgId("ping_"); + $msgId = $this->createMsgId(); $pingNode = new ProtocolNode("ping", null, null, null); $node = new ProtocolNode("iq", array( @@ -1224,7 +1224,7 @@ public function sendPing() public function sendGetHasVoipEnabled($jids) { - $msgId = $this->createMsgId("voip_"); + $msgId = $this->createMsgId(); if (!is_array($jids)) { @@ -1269,7 +1269,7 @@ public function sendGetStatuses($jids) "to" => static::WHATSAPP_SERVER, "type" => "get", "xmlns" => "status", - "id" => $this->createMsgId("getstatus") + "id" => $this->createMsgId() ), array( new ProtocolNode("status", null, $children, null) ), null); @@ -1301,7 +1301,7 @@ public function sendGroupsChatCreate($subject, $participants) ), null, null); } - $id = $this->createMsgId("creategroup"); + $id = $this->createMsgId(); $createNode = new ProtocolNode("create", array( @@ -1340,7 +1340,7 @@ public function sendSetGroupSubject($gjid, $subject) $child = new ProtocolNode("subject", null, null, $subject); $node = new ProtocolNode("iq", array( - "id" => $this->createMsgId("set_group_subject"), + "id" => $this->createMsgId(), "type" => "set", "to" => $this->getJID($gjid), "xmlns" => "w:g2" @@ -1357,7 +1357,7 @@ public function sendSetGroupSubject($gjid, $subject) public function sendGroupsChatEnd($gjid) { $gjid = $this->getJID($gjid); - $msgID = $this->createMsgId("endgroup"); + $msgID = $this->createMsgId(); $groupNode = new ProtocolNode('group', array( @@ -1388,7 +1388,7 @@ public function sendGroupsChatEnd($gjid) */ public function sendGroupsLeave($gjids) { - $msgId = $this->createMsgId("leavegroups"); + $msgId = $this->createMsgId(); if (!is_array($gjids)) { $gjids = array($this->getJID($gjids)); @@ -1427,7 +1427,7 @@ public function sendGroupsLeave($gjids) */ public function sendGroupsParticipantsAdd($groupId, $participants) { - $msgId = $this->createMsgId("add_group_participants_"); + $msgId = $this->createMsgId(); if (!is_array($participants)) { $participants = array($participants); } @@ -1442,7 +1442,7 @@ public function sendGroupsParticipantsAdd($groupId, $participants) */ public function sendGroupsParticipantsRemove($groupId, $participants) { - $msgId = $this->createMsgId("remove_group_participants_"); + $msgId = $this->createMsgId(); if (!is_array($participants)) { $participants = array($participants); } @@ -1457,7 +1457,7 @@ public function sendGroupsParticipantsRemove($groupId, $participants) */ public function sendPromoteParticipants($gId, $participants) { - $msgId = $this->createMsgId("promote_group_participants_"); + $msgId = $this->createMsgId(); if (!is_array($participants)) { $participants = array($participants); } @@ -1472,7 +1472,7 @@ public function sendPromoteParticipants($gId, $participants) */ public function sendDemoteParticipants($gId, $participants) { - $msgId = $this->createMsgId("demote_group_participants_"); + $msgId = $this->createMsgId(); if (!is_array($participants)) { $participants = array($participants); } @@ -1486,7 +1486,7 @@ public function sendDemoteParticipants($gId, $participants) */ public function sendLockGroup($gId) { - $msgId = $this->createMsgId("lock_group_"); + $msgId = $this->createMsgId(); $lockedNode = new ProtocolNode("locked", null, null, null); $node = new ProtocolNode("iq", array( @@ -1508,7 +1508,7 @@ public function sendLockGroup($gId) */ public function sendUnlockGroup($gId) { - $msgId = $this->createMsgId("unlock_group_"); + $msgId = $this->createMsgId(); $unlockedNode = new ProtocolNode("unlocked", null, null, null); $node = new ProtocolNode("iq", array( @@ -1847,7 +1847,7 @@ public function sendSetPrivacyBlockedList($blockedJids = array()) $child2 = new ProtocolNode("query", null, array($child), null); $node = new ProtocolNode("iq", array( - "id" => $this->createMsgId("setprivacy"), + "id" => $this->createMsgId(), "xmlns" => "jabber:iq:privacy", "type" => "set" ), array($child2), null); @@ -1870,7 +1870,7 @@ public function sendSetProfilePicture($path) */ public function sendRemoveProfilePicture() { - $msgId = $this->createMsgId("setphoto"); + $msgId = $this->createMsgId(); $picture = new ProtocolNode("picture", null, null, null); @@ -1904,7 +1904,7 @@ public function sendSetRecoveryToken($token) $node = new ProtocolNode("iq", array( - "id" => $this->createMsgId("settoken"), + "id" => $this->createMsgId(), "type" => "set", "to" => static::WHATSAPP_SERVER ), array($child), null); @@ -1924,7 +1924,7 @@ public function sendStatusUpdate($txt) array( "to" => static::WHATSAPP_SERVER, "type" => "set", - "id" => $this->createMsgId("sendstatus"), + "id" => $this->createMsgId(), "xmlns" => "status" ), array($child), null); @@ -2126,13 +2126,12 @@ protected function createFeaturesNode() /** * Create a unique msg id. * - * @param string $prefix * @return string * A message id string. */ - protected function createMsgId($prefix) + protected function createMsgId() { - $msgid = "$prefix-" . time() . '-' . $this->messageCounter; + $msgid = $this->messageCounter; $this->messageCounter++; return $msgid; @@ -2399,7 +2398,7 @@ public function sendSync(array $numbers, array $deletedNumbers = null, $syncType $context = "background"; } - $id = $this->createMsgId("sendsync_"); + $id = $this->createMsgId(); $node = new ProtocolNode("iq", array( @@ -3198,7 +3197,7 @@ protected function processInboundDataNode(ProtocolNode $node, $autoReceipt = tru } if ($node->getTag() == "message" && $node->getAttribute('type') == "media" && $node->getChild(0)->getAttribute('type') == "image" ) { - $msgId = $this->createMsgId("ack-media"); + $msgId = $this->createMsgId(); $ackNode = new ProtocolNode("ack", array( @@ -3731,7 +3730,7 @@ protected function sendBroadcast($targets, $node, $type) $broadcastNode = new ProtocolNode("broadcast", null, $toNodes, null); - $msgId = $this->createMsgId("broadcast"); + $msgId = $this->createMsgId(); $messageNode = new ProtocolNode("message", array( @@ -3776,7 +3775,7 @@ protected function sendData($data) */ protected function sendGetGroupsFiltered($type) { - $msgID = $this->createMsgId("getgroups"); + $msgID = $this->createMsgId(); $child = new ProtocolNode($type, null, null, null); $node = new ProtocolNode("iq", array( @@ -3831,7 +3830,7 @@ protected function sendGroupsChangeParticipants($groupId, $participants, $tag, $ */ protected function sendMessageNode($to, $node, $id = null) { - $msgId = ($id == null) ? $this->createMsgId("message") : $id; + $msgId = ($id == null) ? $this->createMsgId() : $id; $to = $this->getJID($to); $messageNode = new ProtocolNode("message", array( @@ -3911,7 +3910,7 @@ protected function sendNode($node, $encrypt = true) */ protected function sendRequestFileUpload($b64hash, $type, $size, $filepath, $to, $caption = "") { - $id = $this->createMsgId("upload"); + $id = $this->createMsgId(); if (!is_array($to)) { $to = $this->getJID($to); @@ -3931,7 +3930,7 @@ protected function sendRequestFileUpload($b64hash, $type, $size, $filepath, $to, ), array($mediaNode), null); //add to queue - $messageId = $this->createMsgId("message"); + $messageId = $this->createMsgId(); $this->mediaQueue[$id] = array( "messageNode" => $node, "filePath" => $filepath, @@ -3955,7 +3954,7 @@ protected function sendRequestFileUpload($b64hash, $type, $size, $filepath, $to, */ protected function sendSetPicture($jid, $filepath) { - $nodeID = $this->createMsgId("setphoto"); + $nodeID = $this->createMsgId(); $data = preprocessProfilePicture($filepath); $preview = createIconGD($filepath, 96, true); From 88f6f89db20427c8e5e908466a6889ad8517238b Mon Sep 17 00:00:00 2001 From: mgp25 Date: Sat, 18 Apr 2015 00:24:02 +0200 Subject: [PATCH 334/436] removed outdated function --- src/events/AllEvents.php | 2 -- src/whatsprot.class.php | 43 ---------------------------------------- 2 files changed, 45 deletions(-) diff --git a/src/events/AllEvents.php b/src/events/AllEvents.php index 00e08639..ad898676 100644 --- a/src/events/AllEvents.php +++ b/src/events/AllEvents.php @@ -107,6 +107,4 @@ public function onSendPong($mynumber, $msgid) {} public function onSendPresence($mynumber, $type, $name ) {} public function onSendStatusUpdate($mynumber, $txt ) {} public function onStreamError($data) {} - public function onUploadFile($mynumber, $filename, $url) {} - public function onUploadFileFailed($mynumber, $filename) {} } diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index c66fd09e..822e1898 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -45,7 +45,6 @@ class WhatsProt const WHATSAPP_REGISTER_HOST = 'v.whatsapp.net/v2/register'; // The register code host. const WHATSAPP_REQUEST_HOST = 'v.whatsapp.net/v2/code'; // The request code host. const WHATSAPP_SERVER = 's.whatsapp.net'; // The hostname used to login/send messages. - const WHATSAPP_UPLOAD_HOST = 'https://mms.whatsapp.net/client/iphone/upload.php'; // The upload host. const WHATSAPP_DEVICE = 'S40'; // The device name. const WHATSAPP_VER = '2.12.68'; // The WhatsApp version. const WHATSAPP_USER_AGENT = 'WhatsApp/2.12.68 S40Version/14.26 Device/Nokia302'; // User agent used in request/registration code. @@ -1994,48 +1993,6 @@ public function setNewMessageBind($bind) $this->newMsgBind = $bind; } - /** - * Upload file to WhatsApp servers. - * - * @param string $file The uri of the file. - * - * @return string|bool Return the remote url or false on failure. - */ - public function uploadFile($file) - { - $data['file'] = "@" . $file; - - $ch = curl_init(); - curl_setopt($ch, CURLOPT_HEADER, 0); - curl_setopt($ch, CURLOPT_HTTPHEADER, array('Expect:')); - curl_setopt($ch, CURLOPT_URL, static::WHATSAPP_UPLOAD_HOST); - curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); - curl_setopt($ch, CURLOPT_POST, true); - curl_setopt($ch, CURLOPT_POSTFIELDS, $data); - $response = curl_exec($ch); - curl_close($ch); - - $xml = simplexml_load_string($response); - $url = strip_tags($xml->dict->string[3]->asXML()); - - if (!empty($url)) { - $this->eventManager()->fire("onUploadFile", - array( - $this->phoneNumber, - basename($file), - $url - )); - return $url; - } - - $this->eventManager()->fire("onUploadFileFailed", - array( - $this->phoneNumber, - basename($file) - )); - return false; - } - /** * Wait for WhatsApp server to acknowledge *it* has received message. * @param string $id The id of the node sent that we are awaiting acknowledgement of. From abff168ec6cc1edb36ca22e87b9f8b3c6fefe706 Mon Sep 17 00:00:00 2001 From: mgp25 Date: Sat, 18 Apr 2015 00:29:31 +0200 Subject: [PATCH 335/436] Update example --- examples/exampleFunctional.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/exampleFunctional.php b/examples/exampleFunctional.php index 74c0d3be..92d1f797 100755 --- a/examples/exampleFunctional.php +++ b/examples/exampleFunctional.php @@ -56,6 +56,9 @@ function onPresenceReceived($username, $from, $type) $w = new WhatsProt($username, $nickname, $debug); $w->connect(); +// Now loginWithPassword function sends Nickname and (Available) Presence +$w->loginWithPassword($password); + //Retrieve large profile picture. Output is in /src/php/pictures/ (you need to bind a function //to the event onProfilePicture so the script knows what to do. $w->eventManager()->bind("onGetProfilePicture", "onGetProfilePicture"); @@ -65,9 +68,6 @@ function onPresenceReceived($username, $from, $type) //so the script knows what to do) $w->eventManager()->bind("onPresence", "onPresenceReceived"); -// Now loginWithPassword function sends Nickname and (Available) Presence -$w->loginWithPassword($password); - echo "[*] Connected to WhatsApp\n\n"; //update your profile picture From a5defdce3b4a9da8131c3a8e8879a1d0aa86e5d3 Mon Sep 17 00:00:00 2001 From: mgp25 Date: Sun, 19 Apr 2015 01:45:48 +0200 Subject: [PATCH 336/436] fixed id when processing inbound data --- src/whatsprot.class.php | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index 822e1898..d162137b 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -78,6 +78,7 @@ class WhatsProt protected $socket; // A socket to connect to the WhatsApp network. protected $writer; // An instance of the BinaryTreeNodeWriter class. protected $messageStore; + protected $nodeId = array(); public $reader; // An instance of the BinaryTreeNodeReader class. /** @@ -866,7 +867,7 @@ public function sendGetGroups() */ public function sendGetGroupV2Info($groupID) { - $msgId = $this->createMsgId(); + $msgId = $this->nodeId['get_groupv2_info'] = $this->createMsgId(); $queryNode = new ProtocolNode("query", array( @@ -890,7 +891,7 @@ public function sendGetGroupV2Info($groupID) */ public function sendGetPrivacyBlockedList() { - $msgId = $this->createMsgId(); + $msgId = $this->nodeId['privacy'] = $this->createMsgId(); $child = new ProtocolNode("list", array( "name" => "default" @@ -1119,7 +1120,7 @@ public function sendExtendAccount() */ public function sendGetBroadcastLists() { - $msgId = $this->createMsgId(); + $msgId = $this->nodeId['get_lists'] = $this->createMsgId(); $listsNode = new ProtocolNode("lists", null, null, null); $node = new ProtocolNode("iq", array( @@ -1300,7 +1301,7 @@ public function sendGroupsChatCreate($subject, $participants) ), null, null); } - $id = $this->createMsgId(); + $id = $this->nodeId['groupcreate'] = $this->createMsgId(); $createNode = new ProtocolNode("create", array( @@ -1356,7 +1357,7 @@ public function sendSetGroupSubject($gjid, $subject) public function sendGroupsChatEnd($gjid) { $gjid = $this->getJID($gjid); - $msgID = $this->createMsgId(); + $msgID = $this->nodeId['endgroup'] = $this->createMsgId(); $groupNode = new ProtocolNode('group', array( @@ -2982,7 +2983,7 @@ protected function processInboundDataNode(ProtocolNode $node, $autoReceipt = tru if ($node->getTag() == "iq" && $node->getAttribute('type') == "result") { if ($node->getChild("query") != null) { - if (($node->getAttribute('xmlns') == 'jabber:iq:privacy') && ($node->getAttribute('type') == 'get')) { + if ($this->nodeId['privacy'] == $node->getAttribute('id')) { $listChild = $node->getChild(0)->getChild(0); foreach ($listChild->getChildren() as $child) { $blockedJids[] = $child->getAttribute('value'); @@ -3027,7 +3028,7 @@ protected function processInboundDataNode(ProtocolNode $node, $autoReceipt = tru if ($node->getChild("media") != null || $node->getChild("duplicate") != null) { $this->processUploadResponse($node); } - if ($node->getAttribute("xmlns") == 'w:gp2') { + if (strpos($node->getAttribute("from"), static::WHATSAPP_GROUP_SERVER) !== false) { //There are multiple types of Group reponses. Also a valid group response can have NO children. //Events fired depend on text in the ID field. $groupList = array(); @@ -3038,7 +3039,7 @@ protected function processInboundDataNode(ProtocolNode $node, $autoReceipt = tru $groupNodes[] = $child; } } - if ($node->getChild(0)->getTag() == 'create') { + if ($this->nodeId['groupcreate'] == $node->getAttribute('id')) { $this->groupId = $node->getChild(0)->getAttribute('id'); $this->eventManager()->fire("onGroupsChatCreate", array( @@ -3046,7 +3047,7 @@ protected function processInboundDataNode(ProtocolNode $node, $autoReceipt = tru $this->groupId )); } - if ($node->getChild(0)->getTag() == 'leave') { + if ($this->nodeId['endgroup'] == $node->getAttribute('id')) { $this->groupId = $node->getChild(0)->getChild(0)->getAttribute('id'); $this->eventManager()->fire("onGroupsChatEnd", array( @@ -3054,7 +3055,7 @@ protected function processInboundDataNode(ProtocolNode $node, $autoReceipt = tru $this->groupId )); } - if (($node->getChild(0)->getTag() == 'owning') || ($node->getChild(0)->getTag() == 'participating')) { + if ($this->nodeId['getgroups'] == $node->getAttribute('id')) { $this->eventManager()->fire("onGetGroups", array( $this->phoneNumber, @@ -3068,14 +3069,14 @@ protected function processInboundDataNode(ProtocolNode $node, $autoReceipt = tru } } - if ($node->getChild(0)->getTag() == 'query') { + if ($this->nodeId['get_groupv2_info'] == $node->getAttribute('id')) { $groupChild = $node->getChild(0); if ($groupChild != null) { $this->handleGroupV2InfoResponse($groupChild); } } } - if (($node->getAttribute('xmlns') == 'w:b') && ($node->getChild(0)->getTag() == 'query')) { + if ($this->nodeId['get_lists'] == $node->getAttribute('id')) { $broadcastLists = array(); if ($node->getChild(0) != null) { $childArray = $node->getChildren(); @@ -3732,7 +3733,7 @@ protected function sendData($data) */ protected function sendGetGroupsFiltered($type) { - $msgID = $this->createMsgId(); + $msgID = $this->nodeId['getgroups'] = $this->createMsgId(); $child = new ProtocolNode($type, null, null, null); $node = new ProtocolNode("iq", array( From bc2cc91a7bcbd09dd2a78b3a8ee18ffc4da4d7e4 Mon Sep 17 00:00:00 2001 From: mgp25 Date: Sun, 19 Apr 2015 02:05:32 +0200 Subject: [PATCH 337/436] deprecated function --- src/whatsprot.class.php | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index d162137b..08f36898 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -807,22 +807,6 @@ public function sendClientConfig() $this->sendNode($node); } - public function sendGetClientConfig() - { - $msgId = $this->createMsgId(); - $child = new ProtocolNode("config", null, null, null); - $node = new ProtocolNode("iq", - array( - "id" => $msgId, - "xmlns" => "urn:xmpp:whatsapp:push", - "type" => "get", - "to" => static::WHATSAPP_SERVER - ), array($child), null); - - $this->sendNode($node); - $this->waitForServer($msgId); - } - /** * Transfer your number to new one * From 51ac793a5e573017925086dc54ff7f7ade8c1a4f Mon Sep 17 00:00:00 2001 From: mgp25 Date: Sun, 19 Apr 2015 02:16:34 +0200 Subject: [PATCH 338/436] Revert "deprecated function" This reverts commit bc2cc91a7bcbd09dd2a78b3a8ee18ffc4da4d7e4. --- src/whatsprot.class.php | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index 08f36898..d162137b 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -807,6 +807,22 @@ public function sendClientConfig() $this->sendNode($node); } + public function sendGetClientConfig() + { + $msgId = $this->createMsgId(); + $child = new ProtocolNode("config", null, null, null); + $node = new ProtocolNode("iq", + array( + "id" => $msgId, + "xmlns" => "urn:xmpp:whatsapp:push", + "type" => "get", + "to" => static::WHATSAPP_SERVER + ), array($child), null); + + $this->sendNode($node); + $this->waitForServer($msgId); + } + /** * Transfer your number to new one * From d135860c46be4ab2dc355434a234962f71dea493 Mon Sep 17 00:00:00 2001 From: mgp25 Date: Sun, 19 Apr 2015 21:09:12 +0200 Subject: [PATCH 339/436] Update authblob --- src/whatsprot.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index d162137b..130f8f0c 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -2048,7 +2048,7 @@ protected function createAuthBlob() $this->reader->setKey($this->inputKey); //$this->writer->setKey($this->outputKey); $phone = $this->dissectPhone(); - $array = "\0\0\0\0" . $this->phoneNumber . $this->challengeData . time() . static::WHATSAPP_USER_AGENT . " MccMnc/" . str_pad($phone["mcc"], 3, "0", STR_PAD_LEFT) . $phone["mnc"]; + $array = "\0\0\0\0" . $this->phoneNumber . $this->challengeData . time(); $this->challengeData = null; return $this->outputKey->EncodeMessage($array, 0, strlen($array), false); } From 32c8389d826d49e61a37d966785bb0ef9711e9e0 Mon Sep 17 00:00:00 2001 From: mgp25 Date: Mon, 20 Apr 2015 12:20:40 +0200 Subject: [PATCH 340/436] Remove duplicated function --- src/whatsprot.class.php | 36 ++---------------------------------- 1 file changed, 2 insertions(+), 34 deletions(-) diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index 130f8f0c..bbfc3c5b 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -1349,38 +1349,6 @@ public function sendSetGroupSubject($gjid, $subject) $this->sendNode($node); } - /** - * End or delete a group chat. - * - * @param string $gjid The group's ID - */ - public function sendGroupsChatEnd($gjid) - { - $gjid = $this->getJID($gjid); - $msgID = $this->nodeId['endgroup'] = $this->createMsgId(); - - $groupNode = new ProtocolNode('group', - array( - "id" => $gjid - ), null, null); - - $leaveNode = new ProtocolNode("leave", - array( - "action" => "delete" - ), array($groupNode), null); - - $iqNode = new ProtocolNode("iq", - array( - "id" => $msgID, - "type" => "set", - "xmlns" => "w:g2", - "to" => static::WHATSAPP_GROUP_SERVER - ), array($leaveNode), null); - - $this->sendNode($iqNode); - $this->waitForServer($msgID); - } - /** * Leave a group chat. * @@ -1388,7 +1356,7 @@ public function sendGroupsChatEnd($gjid) */ public function sendGroupsLeave($gjids) { - $msgId = $this->createMsgId(); + $msgId = $this->nodeId['leavegroup'] = $this->createMsgId(); if (!is_array($gjids)) { $gjids = array($this->getJID($gjids)); @@ -3047,7 +3015,7 @@ protected function processInboundDataNode(ProtocolNode $node, $autoReceipt = tru $this->groupId )); } - if ($this->nodeId['endgroup'] == $node->getAttribute('id')) { + if ($this->nodeId['leavegroup'] == $node->getAttribute('id')) { $this->groupId = $node->getChild(0)->getChild(0)->getAttribute('id'); $this->eventManager()->fire("onGroupsChatEnd", array( From cc312b3388e1179244c303c007713fdc3db7c4be Mon Sep 17 00:00:00 2001 From: mgp25 Date: Mon, 20 Apr 2015 19:23:36 +0200 Subject: [PATCH 341/436] Better code structure --- src/BinTreeNodeReader.php | 277 ++++++++++++++++++++++ src/BinTreeNodeWriter.php | 213 +++++++++++++++++ src/Constants.php | 26 ++ src/mediauploader.php | 2 +- src/protocol.class.php | 488 -------------------------------------- src/whatsprot.class.php | 139 +++++------ 6 files changed, 578 insertions(+), 567 deletions(-) create mode 100644 src/BinTreeNodeReader.php create mode 100644 src/BinTreeNodeWriter.php create mode 100644 src/Constants.php diff --git a/src/BinTreeNodeReader.php b/src/BinTreeNodeReader.php new file mode 100644 index 00000000..7c11fee0 --- /dev/null +++ b/src/BinTreeNodeReader.php @@ -0,0 +1,277 @@ +key = null; + } + + public function setKey($key) + { + $this->key = $key; + } + + public function nextTree($input = null) + { + if ($input != null) { + $this->input = $input; + } + $firstByte = $this->peekInt8(); + $stanzaFlag = ($firstByte & 0xF0) >> 4; + $stanzaSize = $this->peekInt16(1) | (($firstByte & 0x0F) << 16); + if ($stanzaSize > strlen($this->input)) { + throw new Exception("Incomplete message $stanzaSize != " . strlen($this->input)); + } + $this->readInt24(); + if ($stanzaFlag & 8) { + if (isset($this->key)) { + $realSize = $stanzaSize - 4; + $this->input = $this->key->DecodeMessage($this->input, $realSize, 0, $realSize);// . $remainingData; + } else { + throw new Exception("Encountered encrypted message, missing key"); + } + } + if ($stanzaSize > 0) { + return $this->nextTreeInternal(); + } + + return null; + } + + protected function readNibble() { + $byte = $this->readInt8(); + + $ignoreLastNibble = (bool) ($byte & 0x80); + $size = ($byte & 0x7f); + $nrOfNibbles = $size * 2 - (int) $ignoreLastNibble; + + $data = $this->fillArray($size); + $string = ''; + + for ($i = 0; $i < $nrOfNibbles; $i++) { + $byte = $data[(int) floor($i / 2)]; + $ord = ord($byte); + + $shift = 4 * (1 - $i % 2); + $decimal = ($ord & (15 << $shift)) >> $shift; + + switch ($decimal) { + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + $string .= $decimal; + break; + case 10: + case 11: + $string .= chr($decimal - 10 + 45); + break; + default: + throw new Exception("Bad nibble: $decimal"); + } + } + + return $string; + } + + protected function getToken($token) + { + $ret = ""; + $subdict = false; + TokenMap::GetToken($token, $subdict, $ret); + if (!$ret) { + $token = $this->readInt8(); + TokenMap::GetToken($token, $subdict, $ret); + if (!$ret) { + throw new Exception("BinTreeNodeReader->getToken: Invalid token $token"); + } + } + + return $ret; + } + + protected function readString($token) + { + $ret = ""; + + if ($token == -1) { + throw new Exception("BinTreeNodeReader->readString: Invalid token $token"); + } + + if (($token > 2) && ($token < 0xf5)) { + $ret = $this->getToken($token); + } elseif ($token == 0) { + $ret = ""; + } elseif ($token == 0xfc) { + $size = $this->readInt8(); + $ret = $this->fillArray($size); + } elseif ($token == 0xfd) { + $size = $this->readInt24(); + $ret = $this->fillArray($size); + } elseif ($token == 0xfa) { + $user = $this->readString($this->readInt8()); + $server = $this->readString($this->readInt8()); + if ((strlen($user) > 0) && (strlen($server) > 0)) { + $ret = $user . "@" . $server; + } elseif (strlen($server) > 0) { + $ret = $server; + } + } elseif ($token == 0xff) { + $ret = $this->readNibble(); + } + + return $ret; + } + + protected function readAttributes($size) + { + $attributes = array(); + $attribCount = ($size - 2 + $size % 2) / 2; + + for ($i = 0; $i < $attribCount; $i++) { + $key = $this->readString($this->readInt8()); + $value = $this->readString($this->readInt8()); + $attributes[$key] = $value; + } + + return $attributes; + } + + protected function nextTreeInternal() + { + $token = $this->readInt8(); + $size = $this->readListSize($token); + $token = $this->readInt8(); + if ($token == 1) { + $attributes = $this->readAttributes($size); + + return new ProtocolNode("start", $attributes, null, ""); + } elseif ($token == 2) { + return null; + } + $tag = $this->readString($token); + $attributes = $this->readAttributes($size); + if (($size % 2) == 1) { + return new ProtocolNode($tag, $attributes, null, ""); + } + $token = $this->readInt8(); + if ($this->isListTag($token)) { + return new ProtocolNode($tag, $attributes, $this->readList($token), ""); + } + + return new ProtocolNode($tag, $attributes, null, $this->readString($token)); + } + + protected function isListTag($token) + { + return ($token == 248 || $token == 0 || $token == 249); + } + + protected function readList($token) + { + $size = $this->readListSize($token); + $ret = array(); + for ($i = 0; $i < $size; $i++) { + array_push($ret, $this->nextTreeInternal()); + } + + return $ret; + } + + protected function readListSize($token) + { + if ($token == 0xf8) { + return $this->readInt8(); + } elseif ($token == 0xf9) { + return $this->readInt16(); + } + + throw new Exception("BinTreeNodeReader->readListSize: Invalid token $token"); + } + + protected function peekInt24($offset = 0) + { + $ret = 0; + if (strlen($this->input) >= (3 + $offset)) { + $ret = ord(substr($this->input, $offset, 1)) << 16; + $ret |= ord(substr($this->input, $offset + 1, 1)) << 8; + $ret |= ord(substr($this->input, $offset + 2, 1)) << 0; + } + + return $ret; + } + + protected function readInt24() + { + $ret = $this->peekInt24(); + if (strlen($this->input) >= 3) { + $this->input = substr($this->input, 3); + } + + return $ret; + } + + protected function peekInt16($offset = 0) + { + $ret = 0; + if (strlen($this->input) >= (2 + $offset)) { + $ret = ord(substr($this->input, $offset, 1)) << 8; + $ret |= ord(substr($this->input, $offset + 1, 1)) << 0; + } + + return $ret; + } + + protected function readInt16() + { + $ret = $this->peekInt16(); + if ($ret > 0) { + $this->input = substr($this->input, 2); + } + + return $ret; + } + + protected function peekInt8($offset = 0) + { + $ret = 0; + if (strlen($this->input) >= (1 + $offset)) { + $sbstr = substr($this->input, $offset, 1); + $ret = ord($sbstr); + } + + return $ret; + } + + protected function readInt8() + { + $ret = $this->peekInt8(); + if (strlen($this->input) >= 1) { + $this->input = substr($this->input, 1); + } + + return $ret; + } + + protected function fillArray($len) + { + $ret = ""; + if (strlen($this->input) >= $len) { + $ret = substr($this->input, 0, $len); + $this->input = substr($this->input, $len); + } + + return $ret; + } +} diff --git a/src/BinTreeNodeWriter.php b/src/BinTreeNodeWriter.php new file mode 100644 index 00000000..a6f8c7fa --- /dev/null +++ b/src/BinTreeNodeWriter.php @@ -0,0 +1,213 @@ +key = null; + } + + public function setKey($key) + { + $this->key = $key; + } + + public function StartStream($domain, $resource) + { + $attributes = array(); + + $attributes["to"] = $domain; + $attributes["resource"] = $resource; + $this->writeListStart(count($attributes) * 2 + 1); + + $this->output .= "\x01"; + $this->writeAttributes($attributes); + + return "WA" . $this->writeInt8(1) . $this->writeInt8(5) . $this->flushBuffer(); + } + + /** + * @param ProtocolNode $node + * @param bool $encrypt + * + * @return string + */ + public function write($node, $encrypt = true) + { + if ($node == null) { + $this->output .= "\x00"; + } else { + $this->writeInternal($node); + } + + return $this->flushBuffer($encrypt); + } + + /** + * @param ProtocolNode $node + */ + protected function writeInternal($node) + { + $len = 1; + if ($node->getAttributes() != null) { + $len += count($node->getAttributes()) * 2; + } + if (count($node->getChildren()) > 0) { + $len += 1; + } + if (strlen($node->getData()) > 0) { + $len += 1; + } + $this->writeListStart($len); + $this->writeString($node->getTag()); + $this->writeAttributes($node->getAttributes()); + if (strlen($node->getData()) > 0) { + $this->writeBytes($node->getData()); + } + if ($node->getChildren()) { + $this->writeListStart(count($node->getChildren())); + foreach ($node->getChildren() as $child) { + $this->writeInternal($child); + } + } + } + + protected function parseInt24($data) + { + $ret = ord(substr($data, 0, 1)) << 16; + $ret |= ord(substr($data, 1, 1)) << 8; + $ret |= ord(substr($data, 2, 1)) << 0; + return $ret; + } + + protected function flushBuffer($encrypt = true) + { + $size = strlen($this->output); + $data = $this->output; + if ($this->key != null && $encrypt) { + $bsize = $this->getInt24($size); + //encrypt + $data = $this->key->EncodeMessage($data, $size, 0, $size); + $len = strlen($data); + $bsize[0] = chr((8 << 4) | (($len & 16711680) >> 16)); + $bsize[1] = chr(($len & 65280) >> 8); + $bsize[2] = chr($len & 255); + $size = $this->parseInt24($bsize); + } + $ret = $this->writeInt24($size) . $data; + $this->output = ''; + return $ret; + } + + protected function getInt24($length) + { + $ret = ''; + $ret .= chr((($length & 0xf0000) >> 16)); + $ret .= chr((($length & 0xff00) >> 8)); + $ret .= chr(($length & 0xff)); + return $ret; + } + + protected function writeToken($token) + { + if ($token < 0xf5) { + $this->output .= chr($token); + } elseif ($token <= 0x1f4) { + $this->output .= "\xfe" . chr($token - 0xf5); + } + } + + protected function writeJid($user, $server) + { + $this->output .= "\xfa"; + if (strlen($user) > 0) { + $this->writeString($user); + } else { + $this->writeToken(0); + } + $this->writeString($server); + } + + protected function writeInt8($v) + { + $ret = chr($v & 0xff); + + return $ret; + } + + protected function writeInt16($v) + { + $ret = chr(($v & 0xff00) >> 8); + $ret .= chr(($v & 0x00ff) >> 0); + + return $ret; + } + + protected function writeInt24($v) + { + $ret = chr(($v & 0xff0000) >> 16); + $ret .= chr(($v & 0x00ff00) >> 8); + $ret .= chr(($v & 0x0000ff) >> 0); + + return $ret; + } + + protected function writeBytes($bytes) + { + $len = strlen($bytes); + if ($len >= 0x100) { + $this->output .= "\xfd"; + $this->output .= $this->writeInt24($len); + } else { + $this->output .= "\xfc"; + $this->output .= $this->writeInt8($len); + } + $this->output .= $bytes; + } + + protected function writeString($tag) + { + $intVal = -1; + $subdict = false; + if (TokenMap::TryGetToken($tag, $subdict, $intVal)) { + if ($subdict) { + $this->writeToken(236); + } + $this->writeToken($intVal); + return; + } + $index = strpos($tag, '@'); + if ($index) { + $server = substr($tag, $index + 1); + $user = substr($tag, 0, $index); + $this->writeJid($user, $server); + } else { + $this->writeBytes($tag); + } + } + + protected function writeAttributes($attributes) + { + if ($attributes) { + foreach ($attributes as $key => $value) { + $this->writeString($key); + $this->writeString($value); + } + } + } + + protected function writeListStart($len) + { + if ($len == 0) { + $this->output .= "\x00"; + } elseif ($len < 256) { + $this->output .= "\xf8" . chr($len); + } else { + $this->output .= "\xf9" . $this->writeInt16($len); + } + } +} diff --git a/src/Constants.php b/src/Constants.php new file mode 100644 index 00000000..0f5ae991 --- /dev/null +++ b/src/Constants.php @@ -0,0 +1,26 @@ +key = null; - } - - public function setKey($key) - { - $this->key = $key; - } - - public function nextTree($input = null) - { - if ($input != null) { - $this->input = $input; - } - $firstByte = $this->peekInt8(); - $stanzaFlag = ($firstByte & 0xF0) >> 4; - $stanzaSize = $this->peekInt16(1) | (($firstByte & 0x0F) << 16); - if ($stanzaSize > strlen($this->input)) { - throw new Exception("Incomplete message $stanzaSize != " . strlen($this->input)); - } - $this->readInt24(); - if ($stanzaFlag & 8) { - if (isset($this->key)) { - $realSize = $stanzaSize - 4; - $this->input = $this->key->DecodeMessage($this->input, $realSize, 0, $realSize);// . $remainingData; - } else { - throw new Exception("Encountered encrypted message, missing key"); - } - } - if ($stanzaSize > 0) { - return $this->nextTreeInternal(); - } - - return null; - } - - protected function readNibble() { - $byte = $this->readInt8(); - - $ignoreLastNibble = (bool) ($byte & 0x80); - $size = ($byte & 0x7f); - $nrOfNibbles = $size * 2 - (int) $ignoreLastNibble; - - $data = $this->fillArray($size); - $string = ''; - - for ($i = 0; $i < $nrOfNibbles; $i++) { - $byte = $data[(int) floor($i / 2)]; - $ord = ord($byte); - - $shift = 4 * (1 - $i % 2); - $decimal = ($ord & (15 << $shift)) >> $shift; - - switch ($decimal) { - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - case 8: - case 9: - $string .= $decimal; - break; - case 10: - case 11: - $string .= chr($decimal - 10 + 45); - break; - default: - throw new Exception("Bad nibble: $decimal"); - } - } - - return $string; - } - - protected function getToken($token) - { - $ret = ""; - $subdict = false; - TokenMap::GetToken($token, $subdict, $ret); - if (!$ret) { - $token = $this->readInt8(); - TokenMap::GetToken($token, $subdict, $ret); - if (!$ret) { - throw new Exception("BinTreeNodeReader->getToken: Invalid token $token"); - } - } - - return $ret; - } - - protected function readString($token) - { - $ret = ""; - - if ($token == -1) { - throw new Exception("BinTreeNodeReader->readString: Invalid token $token"); - } - - if (($token > 2) && ($token < 0xf5)) { - $ret = $this->getToken($token); - } elseif ($token == 0) { - $ret = ""; - } elseif ($token == 0xfc) { - $size = $this->readInt8(); - $ret = $this->fillArray($size); - } elseif ($token == 0xfd) { - $size = $this->readInt24(); - $ret = $this->fillArray($size); - } elseif ($token == 0xfa) { - $user = $this->readString($this->readInt8()); - $server = $this->readString($this->readInt8()); - if ((strlen($user) > 0) && (strlen($server) > 0)) { - $ret = $user . "@" . $server; - } elseif (strlen($server) > 0) { - $ret = $server; - } - } elseif ($token == 0xff) { - $ret = $this->readNibble(); - } - - return $ret; - } - - protected function readAttributes($size) - { - $attributes = array(); - $attribCount = ($size - 2 + $size % 2) / 2; - - for ($i = 0; $i < $attribCount; $i++) { - $key = $this->readString($this->readInt8()); - $value = $this->readString($this->readInt8()); - $attributes[$key] = $value; - } - - return $attributes; - } - - protected function nextTreeInternal() - { - $token = $this->readInt8(); - $size = $this->readListSize($token); - $token = $this->readInt8(); - if ($token == 1) { - $attributes = $this->readAttributes($size); - - return new ProtocolNode("start", $attributes, null, ""); - } elseif ($token == 2) { - return null; - } - $tag = $this->readString($token); - $attributes = $this->readAttributes($size); - if (($size % 2) == 1) { - return new ProtocolNode($tag, $attributes, null, ""); - } - $token = $this->readInt8(); - if ($this->isListTag($token)) { - return new ProtocolNode($tag, $attributes, $this->readList($token), ""); - } - - return new ProtocolNode($tag, $attributes, null, $this->readString($token)); - } - - protected function isListTag($token) - { - return ($token == 248 || $token == 0 || $token == 249); - } - - protected function readList($token) - { - $size = $this->readListSize($token); - $ret = array(); - for ($i = 0; $i < $size; $i++) { - array_push($ret, $this->nextTreeInternal()); - } - - return $ret; - } - - protected function readListSize($token) - { - if ($token == 0xf8) { - return $this->readInt8(); - } elseif ($token == 0xf9) { - return $this->readInt16(); - } - - throw new Exception("BinTreeNodeReader->readListSize: Invalid token $token"); - } - - protected function peekInt24($offset = 0) - { - $ret = 0; - if (strlen($this->input) >= (3 + $offset)) { - $ret = ord(substr($this->input, $offset, 1)) << 16; - $ret |= ord(substr($this->input, $offset + 1, 1)) << 8; - $ret |= ord(substr($this->input, $offset + 2, 1)) << 0; - } - - return $ret; - } - - protected function readInt24() - { - $ret = $this->peekInt24(); - if (strlen($this->input) >= 3) { - $this->input = substr($this->input, 3); - } - - return $ret; - } - - protected function peekInt16($offset = 0) - { - $ret = 0; - if (strlen($this->input) >= (2 + $offset)) { - $ret = ord(substr($this->input, $offset, 1)) << 8; - $ret |= ord(substr($this->input, $offset + 1, 1)) << 0; - } - - return $ret; - } - - protected function readInt16() - { - $ret = $this->peekInt16(); - if ($ret > 0) { - $this->input = substr($this->input, 2); - } - - return $ret; - } - - protected function peekInt8($offset = 0) - { - $ret = 0; - if (strlen($this->input) >= (1 + $offset)) { - $sbstr = substr($this->input, $offset, 1); - $ret = ord($sbstr); - } - - return $ret; - } - - protected function readInt8() - { - $ret = $this->peekInt8(); - if (strlen($this->input) >= 1) { - $this->input = substr($this->input, 1); - } - - return $ret; - } - - protected function fillArray($len) - { - $ret = ""; - if (strlen($this->input) >= $len) { - $ret = substr($this->input, 0, $len); - $this->input = substr($this->input, $len); - } - - return $ret; - } -} - -class BinTreeNodeWriter -{ - private $output; - /** @var $key KeyStream */ - private $key; - - public function resetKey() - { - $this->key = null; - } - - public function setKey($key) - { - $this->key = $key; - } - - public function StartStream($domain, $resource) - { - $attributes = array(); - - $attributes["to"] = $domain; - $attributes["resource"] = $resource; - $this->writeListStart(count($attributes) * 2 + 1); - - $this->output .= "\x01"; - $this->writeAttributes($attributes); - - return "WA" . $this->writeInt8(1) . $this->writeInt8(5) . $this->flushBuffer(); - } - - /** - * @param ProtocolNode $node - * @param bool $encrypt - * - * @return string - */ - public function write($node, $encrypt = true) - { - if ($node == null) { - $this->output .= "\x00"; - } else { - $this->writeInternal($node); - } - - return $this->flushBuffer($encrypt); - } - - /** - * @param ProtocolNode $node - */ - protected function writeInternal($node) - { - $len = 1; - if ($node->getAttributes() != null) { - $len += count($node->getAttributes()) * 2; - } - if (count($node->getChildren()) > 0) { - $len += 1; - } - if (strlen($node->getData()) > 0) { - $len += 1; - } - $this->writeListStart($len); - $this->writeString($node->getTag()); - $this->writeAttributes($node->getAttributes()); - if (strlen($node->getData()) > 0) { - $this->writeBytes($node->getData()); - } - if ($node->getChildren()) { - $this->writeListStart(count($node->getChildren())); - foreach ($node->getChildren() as $child) { - $this->writeInternal($child); - } - } - } - - protected function parseInt24($data) - { - $ret = ord(substr($data, 0, 1)) << 16; - $ret |= ord(substr($data, 1, 1)) << 8; - $ret |= ord(substr($data, 2, 1)) << 0; - return $ret; - } - - protected function flushBuffer($encrypt = true) - { - $size = strlen($this->output); - $data = $this->output; - if ($this->key != null && $encrypt) { - $bsize = $this->getInt24($size); - //encrypt - $data = $this->key->EncodeMessage($data, $size, 0, $size); - $len = strlen($data); - $bsize[0] = chr((8 << 4) | (($len & 16711680) >> 16)); - $bsize[1] = chr(($len & 65280) >> 8); - $bsize[2] = chr($len & 255); - $size = $this->parseInt24($bsize); - } - $ret = $this->writeInt24($size) . $data; - $this->output = ''; - return $ret; - } - - protected function getInt24($length) - { - $ret = ''; - $ret .= chr((($length & 0xf0000) >> 16)); - $ret .= chr((($length & 0xff00) >> 8)); - $ret .= chr(($length & 0xff)); - return $ret; - } - - protected function writeToken($token) - { - if ($token < 0xf5) { - $this->output .= chr($token); - } elseif ($token <= 0x1f4) { - $this->output .= "\xfe" . chr($token - 0xf5); - } - } - - protected function writeJid($user, $server) - { - $this->output .= "\xfa"; - if (strlen($user) > 0) { - $this->writeString($user); - } else { - $this->writeToken(0); - } - $this->writeString($server); - } - - protected function writeInt8($v) - { - $ret = chr($v & 0xff); - - return $ret; - } - - protected function writeInt16($v) - { - $ret = chr(($v & 0xff00) >> 8); - $ret .= chr(($v & 0x00ff) >> 0); - - return $ret; - } - - protected function writeInt24($v) - { - $ret = chr(($v & 0xff0000) >> 16); - $ret .= chr(($v & 0x00ff00) >> 8); - $ret .= chr(($v & 0x0000ff) >> 0); - - return $ret; - } - - protected function writeBytes($bytes) - { - $len = strlen($bytes); - if ($len >= 0x100) { - $this->output .= "\xfd"; - $this->output .= $this->writeInt24($len); - } else { - $this->output .= "\xfc"; - $this->output .= $this->writeInt8($len); - } - $this->output .= $bytes; - } - - protected function writeString($tag) - { - $intVal = -1; - $subdict = false; - if (TokenMap::TryGetToken($tag, $subdict, $intVal)) { - if ($subdict) { - $this->writeToken(236); - } - $this->writeToken($intVal); - return; - } - $index = strpos($tag, '@'); - if ($index) { - $server = substr($tag, $index + 1); - $user = substr($tag, 0, $index); - $this->writeJid($user, $server); - } else { - $this->writeBytes($tag); - } - } - - protected function writeAttributes($attributes) - { - if ($attributes) { - foreach ($attributes as $key => $value) { - $this->writeString($key); - $this->writeString($value); - } - } - } - - protected function writeListStart($len) - { - if ($len == 0) { - $this->output .= "\x00"; - } elseif ($len < 256) { - $this->output .= "\xf8" . chr($len); - } else { - $this->output .= "\xf9" . $this->writeInt16($len); - } - } -} diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index bbfc3c5b..c9b5b2f0 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -1,5 +1,8 @@ challengeFilename = sprintf('%s%s%snextChallenge.%s.dat', __DIR__, DIRECTORY_SEPARATOR, - self::DATA_FOLDER . DIRECTORY_SEPARATOR, + Constants::DATA_FOLDER . DIRECTORY_SEPARATOR, $number); $this->identity = $this->buildIdentity(); $this->name = $nickname; - $this->loginStatus = static::DISCONNECTED_STATUS; + $this->loginStatus = Constants::DISCONNECTED_STATUS; $this->eventManager = new WhatsApiEventsManager(); } @@ -171,7 +154,7 @@ public function checkCredentials() } // Build the url. - $host = 'https://' . static::WHATSAPP_CHECK_HOST; + $host = 'https://' . Constants::WHATSAPP_CHECK_HOST; $query = array( 'cc' => $phone['cc'], 'in' => $phone['phone'], @@ -245,7 +228,7 @@ public function codeRegister($code) //$langCode = ($phone['ISO639'] != '') ? $phone['ISO639'] : 'en'; // Build the url. - $host = 'https://' . static::WHATSAPP_REGISTER_HOST; + $host = 'https://' . Constants::WHATSAPP_REGISTER_HOST; $query = array( 'cc' => $phone['cc'], 'in' => $phone['phone'], @@ -327,7 +310,7 @@ public function codeRequest($method = 'sms', $carrier = "T-Mobile5") $token = generateRequestToken($phone['country'], $phone['phone']); // Build the url. - $host = 'https://' . static::WHATSAPP_REQUEST_HOST; + $host = 'https://' . Constants::WHATSAPP_REQUEST_HOST; $query = array( 'in' => $phone['phone'], 'cc' => $phone['cc'], @@ -420,9 +403,9 @@ public function connect() return true; } - //$WAData = json_decode(file_get_contents(static::WHATSAPP_VER_CHECKER), true); + //$WAData = json_decode(file_get_contents(Constants::WHATSAPP_VER_CHECKER), true); - // if(static::WHATSAPP_VER != $WAver) + // if(Constants::WHATSAPP_VER != $WAver) // { // updateData('token.php', $WAData->e, $WAData->h); // updateData('whatsprot.class.php', $WAData->e); @@ -431,15 +414,15 @@ public function connect() /* Create a TCP/IP socket. */ $socket = socket_create(AF_INET, SOCK_STREAM, SOL_TCP); if ($socket !== false) { - $result = socket_connect($socket, "e" . rand(1, 16) . ".whatsapp.net", static::PORT); + $result = socket_connect($socket, "e" . rand(1, 16) . ".whatsapp.net", Constants::PORT); if ($result === false) { $socket = false; } } if ($socket !== false) { - socket_set_option($socket, SOL_SOCKET, SO_RCVTIMEO, array('sec' => static::TIMEOUT_SEC, 'usec' => static::TIMEOUT_USEC)); - socket_set_option($socket, SOL_SOCKET, SO_SNDTIMEO, array('sec' => static::TIMEOUT_SEC, 'usec' => static::TIMEOUT_USEC)); + socket_set_option($socket, SOL_SOCKET, SO_RCVTIMEO, array('sec' => Constants::TIMEOUT_SEC, 'usec' => Constants::TIMEOUT_USEC)); + socket_set_option($socket, SOL_SOCKET, SO_SNDTIMEO, array('sec' => Constants::TIMEOUT_SEC, 'usec' => Constants::TIMEOUT_USEC)); $this->socket = $socket; $this->eventManager()->fire("onConnect", @@ -479,7 +462,7 @@ public function disconnect() @socket_shutdown($this->socket, 2); @socket_close($this->socket); $this->socket = null; - $this->loginStatus = static::DISCONNECTED_STATUS; + $this->loginStatus = Constants::DISCONNECTED_STATUS; $this->eventManager()->fire("onDisconnect", array( $this->phoneNumber, @@ -568,7 +551,7 @@ public function pollMessage($autoReceipt = true, $type = "read") $w = array(); $e = array(); - if (socket_select($r, $w, $e, static::TIMEOUT_SEC, static::TIMEOUT_USEC)) { + if (socket_select($r, $w, $e, Constants::TIMEOUT_SEC, Constants::TIMEOUT_USEC)) { // Something to read if ($stanza = $this->readStanza()) { $this->processInboundData($stanza, $autoReceipt, $type); @@ -608,7 +591,7 @@ public function sendGetCipherKeysFromUser($number) "id" => $msgId, "xmlns" => "encrypt", "type" => "get", - "to" => static::WHATSAPP_SERVER + "to" => Constants::WHATSAPP_SERVER ), array($keyNode), null); $this->sendNode($node); @@ -759,7 +742,7 @@ public function sendDeleteBroadcastLists($lists) "id" => $msgId, "xmlns" => "w:b", "type" => "set", - "to" => static::WHATSAPP_SERVER + "to" => Constants::WHATSAPP_SERVER ), array($deleteNode), null); $this->sendNode($node); @@ -783,7 +766,7 @@ protected function sendClearDirty($categories) array( "id" => $msgId, "type" => "set", - "to" => static::WHATSAPP_SERVER, + "to" => Constants::WHATSAPP_SERVER, "xmlns" => "urn:xmpp:whatsapp:dirty" ), $catnodes, null); @@ -793,15 +776,15 @@ protected function sendClearDirty($categories) public function sendClientConfig() { $attr = array(); - $attr["platform"] = static::WHATSAPP_DEVICE; - $attr["version"] = static::WHATSAPP_VER; + $attr["platform"] = Constants::WHATSAPP_DEVICE; + $attr["version"] = Constants::WHATSAPP_VER; $child = new ProtocolNode("config", $attr, null, ""); $node = new ProtocolNode("iq", array( "id" => $this->createMsgId(), "type" => "set", "xmlns" => "urn:xmpp:whatsapp:push", - "to" => static::WHATSAPP_SERVER + "to" => Constants::WHATSAPP_SERVER ), array($child), null); $this->sendNode($node); @@ -816,7 +799,7 @@ public function sendGetClientConfig() "id" => $msgId, "xmlns" => "urn:xmpp:whatsapp:push", "type" => "get", - "to" => static::WHATSAPP_SERVER + "to" => Constants::WHATSAPP_SERVER ), array($child), null); $this->sendNode($node); @@ -918,7 +901,7 @@ public function sendGetPrivacySettings() $privacyNode = new ProtocolNode("privacy", null, null, null); $node = new ProtocolNode("iq", array( - "to" => static::WHATSAPP_SERVER, + "to" => Constants::WHATSAPP_SERVER, "id" => $msgId, "xmlns" => "privacy", "type" => "get" @@ -948,7 +931,7 @@ public function sendSetPrivacySettings($category, $value) $privacyNode = new ProtocolNode("privacy", null, array($categoryNode), null); $node = new ProtocolNode("iq", array( - "to" => static::WHATSAPP_SERVER, + "to" => Constants::WHATSAPP_SERVER, "type" => "set", "id" => $msgId, "xmlns" => "privacy" @@ -1062,7 +1045,7 @@ public function sendGetServerProperties() "id" => $id, "type" => "get", "xmlns" => "w", - "to" => static::WHATSAPP_SERVER + "to" => Constants::WHATSAPP_SERVER ), array($child), null); $this->sendNode($node); @@ -1090,7 +1073,7 @@ public function sendGetServicePricing($lg, $lc) "id" => $msgId, "xmlns" => "urn:xmpp:whatsapp:account", "type" => "get", - "to" => static::WHATSAPP_SERVER + "to" => Constants::WHATSAPP_SERVER ), array($pricingNode), null); $this->sendNode($node); @@ -1109,7 +1092,7 @@ public function sendExtendAccount() "id" => $msgId, "xmlns" => "urn:xmpp:whatsapp:account", "type" => "set", - "to" => static::WHATSAPP_SERVER + "to" => Constants::WHATSAPP_SERVER ), array($extendingNode), null); $this->sendNode($node); @@ -1127,7 +1110,7 @@ public function sendGetBroadcastLists() "id" => $msgId, "xmlns" => "w:b", "type" => "get", - "to" => static::WHATSAPP_SERVER + "to" => Constants::WHATSAPP_SERVER ), array($listsNode), null); $this->sendNode($node); @@ -1150,7 +1133,7 @@ public function sendGetNormalizedJid($countryCode, $number) "id" => $msgId, "xmlns" => "urn:xmpp:whatsapp:account", "type" => "get", - "to" => static::WHATSAPP_SERVER + "to" => Constants::WHATSAPP_SERVER ), array($normalizeNode), null); $this->sendNode($node); @@ -1189,7 +1172,7 @@ public function sendRemoveAccount($lg = null, $lc = null, $feedback = null) $removeNode = new ProtocolNode("remove", null, $childNode, null); $node = new ProtocolNode("iq", array( - "to" => static::WHATSAPP_SERVER, + "to" => Constants::WHATSAPP_SERVER, "xmlns" => "urn:xmpp:whatsapp:account", "type" => "get", "id" => $msgId @@ -1210,7 +1193,7 @@ public function sendPing() "id" => $msgId, "xmlns" => "w:p", "type" => "get", - "to" => static::WHATSAPP_SERVER + "to" => Constants::WHATSAPP_SERVER ), array($pingNode), null); $this->sendNode($node); @@ -1242,7 +1225,7 @@ public function sendGetHasVoipEnabled($jids) "id" => $msgId, "xmlns" => "voip", "type" => "get", - "to" => static::WHATSAPP_SERVER + "to" => Constants::WHATSAPP_SERVER ), array($eligibleNode), null); $this->sendNode($node); @@ -1266,7 +1249,7 @@ public function sendGetStatuses($jids) $node = new ProtocolNode("iq", array( - "to" => static::WHATSAPP_SERVER, + "to" => Constants::WHATSAPP_SERVER, "type" => "get", "xmlns" => "status", "id" => $this->createMsgId() @@ -1313,7 +1296,7 @@ public function sendGroupsChatCreate($subject, $participants) "xmlns" => "w:g2", "id" => $id, "type" => "set", - "to" => static::WHATSAPP_GROUP_SERVER + "to" => Constants::WHATSAPP_GROUP_SERVER ), array($createNode), null); $this->sendNode($iqNode); @@ -1378,7 +1361,7 @@ public function sendGroupsLeave($gjids) $node = new ProtocolNode("iq", array( "id" => $msgId, - "to" => static::WHATSAPP_GROUP_SERVER, + "to" => Constants::WHATSAPP_GROUP_SERVER, "type" => "set", "xmlns" => "w:g2" ), array($leave), null); @@ -1704,7 +1687,7 @@ public function sendPong($msgid) { $messageNode = new ProtocolNode("iq", array( - "to" => static::WHATSAPP_SERVER, + "to" => Constants::WHATSAPP_SERVER, "id" => $msgid, "type" => "result" ), null, ""); @@ -1874,7 +1857,7 @@ public function sendSetRecoveryToken($token) array( "id" => $this->createMsgId(), "type" => "set", - "to" => static::WHATSAPP_SERVER + "to" => Constants::WHATSAPP_SERVER ), array($child), null); $this->sendNode($node); @@ -1890,7 +1873,7 @@ public function sendStatusUpdate($txt) $child = new ProtocolNode("status", null, null, $txt); $node = new ProtocolNode("iq", array( - "to" => static::WHATSAPP_SERVER, + "to" => Constants::WHATSAPP_SERVER, "type" => "set", "id" => $this->createMsgId(), "xmlns" => "status" @@ -1986,7 +1969,7 @@ protected function authenticate() $keys = KeyStream::GenerateKeys(base64_decode($this->password), $this->challengeData); $this->inputKey = new KeyStream($keys[2], $keys[3]); $this->outputKey = new KeyStream($keys[0], $keys[1]); - $array = "\0\0\0\0" . $this->phoneNumber . $this->challengeData;// . time() . static::WHATSAPP_USER_AGENT . " MccMnc/" . str_pad($phone["mcc"], 3, "0", STR_PAD_LEFT) . "001"; + $array = "\0\0\0\0" . $this->phoneNumber . $this->challengeData;// . time() . Constants::WHATSAPP_USER_AGENT . " MccMnc/" . str_pad($phone["mcc"], 3, "0", STR_PAD_LEFT) . "001"; $response = $this->outputKey->EncodeMessage($array, 0, 4, strlen($array) - 4); return $response; } @@ -2193,8 +2176,8 @@ protected function doLogin() $this->writer->resetKey(); $this->reader->resetKey(); - $resource = static::WHATSAPP_DEVICE . '-' . static::WHATSAPP_VER . '-' . static::PORT; - $data = $this->writer->StartStream(static::WHATSAPP_SERVER, $resource); + $resource = Constants::WHATSAPP_DEVICE . '-' . Constants::WHATSAPP_VER . '-' . Constants::PORT; + $data = $this->writer->StartStream(Constants::WHATSAPP_SERVER, $resource); $feat = $this->createFeaturesNode(); $auth = $this->createAuthNode(); $this->sendData($data); @@ -2213,7 +2196,7 @@ protected function doLogin() $this->pollMessage(); } - if ($this->loginStatus === static::DISCONNECTED_STATUS) { + if ($this->loginStatus === Constants::DISCONNECTED_STATUS) { throw new LoginFailureException(); } @@ -2234,7 +2217,7 @@ protected function doLogin() protected function isLoggedIn(){ //If you aren't connected you can't be logged in! ($this->isConnected()) //We are connected - but are we logged in? (the rest) - return ($this->isConnected() && !empty($this->loginStatus) && $this->loginStatus === static::CONNECTED_STATUS); + return ($this->isConnected() && !empty($this->loginStatus) && $this->loginStatus === Constants::CONNECTED_STATUS); } /** @@ -2247,7 +2230,7 @@ protected function isLoggedIn(){ */ protected function buildIdentity() { - $identity_file = sprintf('%s%s%sid.%s.dat', __DIR__, DIRECTORY_SEPARATOR, self::DATA_FOLDER . DIRECTORY_SEPARATOR, $this->phoneNumber); + $identity_file = sprintf('%s%s%sid.%s.dat', __DIR__, DIRECTORY_SEPARATOR, Constants::DATA_FOLDER . DIRECTORY_SEPARATOR, $this->phoneNumber); if (is_readable($identity_file)) { $data = urldecode(file_get_contents($identity_file)); @@ -2366,10 +2349,10 @@ protected function getJID($number) //check if group message if (stristr($number, '-')) { //to group - $number .= "@" . static::WHATSAPP_GROUP_SERVER; + $number .= "@" . Constants::WHATSAPP_GROUP_SERVER; } else { //to normal user - $number .= "@" . static::WHATSAPP_SERVER; + $number .= "@" . Constants::WHATSAPP_SERVER; } } @@ -2413,7 +2396,7 @@ protected function getMediaFile($filepath, $maxsizebytes = 1048576) //TODO check what max file size whatsapp server accepts. if ($this->mediaFileInfo['filesize'] < $maxsizebytes) { //Create temp file in media folder. Media folder must be writable! - $this->mediaFileInfo['filepath'] = tempnam(__DIR__ . DIRECTORY_SEPARATOR . self::DATA_FOLDER . DIRECTORY_SEPARATOR . self::MEDIA_FOLDER, 'WHA'); + $this->mediaFileInfo['filepath'] = tempnam(__DIR__ . DIRECTORY_SEPARATOR . Constants::DATA_FOLDER . DIRECTORY_SEPARATOR . Constants::MEDIA_FOLDER, 'WHA'); $fp = fopen($this->mediaFileInfo['filepath'], 'w'); if ($fp) { curl_setopt($curl, CURLOPT_NOBODY, false); @@ -2471,7 +2454,7 @@ protected function getResponse($host, $query) curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_HEADER, 0); - curl_setopt($ch, CURLOPT_USERAGENT, static::WHATSAPP_USER_AGENT); + curl_setopt($ch, CURLOPT_USERAGENT, Constants::WHATSAPP_USER_AGENT); curl_setopt($ch, CURLOPT_HTTPHEADER, array('Accept: text/json')); // This makes CURL accept any peer! curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); @@ -2529,7 +2512,7 @@ protected function processInboundDataNode(ProtocolNode $node, $autoReceipt = tru if ($node->getTag() == "challenge") { $this->processChallenge($node); } elseif ($node->getTag() == "failure") { - $this->loginStatus = static::DISCONNECTED_STATUS; + $this->loginStatus = Constants::DISCONNECTED_STATUS; $this->eventManager()->fire("onLoginFailed", array( $this->phoneNumber, @@ -2537,7 +2520,7 @@ protected function processInboundDataNode(ProtocolNode $node, $autoReceipt = tru )); } elseif ($node->getTag() == "success") { if ($node->getAttribute("status") == "active") { - $this->loginStatus = static::CONNECTED_STATUS; + $this->loginStatus = Constants::CONNECTED_STATUS; $challengeData = $node->getData(); file_put_contents($this->challengeFilename, $challengeData); $this->writer->setKey($this->outputKey); @@ -2856,20 +2839,20 @@ protected function processInboundDataNode(ProtocolNode $node, $autoReceipt = tru && strncmp($node->getAttribute('from'), $this->phoneNumber, strlen($this->phoneNumber)) != 0 && strpos($node->getAttribute('from'), "-") !== false && $node->getAttribute('type') != null) { - $groupId = self::parseJID($node->getAttribute('from')); + $groupId = Constants::parseJID($node->getAttribute('from')); if ($node->getAttribute('add') != null) { $this->eventManager()->fire("onGroupsParticipantsAdd", array( $this->phoneNumber, $groupId, - self::parseJID($node->getAttribute('add')) + Constants::parseJID($node->getAttribute('add')) )); } elseif ($node->getAttribute('remove') != null) { $this->eventManager()->fire("onGroupsParticipantsRemove", array( $this->phoneNumber, $groupId, - self::parseJID($node->getAttribute('remove')) + Constants::parseJID($node->getAttribute('remove')) )); } } @@ -2996,7 +2979,7 @@ protected function processInboundDataNode(ProtocolNode $node, $autoReceipt = tru if ($node->getChild("media") != null || $node->getChild("duplicate") != null) { $this->processUploadResponse($node); } - if (strpos($node->getAttribute("from"), static::WHATSAPP_GROUP_SERVER) !== false) { + if (strpos($node->getAttribute("from"), Constants::WHATSAPP_GROUP_SERVER) !== false) { //There are multiple types of Group reponses. Also a valid group response can have NO children. //Events fired depend on text in the ID field. $groupList = array(); @@ -3135,7 +3118,7 @@ protected function processInboundDataNode(ProtocolNode $node, $autoReceipt = tru "id" => $msgId, "xmlns" => "w:m", "type" => "set", - "to" => static::WHATSAPP_SERVER + "to" => Constants::WHATSAPP_SERVER ), array($ackNode), null); $this->sendNode($iqNode); @@ -3375,9 +3358,9 @@ protected function processMediaImage($node) $url = $media->getAttribute("url"); //save thumbnail - file_put_contents(__DIR__ . DIRECTORY_SEPARATOR . self::DATA_FOLDER . DIRECTORY_SEPARATOR . self::MEDIA_FOLDER . DIRECTORY_SEPARATOR . 'thumb_' . $filename, $media->getData()); + file_put_contents(__DIR__ . DIRECTORY_SEPARATOR . Constants::DATA_FOLDER . DIRECTORY_SEPARATOR . Constants::MEDIA_FOLDER . DIRECTORY_SEPARATOR . 'thumb_' . $filename, $media->getData()); //download and save original - file_put_contents(__DIR__ . DIRECTORY_SEPARATOR . self::DATA_FOLDER . DIRECTORY_SEPARATOR . self::MEDIA_FOLDER . DIRECTORY_SEPARATOR . $filename, file_get_contents($url)); + file_put_contents(__DIR__ . DIRECTORY_SEPARATOR . Constants::DATA_FOLDER . DIRECTORY_SEPARATOR . Constants::MEDIA_FOLDER . DIRECTORY_SEPARATOR . $filename, file_get_contents($url)); } } @@ -3392,9 +3375,9 @@ protected function processProfilePicture($node) if ($pictureNode != null) { if ($pictureNode->getAttribute("type") == "preview") { - $filename = __DIR__ . DIRECTORY_SEPARATOR . self::DATA_FOLDER . DIRECTORY_SEPARATOR . self::PICTURES_FOLDER . DIRECTORY_SEPARATOR . 'preview_' . $node->getAttribute('from') . 'jpg'; + $filename = __DIR__ . DIRECTORY_SEPARATOR . Constants::DATA_FOLDER . DIRECTORY_SEPARATOR . Constants::PICTURES_FOLDER . DIRECTORY_SEPARATOR . 'preview_' . $node->getAttribute('from') . 'jpg'; } else { - $filename = __DIR__ . DIRECTORY_SEPARATOR . self::DATA_FOLDER . DIRECTORY_SEPARATOR . self::PICTURES_FOLDER . DIRECTORY_SEPARATOR . $node->getAttribute('from') . '.jpg'; + $filename = __DIR__ . DIRECTORY_SEPARATOR . Constants::DATA_FOLDER . DIRECTORY_SEPARATOR . Constants::PICTURES_FOLDER . DIRECTORY_SEPARATOR . $node->getAttribute('from') . '.jpg'; } file_put_contents($filename, $pictureNode->getData()); @@ -3708,7 +3691,7 @@ protected function sendGetGroupsFiltered($type) "id" => $msgID, "type" => "get", "xmlns" => "w:g2", - "to" => static::WHATSAPP_GROUP_SERVER + "to" => Constants::WHATSAPP_GROUP_SERVER ), array($child), null); $this->sendNode($node); @@ -3850,7 +3833,7 @@ protected function sendRequestFileUpload($b64hash, $type, $size, $filepath, $to, $node = new ProtocolNode("iq", array( 'id' => $id, - 'to' => static::WHATSAPP_SERVER, + 'to' => Constants::WHATSAPP_SERVER, 'type' => 'set', 'xmlns' => 'w:m' ), array($mediaNode), null); From 1dd08132476ad26f30693f09bc21d5bc41d1367a Mon Sep 17 00:00:00 2001 From: mgp25 Date: Wed, 22 Apr 2015 15:41:23 +0200 Subject: [PATCH 342/436] Fixes #626 --- src/whatsprot.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index c9b5b2f0..9461b4d3 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -3027,7 +3027,7 @@ protected function processInboundDataNode(ProtocolNode $node, $autoReceipt = tru } } } - if ($this->nodeId['get_lists'] == $node->getAttribute('id')) { + if (isset($this->nodeId['get_lists']) && ($this->nodeId['get_lists'] == $node->getAttribute('id'))) { $broadcastLists = array(); if ($node->getChild(0) != null) { $childArray = $node->getChildren(); From b25cd16485a4d7b95f947cad117c75d4016a1dcd Mon Sep 17 00:00:00 2001 From: mgp25 Date: Wed, 22 Apr 2015 15:56:25 +0200 Subject: [PATCH 343/436] Update README.md --- README.md | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index b0c14b86..b1900140 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,10 @@ -# WhatsAPI +# Chat API Interface to WhatsApp Messenger -**Read the [wiki](https://github.com/mgp25/WhatsAPI-Official/wiki)** and previous issues before opening a new one! Maybe your issue is already answered. +**Read the [wiki](https://github.com/mgp25/Chat-API/wiki)** and previous issues before opening a new one! Maybe your issue is already answered. -**[WhatsApp incoming updates log](https://github.com/mgp25/WhatsAPI-Official/wiki/WhatsApp-incoming-updates)** +**[WhatsApp incoming updates log](https://github.com/mgp25/Chat-API/wiki/WhatsApp-incoming-updates)** ---------- @@ -16,10 +16,6 @@ Interface to WhatsApp Messenger - [0xTryCatch](https://github.com/0xTryCatch) - [Shirioko](https://github.com/shirioko) -[![Paypal](https://www.paypalobjects.com/en_US/i/btn/btn_donate_SM.gif)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=KN6L7WMU7VM56) - -**Bitcoin:** 15NejBDahfe1eLAPSJh4iMfYLHYuKDrwJ2 - ### Update October 7th, 2014 From 75ca40d48caa73da01cd7fe26ab807d33f3dd86e Mon Sep 17 00:00:00 2001 From: mgp25 Date: Wed, 22 Apr 2015 18:23:30 +0200 Subject: [PATCH 344/436] Fixes #627 #628 --- src/whatsprot.class.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index 9461b4d3..c27380c2 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -62,6 +62,7 @@ class WhatsProt protected $writer; // An instance of the BinaryTreeNodeWriter class. protected $messageStore; protected $nodeId = array(); + protected $loginTime; public $reader; // An instance of the BinaryTreeNodeReader class. /** @@ -2043,7 +2044,7 @@ protected function createMsgId() $msgid = $this->messageCounter; $this->messageCounter++; - return $msgid; + return $this->loginTime . "-" . $msgid; } /** @@ -2205,6 +2206,7 @@ protected function doLogin() $this->phoneNumber )); $this->sendAvailableForChat(); + $this->loginTime = time(); return true; } From 192809dc575a6e71cda942ae763d258cedca1fe8 Mon Sep 17 00:00:00 2001 From: mgp25 Date: Wed, 22 Apr 2015 22:37:56 +0200 Subject: [PATCH 345/436] Update composer --- composer.json | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/composer.json b/composer.json index 12ad72f4..1ec01af1 100644 --- a/composer.json +++ b/composer.json @@ -9,14 +9,14 @@ "authors": [ { "role": "Contributors", - "name": "WhatsAPI Official Contributing Team", - "homepage": "https://github.com/mgp25/WhatsAPI-Official/graphs/contributors" + "name": "Chat API Contributing Team", + "homepage": "https://github.com/mgp25/Chat-API/graphs/contributors" } ], "support": { - "issues": "https://github.com/mgp25/WhatsAPI-Official/issues", - "wiki": "https://github.com/mgp25/WhatsAPI-Official/wiki", - "source": "https://github.com/mgp25/WhatsAPI-Official" + "issues": "https://github.com/mgp25/Chat-API/issues", + "wiki": "https://github.com/mgp25/Chat-API/wiki", + "source": "https://github.com/mgp25/Chat-API" }, "autoload": { "classmap": [ From 2e4769197992c97b5596ad1d73532831f89cf3d6 Mon Sep 17 00:00:00 2001 From: mgp25 Date: Wed, 22 Apr 2015 22:42:39 +0200 Subject: [PATCH 346/436] Fixes #630 --- src/whatsprot.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index c27380c2..49e30d70 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -2936,7 +2936,7 @@ protected function processInboundDataNode(ProtocolNode $node, $autoReceipt = tru if ($node->getTag() == "iq" && $node->getAttribute('type') == "result") { if ($node->getChild("query") != null) { - if ($this->nodeId['privacy'] == $node->getAttribute('id')) { + if (isset($this->nodeId['privacy']) && ($this->nodeId['privacy'] == $node->getAttribute('id'))) { $listChild = $node->getChild(0)->getChild(0); foreach ($listChild->getChildren() as $child) { $blockedJids[] = $child->getAttribute('value'); From d3e7b28c2f64df18797f423b506f5376a8bae9a3 Mon Sep 17 00:00:00 2001 From: mgp25 Date: Thu, 30 Apr 2015 01:43:13 +0200 Subject: [PATCH 347/436] Update exampleFunctional.php --- examples/exampleFunctional.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/exampleFunctional.php b/examples/exampleFunctional.php index 92d1f797..e09f237b 100755 --- a/examples/exampleFunctional.php +++ b/examples/exampleFunctional.php @@ -37,11 +37,11 @@ function onGetProfilePicture($from, $target, $type, $data) $filename = $target . ".jpg"; } - $filename = WhatsProt::PICTURES_FOLDER. "/" . $filename; + $filename = Constants::PICTURES_FOLDER. "/" . $filename; file_put_contents($filename, $data); - echo "- Profile picture saved in " . WhatsProt::PICTURES_FOLDER. "/" . $filename . "\n"; + echo "- Profile picture saved in " . Constants::PICTURES_FOLDER. "/" . $filename . "\n"; } function onPresenceReceived($username, $from, $type) From 7b4ea36031e76961c6183421181d2bd1a2f4ab9e Mon Sep 17 00:00:00 2001 From: mgp25 Date: Thu, 30 Apr 2015 13:39:07 +0200 Subject: [PATCH 348/436] update exampleFunctional --- examples/exampleFunctional.php | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/examples/exampleFunctional.php b/examples/exampleFunctional.php index e09f237b..bf36bfb2 100755 --- a/examples/exampleFunctional.php +++ b/examples/exampleFunctional.php @@ -44,11 +44,16 @@ function onGetProfilePicture($from, $target, $type, $data) echo "- Profile picture saved in " . Constants::PICTURES_FOLDER. "/" . $filename . "\n"; } -function onPresenceReceived($username, $from, $type) +function onPresenceAvailable($username, $from) { - printf("<%s is %s>\n\n", - str_replace(array("@s.whatsapp.net","@g.us"), "", $from), - ($type == 'available') ? 'online' : 'offline'); + $dFrom = str_replace(array("@s.whatsapp.net","@g.us"), "", $from); + echo "<$dFrom is online>\n\n"; +} + +function onPresenceUnavailable($username, $from, $last) +{ + $dFrom = str_replace(array("@s.whatsapp.net","@g.us"), "", $from); + echo "<$dFrom is offline>\n\n"; } echo "[] Logging in as '$nickname' ($username)\n"; @@ -66,7 +71,8 @@ function onPresenceReceived($username, $from, $type) //Print when the user goes online/offline (you need to bind a function to the event onPressence //so the script knows what to do) -$w->eventManager()->bind("onPresence", "onPresenceReceived"); +$w->eventManager()->bind("onPresenceAvailable", "onPresenceAvailable"); +$w->eventManager()->bind("onPresenceUnavailable", "onPresenceUnavailable"); echo "[*] Connected to WhatsApp\n\n"; From 38bbbb4e67b6433b6ab2991792632cf6447a80bb Mon Sep 17 00:00:00 2001 From: ducch Date: Fri, 1 May 2015 11:19:41 +0300 Subject: [PATCH 349/436] fix warnings --- src/whatsprot.class.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index 49e30d70..ff9aaa9c 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -2992,7 +2992,7 @@ protected function processInboundDataNode(ProtocolNode $node, $autoReceipt = tru $groupNodes[] = $child; } } - if ($this->nodeId['groupcreate'] == $node->getAttribute('id')) { + if (isset($this->nodeId['groupcreate']) && ($this->nodeId['groupcreate'] == $node->getAttribute('id'))) { $this->groupId = $node->getChild(0)->getAttribute('id'); $this->eventManager()->fire("onGroupsChatCreate", array( @@ -3000,7 +3000,7 @@ protected function processInboundDataNode(ProtocolNode $node, $autoReceipt = tru $this->groupId )); } - if ($this->nodeId['leavegroup'] == $node->getAttribute('id')) { + if (isset($this->nodeId['leavegroup']) && ($this->nodeId['leavegroup'] == $node->getAttribute('id'))) { $this->groupId = $node->getChild(0)->getChild(0)->getAttribute('id'); $this->eventManager()->fire("onGroupsChatEnd", array( @@ -3008,7 +3008,7 @@ protected function processInboundDataNode(ProtocolNode $node, $autoReceipt = tru $this->groupId )); } - if ($this->nodeId['getgroups'] == $node->getAttribute('id')) { + if (isset($this->nodeId['getgroups']) && ($this->nodeId['getgroups'] == $node->getAttribute('id'))) { $this->eventManager()->fire("onGetGroups", array( $this->phoneNumber, @@ -3022,7 +3022,7 @@ protected function processInboundDataNode(ProtocolNode $node, $autoReceipt = tru } } - if ($this->nodeId['get_groupv2_info'] == $node->getAttribute('id')) { + if (isset($this->nodeId['get_groupv2_info']) && ($this->nodeId['get_groupv2_info'] == $node->getAttribute('id'))) { $groupChild = $node->getChild(0); if ($groupChild != null) { $this->handleGroupV2InfoResponse($groupChild); From 07d28e15ce1a41793556230f61441d9705119d20 Mon Sep 17 00:00:00 2001 From: mgp25 Date: Fri, 1 May 2015 13:37:37 +0200 Subject: [PATCH 350/436] Fixes ack issues --- src/whatsprot.class.php | 23 +++++++---------------- 1 file changed, 7 insertions(+), 16 deletions(-) diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index ff9aaa9c..dcb9df27 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -1509,8 +1509,7 @@ public function sendMessageRead($to, $id) array( "type" => "read", "to" => $to, - "id" => $id, - "t" => time() + "id" => $id ), null, null); $this->sendNode($messageNode); @@ -2579,15 +2578,7 @@ protected function processInboundDataNode(ProtocolNode $node, $autoReceipt = tru $node->getAttribute('participant') )); - $ackNode = new ProtocolNode("ack", - array( - "to" => $node->getAttribute('from'), - "id" => $node->getAttribute('id'), - "type" => $type, - "t" => time() - ), null, null); - - $this->sendNode($ackNode); + $this->sendAck($node, 'receipt'); } if ($node->getTag() == "message") { array_push($this->messageQueue, $node); @@ -3283,7 +3274,7 @@ protected function processInboundDataNode(ProtocolNode $node, $autoReceipt = tru default: throw new Exception("Method $type not implemented"); } - $this->sendNotificationAck($node); + $this->sendAck($node, 'notification'); } if ($node->getTag() == "ib") { @@ -3323,7 +3314,7 @@ protected function processInboundDataNode(ProtocolNode $node, $autoReceipt = tru /** * @param $node ProtocolNode */ - protected function sendNotificationAck($node) + protected function sendAck($node, $class) { $from = $node->getAttribute("from"); $to = $node->getAttribute("to"); @@ -3337,9 +3328,10 @@ protected function sendNotificationAck($node) if ($participant) $attributes["participant"] = $participant; $attributes["to"] = $from; - $attributes["class"] = "notification"; + $attributes["class"] = $class; $attributes["id"] = $id; - $attributes["type"] = $type; + if ($type != null) + $attributes["type"] = $type; $ack = new ProtocolNode("ack", $attributes, null, null); @@ -3784,7 +3776,6 @@ protected function sendMessageReceived($msg, $type = "read", $participant = null } $messageHash["to"] = $msg->getAttribute("from"); $messageHash["id"] = $msg->getAttribute("id"); - $messageHash["t"] = time(); $messageNode = new ProtocolNode("receipt", $messageHash, null, null); $this->sendNode($messageNode); From a4be381516fdad8f34f07f962d61412c5d4ef3c7 Mon Sep 17 00:00:00 2001 From: mgp25 Date: Fri, 1 May 2015 14:18:34 +0200 Subject: [PATCH 351/436] Parsing emojis not required --- src/func.php | 3155 --------------------------------------- src/whatsprot.class.php | 59 - 2 files changed, 3214 deletions(-) diff --git a/src/func.php b/src/func.php index b6c5311e..4e323e02 100755 --- a/src/func.php +++ b/src/func.php @@ -1,31 +1,4 @@ - * this will show the smiling face, require emojisprite.css and emojisprite.png - * - * Otherwise, if it is "false", return an id. Example, ##1F604##. - * - * @return string - */ -function ParseMessageInboundForEmojis($txt, $span = true) -{ - $Emojis = ArrayEmojis(); - foreach ($Emojis as $Emoji) { - $txt = str_replace( - array($Emoji['iOS2'], $Emoji['iOS5'], $Emoji['iOS7']), - (($span == true) ? '##' . $Emoji['Hex'] . '##' : '##' . $Emoji['Hex'] . '##'), - $txt - ); - } - return $txt; -} /** * This function extracts the phone number. @@ -238,3131 +211,3 @@ function get_mime($file) return false; } - -//Generate Array of Emojis iOS2, iOS5 and iOS7 -function ArrayEmojis() -{ - return array( - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ˜„', - 'iOS7' => '', - 'Hex' => '1F604' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ˜ƒ', - 'iOS7' => '', - 'Hex' => '1F603' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿ˜€', 'iOS7' => '', 'Hex' => '1F600'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ˜Š', - 'iOS7' => '', - 'Hex' => '1F60A' - ), - array( - 'iOS2' => '', - 'iOS5' => 'โ˜บ', - 'iOS7' => 'โ˜บ๏ธ', - 'Hex' => '263A' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ˜‰', - 'iOS7' => '', - 'Hex' => '1F609' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ˜', - 'iOS7' => '', - 'Hex' => '1F60D' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ˜˜', - 'iOS7' => '', - 'Hex' => '1F618' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ˜š', - 'iOS7' => '', - 'Hex' => '1F61A' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿ˜—', 'iOS7' => '', 'Hex' => '1F617'), - array('iOS2' => '', 'iOS5' => '๐Ÿ˜™', 'iOS7' => '', 'Hex' => '1F619'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ˜œ', - 'iOS7' => '', - 'Hex' => '1F61C' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ˜', - 'iOS7' => '', - 'Hex' => '1F61D' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿ˜›', 'iOS7' => '', 'Hex' => '1F61B'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ˜ณ', - 'iOS7' => '', - 'Hex' => '1F633' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ˜', - 'iOS7' => '', - 'Hex' => '1F601' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ˜”', - 'iOS7' => '', - 'Hex' => '1F614' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ˜Œ', - 'iOS7' => '', - 'Hex' => '1F60C' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ˜’', - 'iOS7' => '', - 'Hex' => '1F612' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ˜ž', - 'iOS7' => '', - 'Hex' => '1F61E' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ˜ฃ', - 'iOS7' => '', - 'Hex' => '1F623' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ˜ข', - 'iOS7' => '', - 'Hex' => '1F622' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ˜‚', - 'iOS7' => '', - 'Hex' => '1F602' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ˜ญ', - 'iOS7' => '', - 'Hex' => '1F62D' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ˜ช', - 'iOS7' => '', - 'Hex' => '1F62A' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ˜ฅ', - 'iOS7' => '', - 'Hex' => '1F625' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ˜ฐ', - 'iOS7' => '', - 'Hex' => '1F630' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿ˜…', 'iOS7' => '', 'Hex' => '1F605'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ˜“', - 'iOS7' => '', - 'Hex' => '1F613' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿ˜ฉ', 'iOS7' => '', 'Hex' => '1F629'), - array('iOS2' => '', 'iOS5' => '๐Ÿ˜ซ', 'iOS7' => '', 'Hex' => '1F62B'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ˜จ', - 'iOS7' => '', - 'Hex' => '1F628' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ˜ฑ', - 'iOS7' => '', - 'Hex' => '1F631' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ˜ ', - 'iOS7' => '', - 'Hex' => '1F620' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ˜ก', - 'iOS7' => '', - 'Hex' => '1F621' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿ˜ค', 'iOS7' => '', 'Hex' => '1F624'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ˜–', - 'iOS7' => '', - 'Hex' => '1F616' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿ˜†', 'iOS7' => '', 'Hex' => '1F606'), - array('iOS2' => '', 'iOS5' => '๐Ÿ˜‹', 'iOS7' => '', 'Hex' => '1F60B'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ˜ท', - 'iOS7' => '', - 'Hex' => '1F637' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿ˜Ž', 'iOS7' => '', 'Hex' => '1F60E'), - array('iOS2' => '', 'iOS5' => '๐Ÿ˜ด', 'iOS7' => '', 'Hex' => '1F634'), - array('iOS2' => '', 'iOS5' => '๐Ÿ˜ต', 'iOS7' => '', 'Hex' => '1F635'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ˜ฒ', - 'iOS7' => '', - 'Hex' => '1F632' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿ˜Ÿ', 'iOS7' => '', 'Hex' => '1F61F'), - array('iOS2' => '', 'iOS5' => '๐Ÿ˜ฆ', 'iOS7' => '', 'Hex' => '1F626'), - array('iOS2' => '', 'iOS5' => '๐Ÿ˜ง', 'iOS7' => '', 'Hex' => '1F627'), - array('iOS2' => '', 'iOS5' => '๐Ÿ˜ˆ', 'iOS7' => '', 'Hex' => '1F608'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ‘ฟ', - 'iOS7' => '', - 'Hex' => '1F47F' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿ˜ฎ', 'iOS7' => '', 'Hex' => '1F62E'), - array('iOS2' => '', 'iOS5' => '๐Ÿ˜ฌ', 'iOS7' => '', 'Hex' => '1F62C'), - array('iOS2' => '', 'iOS5' => '๐Ÿ˜', 'iOS7' => '', 'Hex' => '1F610'), - array('iOS2' => '', 'iOS5' => '๐Ÿ˜•', 'iOS7' => '', 'Hex' => '1F615'), - array('iOS2' => '', 'iOS5' => '๐Ÿ˜ฏ', 'iOS7' => '', 'Hex' => '1F62F'), - array('iOS2' => '', 'iOS5' => '๐Ÿ˜ถ', 'iOS7' => '', 'Hex' => '1F636'), - array('iOS2' => '', 'iOS5' => '๐Ÿ˜‡', 'iOS7' => '', 'Hex' => '1F607'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ˜', - 'iOS7' => '', - 'Hex' => '1F60F' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿ˜‘', 'iOS7' => '', 'Hex' => '1F611'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ‘ฒ', - 'iOS7' => '', - 'Hex' => '1F472' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ‘ณ', - 'iOS7' => '', - 'Hex' => '1F473' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ‘ฎ', - 'iOS7' => '', - 'Hex' => '1F46E' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ‘ท', - 'iOS7' => '', - 'Hex' => '1F477' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ’‚', - 'iOS7' => '', - 'Hex' => '1F482' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ‘ถ', - 'iOS7' => '', - 'Hex' => '1F476' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ‘ฆ', - 'iOS7' => '', - 'Hex' => '1F466' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ‘ง', - 'iOS7' => '', - 'Hex' => '1F467' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ‘จ', - 'iOS7' => '', - 'Hex' => '1F468' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ‘ฉ', - 'iOS7' => '', - 'Hex' => '1F469' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ‘ด', - 'iOS7' => '', - 'Hex' => '1F474' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ‘ต', - 'iOS7' => '', - 'Hex' => '1F475' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ‘ฑ', - 'iOS7' => '', - 'Hex' => '1F471' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ‘ผ', - 'iOS7' => '', - 'Hex' => '1F47C' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ‘ธ', - 'iOS7' => '', - 'Hex' => '1F478' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿ˜บ', 'iOS7' => '', 'Hex' => '1F63A'), - array('iOS2' => '', 'iOS5' => '๐Ÿ˜ธ', 'iOS7' => '', 'Hex' => '1F638'), - array('iOS2' => '', 'iOS5' => '๐Ÿ˜ป', 'iOS7' => '', 'Hex' => '1F63B'), - array('iOS2' => '', 'iOS5' => '๐Ÿ˜ฝ', 'iOS7' => '', 'Hex' => '1F63D'), - array('iOS2' => '', 'iOS5' => '๐Ÿ˜ผ', 'iOS7' => '', 'Hex' => '1F63C'), - array('iOS2' => '', 'iOS5' => '๐Ÿ™€', 'iOS7' => '', 'Hex' => '1F640'), - array('iOS2' => '', 'iOS5' => '๐Ÿ˜ฟ', 'iOS7' => '', 'Hex' => '1F63F'), - array('iOS2' => '', 'iOS5' => '๐Ÿ˜น', 'iOS7' => '', 'Hex' => '1F639'), - array('iOS2' => '', 'iOS5' => '๐Ÿ˜พ', 'iOS7' => '', 'Hex' => '1F63E'), - array('iOS2' => '', 'iOS5' => '๐Ÿ‘น', 'iOS7' => '', 'Hex' => '1F479'), - array('iOS2' => '', 'iOS5' => '๐Ÿ‘บ', 'iOS7' => '', 'Hex' => '1F47A'), - array('iOS2' => '', 'iOS5' => '๐Ÿ™ˆ', 'iOS7' => '', 'Hex' => '1F648'), - array('iOS2' => '', 'iOS5' => '๐Ÿ™‰', 'iOS7' => '', 'Hex' => '1F649'), - array('iOS2' => '', 'iOS5' => '๐Ÿ™Š', 'iOS7' => '', 'Hex' => '1F64A'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ’€', - 'iOS7' => '', - 'Hex' => '1F480' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ‘ฝ', - 'iOS7' => '', - 'Hex' => '1F47D' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ’ฉ', - 'iOS7' => '', - 'Hex' => '1F4A9' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ”ฅ', - 'iOS7' => '', - 'Hex' => '1F525' - ), - array('iOS2' => '', 'iOS5' => 'โœจ', 'iOS7' => '', 'Hex' => '2728'), - array( - 'iOS2' => '', - 'iOS5' => '๐ŸŒŸ', - 'iOS7' => '', - 'Hex' => '1F31F' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿ’ซ', 'iOS7' => '', 'Hex' => '1F4AB'), - array('iOS2' => '', 'iOS5' => '๐Ÿ’ฅ', 'iOS7' => '', 'Hex' => '1F4A5'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ’ข', - 'iOS7' => '', - 'Hex' => '1F4A2' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ’ฆ', - 'iOS7' => '', - 'Hex' => '1F4A6' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿ’ง', 'iOS7' => '', 'Hex' => '1F4A7'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ’ค', - 'iOS7' => '', - 'Hex' => '1F4A4' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ’จ', - 'iOS7' => '', - 'Hex' => '1F4A8' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ‘‚', - 'iOS7' => '', - 'Hex' => '1F442' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ‘€', - 'iOS7' => '', - 'Hex' => '1F440' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ‘ƒ', - 'iOS7' => '', - 'Hex' => '1F443' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿ‘…', 'iOS7' => '', 'Hex' => '1F445'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ‘„', - 'iOS7' => '', - 'Hex' => '1F444' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ‘', - 'iOS7' => '', - 'Hex' => '1F44D' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ‘Ž', - 'iOS7' => '', - 'Hex' => '1F44E' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ‘Œ', - 'iOS7' => '', - 'Hex' => '1F44C' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ‘Š', - 'iOS7' => '', - 'Hex' => '1F44A' - ), - array('iOS2' => '', 'iOS5' => 'โœŠ', 'iOS7' => '', 'Hex' => '270A'), - array( - 'iOS2' => '', - 'iOS5' => 'โœŒ', - 'iOS7' => 'โœŒ๏ธ', - 'Hex' => '270C' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ‘‹', - 'iOS7' => '', - 'Hex' => '1F44B' - ), - array('iOS2' => '', 'iOS5' => 'โœ‹', 'iOS7' => '', 'Hex' => '270B'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ‘', - 'iOS7' => '', - 'Hex' => '1F450' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ‘†', - 'iOS7' => '', - 'Hex' => '1F446' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ‘‡', - 'iOS7' => '', - 'Hex' => '1F447' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ‘‰', - 'iOS7' => '', - 'Hex' => '1F449' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ‘ˆ', - 'iOS7' => '', - 'Hex' => '1F448' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ™Œ', - 'iOS7' => '', - 'Hex' => '1F64C' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ™', - 'iOS7' => '', - 'Hex' => '1F64F' - ), - array( - 'iOS2' => '', - 'iOS5' => 'โ˜', - 'iOS7' => 'โ˜๏ธ', - 'Hex' => '261D' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ‘', - 'iOS7' => '', - 'Hex' => '1F44F' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ’ช', - 'iOS7' => '', - 'Hex' => '1F4AA' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿšถ', - 'iOS7' => '', - 'Hex' => '1F6B6' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿƒ', - 'iOS7' => '', - 'Hex' => '1F3C3' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ’ƒ', - 'iOS7' => '', - 'Hex' => '1F483' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ‘ซ', - 'iOS7' => '', - 'Hex' => '1F46B' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿ‘ช', 'iOS7' => '', 'Hex' => '1F46A'), - array('iOS2' => '', 'iOS5' => '๐Ÿ‘ฌ', 'iOS7' => '', 'Hex' => '1F46C'), - array('iOS2' => '', 'iOS5' => '๐Ÿ‘ญ', 'iOS7' => '', 'Hex' => '1F46D'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ’', - 'iOS7' => '', - 'Hex' => '1F48F' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ’‘', - 'iOS7' => '', - 'Hex' => '1F491' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ‘ฏ', - 'iOS7' => '', - 'Hex' => '1F46F' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ™†', - 'iOS7' => '', - 'Hex' => '1F646' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ™…', - 'iOS7' => '', - 'Hex' => '1F645' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ’', - 'iOS7' => '', - 'Hex' => '1F481' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿ™‹', 'iOS7' => '', 'Hex' => '1F64B'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ’†', - 'iOS7' => '', - 'Hex' => '1F486' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ’‡', - 'iOS7' => '', - 'Hex' => '1F487' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ’…', - 'iOS7' => '', - 'Hex' => '1F485' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿ‘ฐ', 'iOS7' => '', 'Hex' => '1F470'), - array('iOS2' => '', 'iOS5' => '๐Ÿ™Ž', 'iOS7' => '', 'Hex' => '1F64E'), - array('iOS2' => '', 'iOS5' => '๐Ÿ™', 'iOS7' => '', 'Hex' => '1F64D'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ™‡', - 'iOS7' => '', - 'Hex' => '1F647' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐ŸŽฉ', - 'iOS7' => '', - 'Hex' => '1F3A9' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ‘‘', - 'iOS7' => '', - 'Hex' => '1F451' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ‘’', - 'iOS7' => '', - 'Hex' => '1F452' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ‘Ÿ', - 'iOS7' => '', - 'Hex' => '1F45F' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿ‘ž', 'iOS7' => '', 'Hex' => '1F45E'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ‘ก', - 'iOS7' => '', - 'Hex' => '1F461' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ‘ ', - 'iOS7' => '', - 'Hex' => '1F460' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ‘ข', - 'iOS7' => '', - 'Hex' => '1F462' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ‘•', - 'iOS7' => '', - 'Hex' => '1F455' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ‘”', - 'iOS7' => '', - 'Hex' => '1F454' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿ‘š', 'iOS7' => '', 'Hex' => '1F45A'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ‘—', - 'iOS7' => '', - 'Hex' => '1F457' - ), - array('iOS2' => '', 'iOS5' => '๐ŸŽฝ', 'iOS7' => '', 'Hex' => '1F3BD'), - array('iOS2' => '', 'iOS5' => '๐Ÿ‘–', 'iOS7' => '', 'Hex' => '1F456'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ‘˜', - 'iOS7' => '', - 'Hex' => '1F458' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ‘™', - 'iOS7' => '', - 'Hex' => '1F459' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ’ผ', - 'iOS7' => '', - 'Hex' => '1F4BC' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ‘œ', - 'iOS7' => '', - 'Hex' => '1F45C' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿ‘', 'iOS7' => '', 'Hex' => '1F45D'), - array('iOS2' => '', 'iOS5' => '๐Ÿ‘›', 'iOS7' => '', 'Hex' => '1F45B'), - array('iOS2' => '', 'iOS5' => '๐Ÿ‘“', 'iOS7' => '', 'Hex' => '1F453'), - array( - 'iOS2' => '', - 'iOS5' => '๐ŸŽ€', - 'iOS7' => '', - 'Hex' => '1F380' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐ŸŒ‚', - 'iOS7' => '', - 'Hex' => '1F302' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ’„', - 'iOS7' => '', - 'Hex' => '1F484' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ’›', - 'iOS7' => '', - 'Hex' => '1F49B' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ’™', - 'iOS7' => '', - 'Hex' => '1F499' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ’œ', - 'iOS7' => '', - 'Hex' => '1F49C' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ’š', - 'iOS7' => '', - 'Hex' => '1F49A' - ), - array( - 'iOS2' => '', - 'iOS5' => 'โค', - 'iOS7' => 'โค๏ธ', - 'Hex' => '2764' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ’”', - 'iOS7' => '', - 'Hex' => '1F494' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ’—', - 'iOS7' => '', - 'Hex' => '1F497' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ’“', - 'iOS7' => '', - 'Hex' => '1F493' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿ’•', 'iOS7' => '', 'Hex' => '1F495'), - array('iOS2' => '', 'iOS5' => '๐Ÿ’–', 'iOS7' => '', 'Hex' => '1F496'), - array('iOS2' => '', 'iOS5' => '๐Ÿ’ž', 'iOS7' => '', 'Hex' => '1F49E'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ’˜', - 'iOS7' => '', - 'Hex' => '1F498' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿ’Œ', 'iOS7' => '', 'Hex' => '1F48C'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ’‹', - 'iOS7' => '', - 'Hex' => '1F48B' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ’', - 'iOS7' => '', - 'Hex' => '1F48D' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ’Ž', - 'iOS7' => '', - 'Hex' => '1F48E' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿ‘ค', 'iOS7' => '', 'Hex' => '1F464'), - array('iOS2' => '', 'iOS5' => '๐Ÿ‘ฅ', 'iOS7' => '', 'Hex' => '1F465'), - array('iOS2' => '', 'iOS5' => '๐Ÿ’ฌ', 'iOS7' => '', 'Hex' => '1F4AC'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ‘ฃ', - 'iOS7' => '', - 'Hex' => '1F463' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿ’ญ', 'iOS7' => '', 'Hex' => '1F4AD'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ ', - 'iOS7' => '', - 'Hex' => '1F3E0' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿก', 'iOS7' => '', 'Hex' => '1F3E1'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿซ', - 'iOS7' => '', - 'Hex' => '1F3EB' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿข', - 'iOS7' => '', - 'Hex' => '1F3E2' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿฃ', - 'iOS7' => '', - 'Hex' => '1F3E3' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿฅ', - 'iOS7' => '', - 'Hex' => '1F3E5' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿฆ', - 'iOS7' => '', - 'Hex' => '1F3E6' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿช', - 'iOS7' => '', - 'Hex' => '1F3EA' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿฉ', - 'iOS7' => '', - 'Hex' => '1F3E9' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿจ', - 'iOS7' => '', - 'Hex' => '1F3E8' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ’’', - 'iOS7' => '', - 'Hex' => '1F492' - ), - array( - 'iOS2' => '', - 'iOS5' => 'โ›ช', - 'iOS7' => 'โ›ช๏ธ', - 'Hex' => '26EA' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿฌ', - 'iOS7' => '', - 'Hex' => '1F3EC' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿค', 'iOS7' => '', 'Hex' => '1F3E4'), - array( - 'iOS2' => '', - 'iOS5' => '๐ŸŒ‡', - 'iOS7' => '', - 'Hex' => '1F307' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐ŸŒ†', - 'iOS7' => '', - 'Hex' => '1F306' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿฏ', - 'iOS7' => '', - 'Hex' => '1F3EF' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿฐ', - 'iOS7' => '', - 'Hex' => '1F3F0' - ), - array( - 'iOS2' => '', - 'iOS5' => 'โ›บ', - 'iOS7' => 'โ›บ๏ธ', - 'Hex' => '26FA' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿญ', - 'iOS7' => '', - 'Hex' => '1F3ED' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ—ผ', - 'iOS7' => '', - 'Hex' => '1F5FC' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿ—พ', 'iOS7' => '', 'Hex' => '1F5FE'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ—ป', - 'iOS7' => '', - 'Hex' => '1F5FB' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐ŸŒ„', - 'iOS7' => '', - 'Hex' => '1F304' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐ŸŒ…', - 'iOS7' => '', - 'Hex' => '1F305' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐ŸŒƒ', - 'iOS7' => '', - 'Hex' => '1F303' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ—ฝ', - 'iOS7' => '', - 'Hex' => '1F5FD' - ), - array('iOS2' => '', 'iOS5' => '๐ŸŒ‰', 'iOS7' => '', 'Hex' => '1F309'), - array('iOS2' => '', 'iOS5' => '๐ŸŽ ', 'iOS7' => '', 'Hex' => '1F3A0'), - array( - 'iOS2' => '', - 'iOS5' => '๐ŸŽก', - 'iOS7' => '', - 'Hex' => '1F3A1' - ), - array( - 'iOS2' => '', - 'iOS5' => 'โ›ฒ', - 'iOS7' => 'โ›ฒ๏ธ', - 'Hex' => '26F2' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐ŸŽข', - 'iOS7' => '', - 'Hex' => '1F3A2' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿšข', - 'iOS7' => '', - 'Hex' => '1F6A2' - ), - array( - 'iOS2' => '', - 'iOS5' => 'โ›ต', - 'iOS7' => 'โ›ต๏ธ', - 'Hex' => '26F5' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿšค', - 'iOS7' => '', - 'Hex' => '1F6A4' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿšฃ', 'iOS7' => '', 'Hex' => '1F6A3'), - array('iOS2' => '', 'iOS5' => 'โš“', 'iOS7' => 'โš“๏ธ', 'Hex' => '2693'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿš€', - 'iOS7' => '', - 'Hex' => '1F680' - ), - array( - 'iOS2' => '', - 'iOS5' => 'โœˆ', - 'iOS7' => 'โœˆ๏ธ', - 'Hex' => '2708' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ’บ', - 'iOS7' => '', - 'Hex' => '1F4BA' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿš', 'iOS7' => '', 'Hex' => '1F681'), - array('iOS2' => '', 'iOS5' => '๐Ÿš‚', 'iOS7' => '', 'Hex' => '1F682'), - array('iOS2' => '', 'iOS5' => '๐ŸšŠ', 'iOS7' => '', 'Hex' => '1F68A'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿš‰', - 'iOS7' => '', - 'Hex' => '1F689' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿšž', 'iOS7' => '', 'Hex' => '1F69E'), - array('iOS2' => '', 'iOS5' => '๐Ÿš†', 'iOS7' => '', 'Hex' => '1F686'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿš„', - 'iOS7' => '', - 'Hex' => '1F684' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿš…', - 'iOS7' => '', - 'Hex' => '1F685' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿšˆ', 'iOS7' => '', 'Hex' => '1F688'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿš‡', - 'iOS7' => '', - 'Hex' => '1F687' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿš', 'iOS7' => '', 'Hex' => '1F69D'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿš‹', - 'iOS7' => '', - 'Hex' => '1F68B' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿšƒ', 'iOS7' => '', 'Hex' => '1F683'), - array('iOS2' => '', 'iOS5' => '๐ŸšŽ', 'iOS7' => '', 'Hex' => '1F68E'), - array( - 'iOS2' => '', - 'iOS5' => '๐ŸšŒ', - 'iOS7' => '', - 'Hex' => '1F68C' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿš', 'iOS7' => '', 'Hex' => '1F68D'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿš™', - 'iOS7' => '', - 'Hex' => '1F699' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿš˜', 'iOS7' => '', 'Hex' => '1F698'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿš—', - 'iOS7' => '', - 'Hex' => '1F697' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿš•', - 'iOS7' => '', - 'Hex' => '1F695' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿš–', 'iOS7' => '', 'Hex' => '1F696'), - array('iOS2' => '', 'iOS5' => '๐Ÿš›', 'iOS7' => '', 'Hex' => '1F69B'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿšš', - 'iOS7' => '', - 'Hex' => '1F69A' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿšจ', 'iOS7' => '', 'Hex' => '1F6A8'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿš“', - 'iOS7' => '', - 'Hex' => '1F693' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿš”', 'iOS7' => '', 'Hex' => '1F694'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿš’', - 'iOS7' => '', - 'Hex' => '1F692' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿš‘', - 'iOS7' => '', - 'Hex' => '1F691' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿš', 'iOS7' => '', 'Hex' => '1F690'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿšฒ', - 'iOS7' => '', - 'Hex' => '1F6B2' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿšก', 'iOS7' => '', 'Hex' => '1F6A1'), - array('iOS2' => '', 'iOS5' => '๐ŸšŸ', 'iOS7' => '', 'Hex' => '1F69F'), - array('iOS2' => '', 'iOS5' => '๐Ÿš ', 'iOS7' => '', 'Hex' => '1F6A0'), - array('iOS2' => '', 'iOS5' => '๐Ÿšœ', 'iOS7' => '', 'Hex' => '1F69C'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ’ˆ', - 'iOS7' => '', - 'Hex' => '1F488' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿš', - 'iOS7' => '', - 'Hex' => '1F68F' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐ŸŽซ', - 'iOS7' => '', - 'Hex' => '1F3AB' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿšฆ', 'iOS7' => '', 'Hex' => '1F6A6'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿšฅ', - 'iOS7' => '', - 'Hex' => '1F6A5' - ), - array( - 'iOS2' => '', - 'iOS5' => 'โš ', - 'iOS7' => 'โš ๏ธ', - 'Hex' => '26A0' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿšง', - 'iOS7' => '', - 'Hex' => '1F6A7' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ”ฐ', - 'iOS7' => '', - 'Hex' => '1F530' - ), - array( - 'iOS2' => '', - 'iOS5' => 'โ›ฝ', - 'iOS7' => 'โ›ฝ๏ธ', - 'Hex' => '26FD' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿฎ', 'iOS7' => '', 'Hex' => '1F3EE'), - array( - 'iOS2' => '', - 'iOS5' => '๐ŸŽฐ', - 'iOS7' => '', - 'Hex' => '1F3B0' - ), - array( - 'iOS2' => '', - 'iOS5' => 'โ™จ', - 'iOS7' => 'โ™จ๏ธ', - 'Hex' => '2668' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿ—ฟ', 'iOS7' => '', 'Hex' => '1F5FF'), - array('iOS2' => '', 'iOS5' => '๐ŸŽช', 'iOS7' => '', 'Hex' => '1F3AA'), - array('iOS2' => '', 'iOS5' => '๐ŸŽญ', 'iOS7' => '', 'Hex' => '1F3AD'), - array('iOS2' => '', 'iOS5' => '๐Ÿ“', 'iOS7' => '', 'Hex' => '1F4CD'), - array('iOS2' => '', 'iOS5' => '๐Ÿšฉ', 'iOS7' => '', 'Hex' => '1F6A9'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ‡ฏ๐Ÿ‡ต', - 'iOS7' => '', - 'Hex' => '1F1EF_1F1F5' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ‡ฐ๐Ÿ‡ท', - 'iOS7' => '', - 'Hex' => '1F1F0_1F1F7' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ‡ฉ๐Ÿ‡ช', - 'iOS7' => '', - 'Hex' => '1F1E9_1F1EA' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ‡จ๐Ÿ‡ณ', - 'iOS7' => '', - 'Hex' => '1F1E8_1F1F3' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ‡บ๐Ÿ‡ธ', - 'iOS7' => '', - 'Hex' => '1F1FA_1F1F8' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ‡ซ๐Ÿ‡ท', - 'iOS7' => '', - 'Hex' => '1F1EB_1F1F7' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ‡ช๐Ÿ‡ธ', - 'iOS7' => '', - 'Hex' => '1F1EA_1F1F8' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ‡ฎ๐Ÿ‡น', - 'iOS7' => '', - 'Hex' => '1F1EE_1F1F9' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ‡ท๐Ÿ‡บ', - 'iOS7' => '', - 'Hex' => '1F1F7_1F1FA' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ‡ฌ๐Ÿ‡ง', - 'iOS7' => '', - 'Hex' => '1F1EC_1F1E7' - ), - array( - 'iOS2' => '', - 'iOS5' => '', - 'iOS7' => '', - 'Hex' => '' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿถ', - 'iOS7' => '', - 'Hex' => '1F436' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿบ', - 'iOS7' => '', - 'Hex' => '1F43A' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿฑ', - 'iOS7' => '', - 'Hex' => '1F431' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿญ', - 'iOS7' => '', - 'Hex' => '1F42D' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿน', - 'iOS7' => '', - 'Hex' => '1F439' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿฐ', - 'iOS7' => '', - 'Hex' => '1F430' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿธ', - 'iOS7' => '', - 'Hex' => '1F438' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿฏ', - 'iOS7' => '', - 'Hex' => '1F42F' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿจ', - 'iOS7' => '', - 'Hex' => '1F428' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿป', - 'iOS7' => '', - 'Hex' => '1F43B' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿท', - 'iOS7' => '', - 'Hex' => '1F437' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿฝ', 'iOS7' => '', 'Hex' => '1F43D'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿฎ', - 'iOS7' => '', - 'Hex' => '1F42E' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ—', - 'iOS7' => '', - 'Hex' => '1F417' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿต', - 'iOS7' => '', - 'Hex' => '1F435' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ’', - 'iOS7' => '', - 'Hex' => '1F412' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿด', - 'iOS7' => '', - 'Hex' => '1F434' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ‘', - 'iOS7' => '', - 'Hex' => '1F411' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ˜', - 'iOS7' => '', - 'Hex' => '1F418' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿผ', 'iOS7' => '', 'Hex' => '1F43C'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿง', - 'iOS7' => '', - 'Hex' => '1F427' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿฆ', - 'iOS7' => '', - 'Hex' => '1F426' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿค', - 'iOS7' => '', - 'Hex' => '1F424' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿฅ', 'iOS7' => '', 'Hex' => '1F425'), - array('iOS2' => '', 'iOS5' => '๐Ÿฃ', 'iOS7' => '', 'Hex' => '1F423'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ”', - 'iOS7' => '', - 'Hex' => '1F414' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ', - 'iOS7' => '', - 'Hex' => '1F40D' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿข', 'iOS7' => '', 'Hex' => '1F422'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ›', - 'iOS7' => '', - 'Hex' => '1F41B' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿ', 'iOS7' => '', 'Hex' => '1F41D'), - array('iOS2' => '', 'iOS5' => '๐Ÿœ', 'iOS7' => '', 'Hex' => '1F41C'), - array('iOS2' => '', 'iOS5' => '๐Ÿž', 'iOS7' => '', 'Hex' => '1F41E'), - array('iOS2' => '', 'iOS5' => '๐ŸŒ', 'iOS7' => '', 'Hex' => '1F40C'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ™', - 'iOS7' => '', - 'Hex' => '1F419' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿš', - 'iOS7' => '', - 'Hex' => '1F41A' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ ', - 'iOS7' => '', - 'Hex' => '1F420' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐ŸŸ', - 'iOS7' => '', - 'Hex' => '1F41F' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿฌ', - 'iOS7' => '', - 'Hex' => '1F42C' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿณ', - 'iOS7' => '', - 'Hex' => '1F433' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿ‹', 'iOS7' => '', 'Hex' => '1F40B'), - array('iOS2' => '', 'iOS5' => '๐Ÿ„', 'iOS7' => '', 'Hex' => '1F404'), - array('iOS2' => '', 'iOS5' => '๐Ÿ', 'iOS7' => '', 'Hex' => '1F40F'), - array('iOS2' => '', 'iOS5' => '๐Ÿ€', 'iOS7' => '', 'Hex' => '1F400'), - array('iOS2' => '', 'iOS5' => '๐Ÿƒ', 'iOS7' => '', 'Hex' => '1F403'), - array('iOS2' => '', 'iOS5' => '๐Ÿ…', 'iOS7' => '', 'Hex' => '1F405'), - array('iOS2' => '', 'iOS5' => '๐Ÿ‡', 'iOS7' => '', 'Hex' => '1F407'), - array('iOS2' => '', 'iOS5' => '๐Ÿ‰', 'iOS7' => '', 'Hex' => '1F409'), - array( - 'iOS2' => '', - 'iOS5' => '๐ŸŽ', - 'iOS7' => '', - 'Hex' => '1F40E' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿ', 'iOS7' => '', 'Hex' => '1F410'), - array('iOS2' => '', 'iOS5' => '๐Ÿ“', 'iOS7' => '', 'Hex' => '1F413'), - array('iOS2' => '', 'iOS5' => '๐Ÿ•', 'iOS7' => '', 'Hex' => '1F415'), - array('iOS2' => '', 'iOS5' => '๐Ÿ–', 'iOS7' => '', 'Hex' => '1F416'), - array('iOS2' => '', 'iOS5' => '๐Ÿ', 'iOS7' => '', 'Hex' => '1F401'), - array('iOS2' => '', 'iOS5' => '๐Ÿ‚', 'iOS7' => '', 'Hex' => '1F402'), - array('iOS2' => '', 'iOS5' => '๐Ÿฒ', 'iOS7' => '', 'Hex' => '1F432'), - array('iOS2' => '', 'iOS5' => '๐Ÿก', 'iOS7' => '', 'Hex' => '1F421'), - array('iOS2' => '', 'iOS5' => '๐ŸŠ', 'iOS7' => '', 'Hex' => '1F40A'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿซ', - 'iOS7' => '', - 'Hex' => '1F42B' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿช', 'iOS7' => '', 'Hex' => '1F42A'), - array('iOS2' => '', 'iOS5' => '๐Ÿ†', 'iOS7' => '', 'Hex' => '1F406'), - array('iOS2' => '', 'iOS5' => '๐Ÿˆ', 'iOS7' => '', 'Hex' => '1F408'), - array('iOS2' => '', 'iOS5' => '๐Ÿฉ', 'iOS7' => '', 'Hex' => '1F429'), - array('iOS2' => '', 'iOS5' => '๐Ÿพ', 'iOS7' => '', 'Hex' => '1F43E'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ’', - 'iOS7' => '', - 'Hex' => '1F490' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐ŸŒธ', - 'iOS7' => '', - 'Hex' => '1F338' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐ŸŒท', - 'iOS7' => '', - 'Hex' => '1F337' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ€', - 'iOS7' => '', - 'Hex' => '1F340' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐ŸŒน', - 'iOS7' => '', - 'Hex' => '1F339' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐ŸŒป', - 'iOS7' => '', - 'Hex' => '1F33B' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐ŸŒบ', - 'iOS7' => '', - 'Hex' => '1F33A' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ', - 'iOS7' => '', - 'Hex' => '1F341' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿƒ', - 'iOS7' => '', - 'Hex' => '1F343' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ‚', - 'iOS7' => '', - 'Hex' => '1F342' - ), - array('iOS2' => '', 'iOS5' => '๐ŸŒฟ', 'iOS7' => '', 'Hex' => '1F33F'), - array( - 'iOS2' => '', - 'iOS5' => '๐ŸŒพ', - 'iOS7' => '', - 'Hex' => '1F33E' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿ„', 'iOS7' => '', 'Hex' => '1F344'), - array( - 'iOS2' => '', - 'iOS5' => '๐ŸŒต', - 'iOS7' => '', - 'Hex' => '1F335' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐ŸŒด', - 'iOS7' => '', - 'Hex' => '1F334' - ), - array('iOS2' => '', 'iOS5' => '๐ŸŒฒ', 'iOS7' => '', 'Hex' => '1F332'), - array('iOS2' => '', 'iOS5' => '๐ŸŒณ', 'iOS7' => '', 'Hex' => '1F333'), - array('iOS2' => '', 'iOS5' => '๐ŸŒฐ', 'iOS7' => '', 'Hex' => '1F330'), - array('iOS2' => '', 'iOS5' => '๐ŸŒฑ', 'iOS7' => '', 'Hex' => '1F331'), - array('iOS2' => '', 'iOS5' => '๐ŸŒผ', 'iOS7' => '', 'Hex' => '1F33C'), - array('iOS2' => '', 'iOS5' => '๐ŸŒ', 'iOS7' => '', 'Hex' => '1F310'), - array('iOS2' => '', 'iOS5' => '๐ŸŒž', 'iOS7' => '', 'Hex' => '1F31E'), - array('iOS2' => '', 'iOS5' => '๐ŸŒ', 'iOS7' => '', 'Hex' => '1F31D'), - array('iOS2' => '', 'iOS5' => '๐ŸŒš', 'iOS7' => '', 'Hex' => '1F31A'), - array('iOS2' => '', 'iOS5' => '๐ŸŒ‘', 'iOS7' => '', 'Hex' => '1F311'), - array('iOS2' => '', 'iOS5' => '๐ŸŒ’', 'iOS7' => '', 'Hex' => '1F312'), - array('iOS2' => '', 'iOS5' => '๐ŸŒ“', 'iOS7' => '', 'Hex' => '1F313'), - array('iOS2' => '', 'iOS5' => '๐ŸŒ”', 'iOS7' => '', 'Hex' => '1F314'), - array('iOS2' => '', 'iOS5' => '๐ŸŒ•', 'iOS7' => '', 'Hex' => '1F315'), - array('iOS2' => '', 'iOS5' => '๐ŸŒ–', 'iOS7' => '', 'Hex' => '1F316'), - array('iOS2' => '', 'iOS5' => '๐ŸŒ—', 'iOS7' => '', 'Hex' => '1F317'), - array('iOS2' => '', 'iOS5' => '๐ŸŒ˜', 'iOS7' => '', 'Hex' => '1F318'), - array('iOS2' => '', 'iOS5' => '๐ŸŒœ', 'iOS7' => '', 'Hex' => '1F31C'), - array('iOS2' => '', 'iOS5' => '๐ŸŒ›', 'iOS7' => '', 'Hex' => '1F31B'), - array( - 'iOS2' => '', - 'iOS5' => '๐ŸŒ™', - 'iOS7' => '', - 'Hex' => '1F319' - ), - array('iOS2' => '', 'iOS5' => '๐ŸŒ', 'iOS7' => '', 'Hex' => '1F30D'), - array('iOS2' => '', 'iOS5' => '๐ŸŒŽ', 'iOS7' => '', 'Hex' => '1F30E'), - array('iOS2' => '', 'iOS5' => '๐ŸŒ', 'iOS7' => '', 'Hex' => '1F30F'), - array('iOS2' => '', 'iOS5' => '๐ŸŒ‹', 'iOS7' => '', 'Hex' => '1F30B'), - array('iOS2' => '', 'iOS5' => '๐ŸŒŒ', 'iOS7' => '', 'Hex' => '1F30C'), - array('iOS2' => '', 'iOS5' => '๐ŸŒ ', 'iOS7' => '', 'Hex' => '1F320'), - array('iOS2' => '', 'iOS5' => 'โญ', 'iOS7' => 'โญ๏ธ', 'Hex' => '2B50'), - array( - 'iOS2' => '', - 'iOS5' => 'โ˜€', - 'iOS7' => 'โ˜€๏ธ', - 'Hex' => '2600' - ), - array('iOS2' => '', 'iOS5' => 'โ›…', 'iOS7' => 'โ›…๏ธ', 'Hex' => '26C5'), - array( - 'iOS2' => '', - 'iOS5' => 'โ˜', - 'iOS7' => 'โ˜๏ธ', - 'Hex' => '2601' - ), - array( - 'iOS2' => '', - 'iOS5' => 'โšก', - 'iOS7' => 'โšก๏ธ', - 'Hex' => '26A1' - ), - array( - 'iOS2' => '', - 'iOS5' => 'โ˜”', - 'iOS7' => 'โ˜”๏ธ', - 'Hex' => '2614' - ), - array('iOS2' => '', 'iOS5' => 'โ„', 'iOS7' => 'โ„๏ธ', 'Hex' => '2744'), - array( - 'iOS2' => '', - 'iOS5' => 'โ›„', - 'iOS7' => 'โ›„๏ธ', - 'Hex' => '26C4' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐ŸŒ€', - 'iOS7' => '๐ŸŒ€', - 'Hex' => '1F300' - ), - array('iOS2' => '', 'iOS5' => '๐ŸŒ', 'iOS7' => '', 'Hex' => '1F301'), - array( - 'iOS2' => '', - 'iOS5' => '๐ŸŒˆ', - 'iOS7' => '', - 'Hex' => '1F308' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐ŸŒŠ', - 'iOS7' => '', - 'Hex' => '1F30A' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐ŸŽ', - 'iOS7' => '', - 'Hex' => '1F38D' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ’', - 'iOS7' => '', - 'Hex' => '1F49D' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐ŸŽŽ', - 'iOS7' => '', - 'Hex' => '1F38E' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐ŸŽ’', - 'iOS7' => '', - 'Hex' => '1F392' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐ŸŽ“', - 'iOS7' => '', - 'Hex' => '1F393' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐ŸŽ', - 'iOS7' => '', - 'Hex' => '1F38F' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐ŸŽ†', - 'iOS7' => '', - 'Hex' => '1F386' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐ŸŽ‡', - 'iOS7' => '', - 'Hex' => '1F387' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐ŸŽ', - 'iOS7' => '', - 'Hex' => '1F390' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐ŸŽ‘', - 'iOS7' => '', - 'Hex' => '1F391' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐ŸŽƒ', - 'iOS7' => '', - 'Hex' => '1F383' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ‘ป', - 'iOS7' => '', - 'Hex' => '1F47B' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐ŸŽ…', - 'iOS7' => '', - 'Hex' => '1F385' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐ŸŽ„', - 'iOS7' => '', - 'Hex' => '1F384' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐ŸŽ', - 'iOS7' => '', - 'Hex' => '1F381' - ), - array('iOS2' => '', 'iOS5' => '๐ŸŽ‹', 'iOS7' => '', 'Hex' => '1F38B'), - array( - 'iOS2' => '', - 'iOS5' => '๐ŸŽ‰', - 'iOS7' => '', - 'Hex' => '1F389' - ), - array('iOS2' => '', 'iOS5' => '๐ŸŽŠ', 'iOS7' => '', 'Hex' => '1F38A'), - array( - 'iOS2' => '', - 'iOS5' => '๐ŸŽˆ', - 'iOS7' => '', - 'Hex' => '1F388' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐ŸŽŒ', - 'iOS7' => '', - 'Hex' => '1F38C' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿ”ฎ', 'iOS7' => '', 'Hex' => '1F52E'), - array( - 'iOS2' => '', - 'iOS5' => '๐ŸŽฅ', - 'iOS7' => '', - 'Hex' => '1F3A5' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ“ท', - 'iOS7' => '', - 'Hex' => '1F4F7' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿ“น', 'iOS7' => '', 'Hex' => '1F4F9'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ“ผ', - 'iOS7' => '', - 'Hex' => '1F4FC' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ’ฟ', - 'iOS7' => '', - 'Hex' => '1F4BF' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ“€', - 'iOS7' => '', - 'Hex' => '1F4C0' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ’ฝ', - 'iOS7' => '', - 'Hex' => '1F4BD' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿ’พ', 'iOS7' => '', 'Hex' => '1F4BE'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ’ป', - 'iOS7' => '', - 'Hex' => '1F4BB' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ“ฑ', - 'iOS7' => '', - 'Hex' => '1F4F1' - ), - array( - 'iOS2' => '', - 'iOS5' => 'โ˜Ž', - 'iOS7' => 'โ˜Ž๏ธ', - 'Hex' => '260E' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿ“ž', 'iOS7' => '', 'Hex' => '1F4DE'), - array('iOS2' => '', 'iOS5' => '๐Ÿ“Ÿ', 'iOS7' => '', 'Hex' => '1F4DF'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ“ ', - 'iOS7' => '', - 'Hex' => '1F4E0' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ“ก', - 'iOS7' => '', - 'Hex' => '1F4E1' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ“บ', - 'iOS7' => '', - 'Hex' => '1F4FA' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ“ป', - 'iOS7' => '', - 'Hex' => '1F4FB' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿ”Š', 'iOS7' => '', 'Hex' => '1F50A'), - array('iOS2' => '', 'iOS5' => '๐Ÿ”‰', 'iOS7' => '', 'Hex' => '1F509'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ”ˆ', - 'iOS7' => '', - 'Hex' => '1F508' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿ”‡', 'iOS7' => '', 'Hex' => '1F507'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ””', - 'iOS7' => '', - 'Hex' => '1F514' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿ”•', 'iOS7' => '', 'Hex' => '1F515'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ“ข', - 'iOS7' => '', - 'Hex' => '1F4E2' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ“ฃ', - 'iOS7' => '', - 'Hex' => '1F4E3' - ), - array('iOS2' => '', 'iOS5' => 'โณ', 'iOS7' => '', 'Hex' => '23F3'), - array('iOS2' => '', 'iOS5' => 'โŒ›', 'iOS7' => 'โŒ›๏ธ', 'Hex' => '231B'), - array('iOS2' => '', 'iOS5' => 'โฐ', 'iOS7' => 'โฐ', 'Hex' => '23F0'), - array('iOS2' => '', 'iOS5' => 'โŒš', 'iOS7' => 'โŒš๏ธ', 'Hex' => '231A'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ”“', - 'iOS7' => '', - 'Hex' => '1F513' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ”’', - 'iOS7' => '', - 'Hex' => '1F512' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿ”', 'iOS7' => '', 'Hex' => '1F50F'), - array('iOS2' => '', 'iOS5' => '๐Ÿ”', 'iOS7' => '', 'Hex' => '1F510'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ”‘', - 'iOS7' => '', - 'Hex' => '1F511' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿ”Ž', 'iOS7' => '', 'Hex' => '1F50E'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ’ก', - 'iOS7' => '', - 'Hex' => '1F4A1' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿ”ฆ', 'iOS7' => '', 'Hex' => '1F526'), - array('iOS2' => '', 'iOS5' => '๐Ÿ”†', 'iOS7' => '', 'Hex' => '1F506'), - array('iOS2' => '', 'iOS5' => '๐Ÿ”…', 'iOS7' => '', 'Hex' => '1F505'), - array('iOS2' => '', 'iOS5' => '๐Ÿ”Œ', 'iOS7' => '', 'Hex' => '1F50C'), - array('iOS2' => '', 'iOS5' => '๐Ÿ”‹', 'iOS7' => '', 'Hex' => '1F50B'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ”', - 'iOS7' => '', - 'Hex' => '1F50D' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿ›', 'iOS7' => '', 'Hex' => '1F6C1'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ›€', - 'iOS7' => '', - 'Hex' => '1F6C0' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿšฟ', 'iOS7' => '', 'Hex' => '1F6BF'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿšฝ', - 'iOS7' => '', - 'Hex' => '1F6BD' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿ”ง', 'iOS7' => '', 'Hex' => '1F527'), - array('iOS2' => '', 'iOS5' => '๐Ÿ”ฉ', 'iOS7' => '', 'Hex' => '1F529'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ”จ', - 'iOS7' => '', - 'Hex' => '1F528' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿšช', 'iOS7' => '', 'Hex' => '1F6AA'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿšฌ', - 'iOS7' => '', - 'Hex' => '1F6AC' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ’ฃ', - 'iOS7' => '', - 'Hex' => '1F4A3' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ”ซ', - 'iOS7' => '', - 'Hex' => '1F52B' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿ”ช', 'iOS7' => '', 'Hex' => '1F52A'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ’Š', - 'iOS7' => '', - 'Hex' => '1F48A' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ’‰', - 'iOS7' => '', - 'Hex' => '1F489' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ’ฐ', - 'iOS7' => '', - 'Hex' => '1F4B0' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿ’ด', 'iOS7' => '', 'Hex' => '1F4B4'), - array('iOS2' => '', 'iOS5' => '๐Ÿ’ต', 'iOS7' => '', 'Hex' => '1F4B5'), - array('iOS2' => '', 'iOS5' => '๐Ÿ’ท', 'iOS7' => '', 'Hex' => '1F4B7'), - array('iOS2' => '', 'iOS5' => '๐Ÿ’ถ', 'iOS7' => '', 'Hex' => '1F4B6'), - array('iOS2' => '', 'iOS5' => '๐Ÿ’ณ', 'iOS7' => '', 'Hex' => '1F4B3'), - array('iOS2' => '', 'iOS5' => '๐Ÿ’ธ', 'iOS7' => '', 'Hex' => '1F4B8'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ“ฒ', - 'iOS7' => '', - 'Hex' => '1F4F2' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿ“ง', 'iOS7' => '', 'Hex' => '1F4E7'), - array('iOS2' => '', 'iOS5' => '๐Ÿ“ฅ', 'iOS7' => '', 'Hex' => '1F4E5'), - array('iOS2' => '', 'iOS5' => '๐Ÿ“ค', 'iOS7' => '', 'Hex' => '1F4E4'), - array('iOS2' => '', 'iOS5' => 'โœ‰', 'iOS7' => 'โœ‰๏ธ', 'Hex' => '2709'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ“ฉ', - 'iOS7' => '', - 'Hex' => '1F4E9' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿ“จ', 'iOS7' => '', 'Hex' => '1F4E8'), - array('iOS2' => '', 'iOS5' => '๐Ÿ“ฏ', 'iOS7' => '', 'Hex' => '1F4EF'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ“ซ', - 'iOS7' => '', - 'Hex' => '1F4EB' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿ“ช', 'iOS7' => '', 'Hex' => '1F4EA'), - array('iOS2' => '', 'iOS5' => '๐Ÿ“ฌ', 'iOS7' => '', 'Hex' => '1F4EC'), - array('iOS2' => '', 'iOS5' => '๐Ÿ“ญ', 'iOS7' => '', 'Hex' => '1F4ED'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ“ฎ', - 'iOS7' => '', - 'Hex' => '1F4EE' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿ“ฆ', 'iOS7' => '', 'Hex' => '1F4E6'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ“', - 'iOS7' => '', - 'Hex' => '1F4DD' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿ“„', 'iOS7' => '', 'Hex' => '1F4C4'), - array('iOS2' => '', 'iOS5' => '๐Ÿ“ƒ', 'iOS7' => '', 'Hex' => '1F4C3'), - array('iOS2' => '', 'iOS5' => '๐Ÿ“‘', 'iOS7' => '', 'Hex' => '1F4D1'), - array('iOS2' => '', 'iOS5' => '๐Ÿ“Š', 'iOS7' => '', 'Hex' => '1F4CA'), - array('iOS2' => '', 'iOS5' => '๐Ÿ“ˆ', 'iOS7' => '', 'Hex' => '1F4C8'), - array('iOS2' => '', 'iOS5' => '๐Ÿ“‰', 'iOS7' => '', 'Hex' => '1F4C9'), - array('iOS2' => '', 'iOS5' => '๐Ÿ“œ', 'iOS7' => '', 'Hex' => '1F4DC'), - array('iOS2' => '', 'iOS5' => '๐Ÿ“‹', 'iOS7' => '', 'Hex' => '1F4CB'), - array('iOS2' => '', 'iOS5' => '๐Ÿ“…', 'iOS7' => '', 'Hex' => '1F4C5'), - array('iOS2' => '', 'iOS5' => '๐Ÿ“†', 'iOS7' => '', 'Hex' => '1F4C6'), - array('iOS2' => '', 'iOS5' => '๐Ÿ“‡', 'iOS7' => '', 'Hex' => '1F4C7'), - array('iOS2' => '', 'iOS5' => '๐Ÿ“', 'iOS7' => '', 'Hex' => '1F4C1'), - array('iOS2' => '', 'iOS5' => '๐Ÿ“‚', 'iOS7' => '', 'Hex' => '1F4C2'), - array( - 'iOS2' => '', - 'iOS5' => 'โœ‚', - 'iOS7' => 'โœ‚๏ธ', - 'Hex' => '2702' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿ“Œ', 'iOS7' => '', 'Hex' => '1F4CC'), - array('iOS2' => '', 'iOS5' => '๐Ÿ“Ž', 'iOS7' => '', 'Hex' => '1F4CE'), - array('iOS2' => '', 'iOS5' => 'โœ’', 'iOS7' => 'โœ’๏ธ', 'Hex' => '2712'), - array('iOS2' => '', 'iOS5' => 'โœ', 'iOS7' => 'โœ๏ธ', 'Hex' => '270F'), - array('iOS2' => '', 'iOS5' => '๐Ÿ“', 'iOS7' => '', 'Hex' => '1F4CF'), - array('iOS2' => '', 'iOS5' => '๐Ÿ“', 'iOS7' => '', 'Hex' => '1F4D0'), - array('iOS2' => '', 'iOS5' => '๐Ÿ“•', 'iOS7' => '', 'Hex' => '1F4D5'), - array('iOS2' => '', 'iOS5' => '๐Ÿ“—', 'iOS7' => '', 'Hex' => '1F4D7'), - array('iOS2' => '', 'iOS5' => '๐Ÿ“˜', 'iOS7' => '', 'Hex' => '1F4D8'), - array('iOS2' => '', 'iOS5' => '๐Ÿ“™', 'iOS7' => '', 'Hex' => '1F4D9'), - array('iOS2' => '', 'iOS5' => '๐Ÿ““', 'iOS7' => '', 'Hex' => '1F4D3'), - array('iOS2' => '', 'iOS5' => '๐Ÿ“”', 'iOS7' => '', 'Hex' => '1F4D4'), - array('iOS2' => '', 'iOS5' => '๐Ÿ“’', 'iOS7' => '', 'Hex' => '1F4D2'), - array('iOS2' => '', 'iOS5' => '๐Ÿ“š', 'iOS7' => '', 'Hex' => '1F4DA'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ“–', - 'iOS7' => '', - 'Hex' => '1F4D6' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿ”–', 'iOS7' => '', 'Hex' => '1F516'), - array('iOS2' => '', 'iOS5' => '๐Ÿ“›', 'iOS7' => '', 'Hex' => '1F4DB'), - array('iOS2' => '', 'iOS5' => '๐Ÿ”ฌ', 'iOS7' => '', 'Hex' => '1F52C'), - array('iOS2' => '', 'iOS5' => '๐Ÿ”ญ', 'iOS7' => '', 'Hex' => '1F52D'), - array('iOS2' => '', 'iOS5' => '๐Ÿ“ฐ', 'iOS7' => '', 'Hex' => '1F4F0'), - array( - 'iOS2' => '', - 'iOS5' => '๐ŸŽจ', - 'iOS7' => '', - 'Hex' => '1F3A8' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐ŸŽฌ', - 'iOS7' => '', - 'Hex' => '1F3AC' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐ŸŽค', - 'iOS7' => '', - 'Hex' => '1F3A4' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐ŸŽง', - 'iOS7' => '', - 'Hex' => '1F3A7' - ), - array('iOS2' => '', 'iOS5' => '๐ŸŽผ', 'iOS7' => '', 'Hex' => '1F3BC'), - array( - 'iOS2' => '', - 'iOS5' => '๐ŸŽต', - 'iOS7' => '', - 'Hex' => '1F3B5' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐ŸŽถ', - 'iOS7' => '', - 'Hex' => '1F3B6' - ), - array('iOS2' => '', 'iOS5' => '๐ŸŽน', 'iOS7' => '', 'Hex' => '1F3B9'), - array('iOS2' => '', 'iOS5' => '๐ŸŽป', 'iOS7' => '', 'Hex' => '1F3BB'), - array( - 'iOS2' => '', - 'iOS5' => '๐ŸŽบ', - 'iOS7' => '', - 'Hex' => '1F3BA' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐ŸŽท', - 'iOS7' => '', - 'Hex' => '1F3B7' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐ŸŽธ', - 'iOS7' => '', - 'Hex' => '1F3B8' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ‘พ', - 'iOS7' => '', - 'Hex' => '1F47E' - ), - array('iOS2' => '', 'iOS5' => '๐ŸŽฎ', 'iOS7' => '', 'Hex' => '1F3AE'), - array('iOS2' => '', 'iOS5' => '๐Ÿƒ', 'iOS7' => '', 'Hex' => '1F0CF'), - array('iOS2' => '', 'iOS5' => '๐ŸŽด', 'iOS7' => '', 'Hex' => '1F3B4'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ€„', - 'iOS7' => '๐Ÿ€„๏ธ', - 'Hex' => '1F004' - ), - array('iOS2' => '', 'iOS5' => '๐ŸŽฒ', 'iOS7' => '', 'Hex' => '1F3B2'), - array( - 'iOS2' => '', - 'iOS5' => '๐ŸŽฏ', - 'iOS7' => '', - 'Hex' => '1F3AF' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿˆ', - 'iOS7' => '', - 'Hex' => '1F3C8' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ€', - 'iOS7' => '', - 'Hex' => '1F3C0' - ), - array( - 'iOS2' => '', - 'iOS5' => 'โšฝ', - 'iOS7' => 'โšฝ๏ธ', - 'Hex' => '26BD' - ), - array( - 'iOS2' => '', - 'iOS5' => 'โšพ', - 'iOS7' => 'โšพ๏ธ', - 'Hex' => '26BE' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐ŸŽพ', - 'iOS7' => '', - 'Hex' => '1F3BE' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐ŸŽฑ', - 'iOS7' => '', - 'Hex' => '1F3B1' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿ‰', 'iOS7' => '', 'Hex' => '1F3C9'), - array('iOS2' => '', 'iOS5' => '๐ŸŽณ', 'iOS7' => '', 'Hex' => '1F3B3'), - array( - 'iOS2' => '', - 'iOS5' => 'โ›ณ', - 'iOS7' => 'โ›ณ๏ธ', - 'Hex' => '26F3' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿšต', 'iOS7' => '', 'Hex' => '1F6B5'), - array('iOS2' => '', 'iOS5' => '๐Ÿšด', 'iOS7' => '', 'Hex' => '1F6B4'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ', - 'iOS7' => '', - 'Hex' => '1F3C1' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿ‡', 'iOS7' => '', 'Hex' => '1F3C7'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ†', - 'iOS7' => '', - 'Hex' => '1F3C6' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐ŸŽฟ', - 'iOS7' => '', - 'Hex' => '1F3BF' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿ‚', 'iOS7' => '', 'Hex' => '1F3C2'), - array( - 'iOS2' => '', - 'iOS5' => '๐ŸŠ', - 'iOS7' => '', - 'Hex' => '1F3CA' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ„', - 'iOS7' => '', - 'Hex' => '1F3C4' - ), - array('iOS2' => '', 'iOS5' => '๐ŸŽฃ', 'iOS7' => '', 'Hex' => '1F3A3'), - array( - 'iOS2' => '', - 'iOS5' => 'โ˜•', - 'iOS7' => 'โ˜•๏ธ', - 'Hex' => '2615' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿต', - 'iOS7' => '', - 'Hex' => '1F375' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿถ', - 'iOS7' => '', - 'Hex' => '1F376' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿผ', 'iOS7' => '', 'Hex' => '1F37C'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿบ', - 'iOS7' => '', - 'Hex' => '1F37A' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿป', - 'iOS7' => '', - 'Hex' => '1F37B' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿธ', - 'iOS7' => '', - 'Hex' => '1F378' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿน', 'iOS7' => '', 'Hex' => '1F379'), - array('iOS2' => '', 'iOS5' => '๐Ÿท', 'iOS7' => '', 'Hex' => '1F377'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿด', - 'iOS7' => '', - 'Hex' => '1F374' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿ•', 'iOS7' => '', 'Hex' => '1F355'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ”', - 'iOS7' => '', - 'Hex' => '1F354' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐ŸŸ', - 'iOS7' => '', - 'Hex' => '1F35F' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿ—', 'iOS7' => '', 'Hex' => '1F357'), - array('iOS2' => '', 'iOS5' => '๐Ÿ–', 'iOS7' => '', 'Hex' => '1F356'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ', - 'iOS7' => '', - 'Hex' => '1F35D' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ›', - 'iOS7' => '', - 'Hex' => '1F35B' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿค', 'iOS7' => '', 'Hex' => '1F364'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿฑ', - 'iOS7' => '', - 'Hex' => '1F371' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿฃ', - 'iOS7' => '', - 'Hex' => '1F363' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿฅ', 'iOS7' => '', 'Hex' => '1F365'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ™', - 'iOS7' => '', - 'Hex' => '1F359' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ˜', - 'iOS7' => '', - 'Hex' => '1F358' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿš', - 'iOS7' => '', - 'Hex' => '1F35A' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿœ', - 'iOS7' => '', - 'Hex' => '1F35C' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿฒ', - 'iOS7' => '', - 'Hex' => '1F372' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿข', - 'iOS7' => '', - 'Hex' => '1F362' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿก', - 'iOS7' => '', - 'Hex' => '1F361' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿณ', - 'iOS7' => '', - 'Hex' => '1F373' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿž', - 'iOS7' => '', - 'Hex' => '1F35E' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿฉ', 'iOS7' => '', 'Hex' => '1F369'), - array('iOS2' => '', 'iOS5' => '๐Ÿฎ', 'iOS7' => '', 'Hex' => '1F36E'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿฆ', - 'iOS7' => '', - 'Hex' => '1F366' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿจ', 'iOS7' => '', 'Hex' => '1F368'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿง', - 'iOS7' => '', - 'Hex' => '1F367' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐ŸŽ‚', - 'iOS7' => '', - 'Hex' => '1F382' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿฐ', - 'iOS7' => '', - 'Hex' => '1F370' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿช', 'iOS7' => '', 'Hex' => '1F36A'), - array('iOS2' => '', 'iOS5' => '๐Ÿซ', 'iOS7' => '', 'Hex' => '1F36B'), - array('iOS2' => '', 'iOS5' => '๐Ÿฌ', 'iOS7' => '', 'Hex' => '1F36C'), - array('iOS2' => '', 'iOS5' => '๐Ÿญ', 'iOS7' => '', 'Hex' => '1F36D'), - array('iOS2' => '', 'iOS5' => '๐Ÿฏ', 'iOS7' => '', 'Hex' => '1F36F'), - array( - 'iOS2' => '', - 'iOS5' => '๐ŸŽ', - 'iOS7' => '', - 'Hex' => '1F34E' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿ', 'iOS7' => '', 'Hex' => '1F34F'), - array( - 'iOS2' => '', - 'iOS5' => '๐ŸŠ', - 'iOS7' => '', - 'Hex' => '1F34A' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿ‹', 'iOS7' => '', 'Hex' => '1F34B'), - array('iOS2' => '', 'iOS5' => '๐Ÿ’', 'iOS7' => '', 'Hex' => '1F352'), - array('iOS2' => '', 'iOS5' => '๐Ÿ‡', 'iOS7' => '', 'Hex' => '1F347'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ‰', - 'iOS7' => '', - 'Hex' => '1F349' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ“', - 'iOS7' => '', - 'Hex' => '1F353' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿ‘', 'iOS7' => '', 'Hex' => '1F351'), - array('iOS2' => '', 'iOS5' => '๐Ÿˆ', 'iOS7' => '', 'Hex' => '1F348'), - array('iOS2' => '', 'iOS5' => '๐ŸŒ', 'iOS7' => '', 'Hex' => '1F34C'), - array('iOS2' => '', 'iOS5' => '๐Ÿ', 'iOS7' => '', 'Hex' => '1F350'), - array('iOS2' => '', 'iOS5' => '๐Ÿ', 'iOS7' => '', 'Hex' => '1F34D'), - array('iOS2' => '', 'iOS5' => '๐Ÿ ', 'iOS7' => '', 'Hex' => '1F360'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ†', - 'iOS7' => '', - 'Hex' => '1F346' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ…', - 'iOS7' => '', - 'Hex' => '1F345' - ), - array('iOS2' => '', 'iOS5' => '๐ŸŒฝ', 'iOS7' => '', 'Hex' => '1F33D'), - array( - 'iOS2' => '', - 'iOS5' => '1โƒฃ', - 'iOS7' => '', - 'Hex' => '0031_20E3' - ), - array( - 'iOS2' => '', - 'iOS5' => '2โƒฃ', - 'iOS7' => '', - 'Hex' => '0032_20E3' - ), - array( - 'iOS2' => '', - 'iOS5' => '3โƒฃ', - 'iOS7' => '', - 'Heex' => '0034_20E3' - ), - array( - 'iOS2' => '', - 'iOS5' => '2โƒฃ', - 'iOS7' => '', - 'Hex' => '0032_20E3' - ), - array( - 'iOS2' => '', - 'iOS5' => '0โƒฃ', - 'iOS7' => '', - 'Hex' => '0030_20E3' - ), - array( - 'iOS2' => '', - 'iOS5' => '5โƒฃ', - 'iOS7' => '', - 'Hex' => '0035_20E3' - ), - array( - 'iOS2' => '', - 'iOS5' => '6โƒฃ', - 'iOS7' => '', - 'Hex' => '0036_20E3' - ), - array( - 'iOS2' => '', - 'iOS5' => '7โƒฃ', - 'iOS7' => '', - 'Hex' => '0037_20E3' - ), - array( - 'iOS2' => '', - 'iOS5' => '8โƒฃ', - 'iOS7' => '', - 'Hex' => '0038_20E3' - ), - array( - 'iOS2' => '', - 'iOS5' => '9โƒฃ', - 'iOS7' => '', - 'Hex' => '0039_20E3' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿ”Ÿ', 'iOS7' => '', 'Hex' => '1F51F'), - array('iOS2' => '', 'iOS5' => '๐Ÿ”ข', 'iOS7' => '', 'Hex' => '1F522'), - array( - 'iOS2' => '', - 'iOS5' => '#โƒฃ', - 'iOS7' => '', - 'Hex' => '0023_20E3' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿ”ฃ', 'iOS7' => '', 'Hex' => '1F523'), - array( - 'iOS2' => '', - 'iOS5' => 'โฌ†', - 'iOS7' => 'โฌ†๏ธ', - 'Hex' => '2B06' - ), - array( - 'iOS2' => '', - 'iOS5' => 'โฌ‡', - 'iOS7' => 'โฌ‡๏ธ', - 'Hex' => '2B07' - ), - array( - 'iOS2' => '', - 'iOS5' => 'โฌ…', - 'iOS7' => 'โฌ…๏ธ', - 'Hex' => '2B05' - ), - array( - 'iOS2' => '', - 'iOS5' => 'โžก', - 'iOS7' => 'โžก๏ธ', - 'Hex' => '27A1' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿ” ', 'iOS7' => '', 'Hex' => '1F520'), - array('iOS2' => '', 'iOS5' => '๐Ÿ”ก', 'iOS7' => '', 'Hex' => '1F521'), - array('iOS2' => '', 'iOS5' => '๐Ÿ”ค', 'iOS7' => '', 'Hex' => '1F524'), - array( - 'iOS2' => '', - 'iOS5' => 'โ†—', - 'iOS7' => 'โ†—๏ธ', - 'Hex' => '2197' - ), - array( - 'iOS2' => '', - 'iOS5' => 'โ†–', - 'iOS7' => 'โ†–๏ธ', - 'Hex' => '2196' - ), - array( - 'iOS2' => '', - 'iOS5' => 'โ†˜', - 'iOS7' => 'โ†˜๏ธ', - 'Hex' => '2198' - ), - array( - 'iOS2' => '', - 'iOS5' => 'โ†™', - 'iOS7' => 'โ†™๏ธ', - 'Hex' => '2199' - ), - array('iOS2' => '', 'iOS5' => 'โ†”', 'iOS7' => 'โ†”๏ธ', 'Hex' => '2194'), - array('iOS2' => '', 'iOS5' => 'โ†•', 'iOS7' => 'โ†•๏ธ', 'Hex' => '2195'), - array('iOS2' => '', 'iOS5' => '๐Ÿ”„', 'iOS7' => '', 'Hex' => '1F504'), - array( - 'iOS2' => '', - 'iOS5' => 'โ—€', - 'iOS7' => 'โ—€๏ธ', - 'Hex' => '25C0' - ), - array( - 'iOS2' => '', - 'iOS5' => 'โ–ถ', - 'iOS7' => 'โ–ถ๏ธ', - 'Hex' => '25B6' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿ”ผ', 'iOS7' => '', 'Hex' => '1F53C'), - array('iOS2' => '', 'iOS5' => '๐Ÿ”ฝ', 'iOS7' => '', 'Hex' => '1F53D'), - array('iOS2' => '', 'iOS5' => 'โ†ฉ', 'iOS7' => 'โ†ฉ๏ธ', 'Hex' => '21A9'), - array('iOS2' => '', 'iOS5' => 'โ†ช', 'iOS7' => 'โ†ช๏ธ', 'Hex' => '21AA'), - array('iOS2' => '', 'iOS5' => 'โ„น', 'iOS7' => 'โ„น๏ธ', 'Hex' => '2139'), - array('iOS2' => '', 'iOS5' => 'โช', 'iOS7' => '', 'Hex' => '23EA'), - array('iOS2' => '', 'iOS5' => 'โฉ', 'iOS7' => '', 'Hex' => '23E9'), - array('iOS2' => '', 'iOS5' => 'โซ', 'iOS7' => '', 'Hex' => '23EB'), - array('iOS2' => '', 'iOS5' => 'โฌ', 'iOS7' => '', 'Hex' => '23EC'), - array('iOS2' => '', 'iOS5' => 'โคต', 'iOS7' => 'โคต๏ธ', 'Hex' => '2935'), - array('iOS2' => '', 'iOS5' => 'โคด', 'iOS7' => 'โคด๏ธ', 'Hex' => '2934'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ†—', - 'iOS7' => '', - 'Hex' => '1F197' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿ”€', 'iOS7' => '', 'Hex' => '1F500'), - array('iOS2' => '', 'iOS5' => '๐Ÿ”', 'iOS7' => '', 'Hex' => '1F501'), - array('iOS2' => '', 'iOS5' => '๐Ÿ”‚', 'iOS7' => '', 'Hex' => '1F502'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ†•', - 'iOS7' => '', - 'Hex' => '1F195' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ†™', - 'iOS7' => '', - 'Hex' => '1F199' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ†’', - 'iOS7' => '', - 'Hex' => '1F192' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿ†“', 'iOS7' => '', 'Hex' => '1F193'), - array('iOS2' => '', 'iOS5' => '๐Ÿ†–', 'iOS7' => '', 'Hex' => '1F196'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ“ถ', - 'iOS7' => '', - 'Hex' => '1F4F6' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐ŸŽฆ', - 'iOS7' => '', - 'Hex' => '1F3A6' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿˆ', - 'iOS7' => '', - 'Hex' => '1F201' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿˆฏ', - 'iOS7' => '๐Ÿˆฏ๏ธ', - 'Hex' => '1F22F' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿˆณ', - 'iOS7' => '', - 'Hex' => '1F233' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿˆต', - 'iOS7' => '', - 'Hex' => '1F235' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿˆด', 'iOS7' => '', 'Hex' => '1F234'), - array('iOS2' => '', 'iOS5' => '๐Ÿˆฒ', 'iOS7' => '', 'Hex' => '1F232'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ‰', - 'iOS7' => '', - 'Hex' => '1F250' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿˆน', - 'iOS7' => '', - 'Hex' => '1F239' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿˆบ', - 'iOS7' => '', - 'Hex' => '1F23A' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿˆถ', - 'iOS7' => '', - 'Hex' => '1F236' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿˆš', - 'iOS7' => '๐Ÿˆš๏ธ', - 'Hex' => '1F21A' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿšป', - 'iOS7' => '', - 'Hex' => '1F6BB' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿšน', - 'iOS7' => '', - 'Hex' => '1F6B9' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿšบ', - 'iOS7' => '', - 'Hex' => '1F6BA' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿšผ', - 'iOS7' => '', - 'Hex' => '1F6BC' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿšพ', - 'iOS7' => '', - 'Hex' => '1F6BE' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿšฐ', 'iOS7' => '', 'Hex' => '1F6B0'), - array('iOS2' => '', 'iOS5' => '๐Ÿšฎ', 'iOS7' => '', 'Hex' => '1F6AE'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ…ฟ', - 'iOS7' => '๐Ÿ…ฟ๏ธ', - 'Hex' => '1F17F' - ), - array( - 'iOS2' => '', - 'iOS5' => 'โ™ฟ', - 'iOS7' => 'โ™ฟ๏ธ', - 'Hex' => '267F' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿšญ', - 'iOS7' => '', - 'Hex' => '1F6AD' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿˆท', - 'iOS7' => '', - 'Hex' => '1F237' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿˆธ', - 'iOS7' => '', - 'Hex' => '1F238' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿˆ‚', - 'iOS7' => '', - 'Hex' => '1F202' - ), - array('iOS2' => '', 'iOS5' => 'โ“‚', 'iOS7' => 'โ“‚๏ธ', 'Hex' => '24C2'), - array('iOS2' => '', 'iOS5' => '๐Ÿ›‚', 'iOS7' => '', 'Hex' => '1F6C2'), - array('iOS2' => '', 'iOS5' => '๐Ÿ›„', 'iOS7' => '', 'Hex' => '1F6C4'), - array('iOS2' => '', 'iOS5' => '๐Ÿ›…', 'iOS7' => '', 'Hex' => '1F6C5'), - array('iOS2' => '', 'iOS5' => '๐Ÿ›ƒ', 'iOS7' => '', 'Hex' => '1F6C3'), - array('iOS2' => '', 'iOS5' => '๐Ÿ‰‘', 'iOS7' => '', 'Hex' => '1F251'), - array( - 'iOS2' => '', - 'iOS5' => 'ใŠ™', - 'iOS7' => 'ใŠ™๏ธ', - 'Hex' => '3299' - ), - array( - 'iOS2' => '', - 'iOS5' => 'ใŠ—', - 'iOS7' => 'ใŠ—๏ธ', - 'Hex' => '3297' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿ†‘', 'iOS7' => '', 'Hex' => '1F191'), - array('iOS2' => '', 'iOS5' => '๐Ÿ†˜', 'iOS7' => '', 'Hex' => '1F198'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ†”', - 'iOS7' => '', - 'Hex' => '1F194' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿšซ', 'iOS7' => '', 'Hex' => '1F6AB'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ”ž', - 'iOS7' => '', - 'Hex' => '1F51E' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿ“ต', 'iOS7' => '', 'Hex' => '1F4F5'), - array('iOS2' => '', 'iOS5' => '๐Ÿšฏ', 'iOS7' => '', 'Hex' => '1F6AF'), - array('iOS2' => '', 'iOS5' => '๐Ÿšฑ', 'iOS7' => '', 'Hex' => '1F6B1'), - array('iOS2' => '', 'iOS5' => '๐Ÿšณ', 'iOS7' => '', 'Hex' => '1F6B3'), - array('iOS2' => '', 'iOS5' => '๐Ÿšท', 'iOS7' => '', 'Hex' => '1F6B7'), - array('iOS2' => '', 'iOS5' => '๐Ÿšธ', 'iOS7' => '', 'Hex' => '1F6B8'), - array('iOS2' => '', 'iOS5' => 'โ›”', 'iOS7' => 'โ›”๏ธ', 'Hex' => '26D4'), - array( - 'iOS2' => '', - 'iOS5' => 'โœณ', - 'iOS7' => 'โœณ๏ธ', - 'Hex' => '2733' - ), - array('iOS2' => '', 'iOS5' => 'โ‡', 'iOS7' => 'โ‡๏ธ', 'Hex' => '2747'), - array('iOS2' => '', 'iOS5' => 'โŽ', 'iOS7' => '', 'Hex' => '274E'), - array('iOS2' => '', 'iOS5' => 'โœ…', 'iOS7' => '', 'Hex' => '2705'), - array( - 'iOS2' => '', - 'iOS5' => 'โœด', - 'iOS7' => 'โœด๏ธ', - 'Hex' => '2734' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ’Ÿ', - 'iOS7' => '', - 'Hex' => '1F49F' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ†š', - 'iOS7' => '', - 'Hex' => '1F19A' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ“ณ', - 'iOS7' => '', - 'Hex' => '1F4F3' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ“ด', - 'iOS7' => '', - 'Hex' => '1F4F4' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ…ฐ', - 'iOS7' => '', - 'Hex' => '1F170' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ…ฑ', - 'iOS7' => '', - 'Hex' => '1F171' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ†Ž', - 'iOS7' => '', - 'Hex' => '1F18E' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ…พ', - 'iOS7' => '', - 'Hex' => '1F17E' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿ’ ', 'iOS7' => '', 'Hex' => '1F4A0'), - array('iOS2' => '', 'iOS5' => 'โžฟ', 'iOS7' => '', 'Hex' => '27BF'), - array('iOS2' => '', 'iOS5' => 'โ™ป', 'iOS7' => 'โ™ป๏ธ', 'Hex' => '267B'), - array( - 'iOS2' => '', - 'iOS5' => 'โ™ˆ', - 'iOS7' => 'โ™ˆ๏ธ', - 'Hex' => '2648' - ), - array( - 'iOS2' => '', - 'iOS5' => 'โ™‰', - 'iOS7' => 'โ™‰๏ธ', - 'Hex' => '2649' - ), - array( - 'iOS2' => '', - 'iOS5' => 'โ™Š', - 'iOS7' => 'โ™Š๏ธ', - 'Hex' => '264A' - ), - array( - 'iOS2' => '', - 'iOS5' => 'โ™‹', - 'iOS7' => 'โ™‹๏ธ', - 'Hex' => '264B' - ), - array( - 'iOS2' => '', - 'iOS5' => 'โ™Œ', - 'iOS7' => 'โ™Œ๏ธ', - 'Hex' => '264C' - ), - array( - 'iOS2' => '', - 'iOS5' => 'โ™', - 'iOS7' => 'โ™๏ธ', - 'Hex' => '264D' - ), - array( - 'iOS2' => '', - 'iOS5' => 'โ™Ž', - 'iOS7' => 'โ™Ž๏ธ', - 'Hex' => '264E' - ), - array( - 'iOS2' => '', - 'iOS5' => 'โ™', - 'iOS7' => 'โ™๏ธ', - 'Hex' => '264F' - ), - array( - 'iOS2' => '', - 'iOS5' => 'โ™', - 'iOS7' => 'โ™๏ธ', - 'Hex' => '2650' - ), - array( - 'iOS2' => '', - 'iOS5' => 'โ™‘', - 'iOS7' => 'โ™‘๏ธ', - 'Hex' => '2651' - ), - array( - 'iOS2' => '', - 'iOS5' => 'โ™’', - 'iOS7' => 'โ™’๏ธ', - 'Hex' => '2652' - ), - array( - 'iOS2' => '', - 'iOS5' => 'โ™“', - 'iOS7' => 'โ™“๏ธ', - 'Hex' => '2653' - ), - array('iOS2' => '', 'iOS5' => 'โ›Ž', 'iOS7' => '', 'Hex' => '26CE'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ”ฏ', - 'iOS7' => '', - 'Hex' => '1F52F' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿง', - 'iOS7' => '', - 'Hex' => '1F3E7' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ’น', - 'iOS7' => '', - 'Hex' => '1F4B9' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿ’ฒ', 'iOS7' => '', 'Hex' => '1F4B2'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ’ฑ', - 'iOS7' => '', - 'Hex' => '1F4B1' - ), - array('iOS2' => 'ยฉ', 'iOS5' => 'ยฉ', 'iOS7' => '', 'Hex' => '00A9'), - array('iOS2' => 'ยฎ', 'iOS5' => 'ยฎ', 'iOS7' => '', 'Hex' => '00AE'), - array('iOS2' => 'โ„ข', 'iOS5' => 'โ„ข', 'iOS7' => '', 'Hex' => '2122'), - array( - 'iOS2' => '', - 'iOS5' => 'ใ€ฝ', - 'iOS7' => 'ใ€ฝ๏ธ', - 'Hex' => '303D' - ), - array('iOS2' => '', 'iOS5' => 'ใ€ฐ', 'iOS7' => '', 'Hex' => '3030'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ”', - 'iOS7' => '', - 'Hex' => '1F51D' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿ”š', 'iOS7' => '', 'Hex' => '1F51A'), - array('iOS2' => '', 'iOS5' => '๐Ÿ”™', 'iOS7' => '', 'Hex' => '1F519'), - array('iOS2' => '', 'iOS5' => '๐Ÿ”›', 'iOS7' => '', 'Hex' => '1F51B'), - array('iOS2' => '', 'iOS5' => '๐Ÿ”œ', 'iOS7' => '', 'Hex' => '1F51C'), - array('iOS2' => '', 'iOS5' => 'โŒ', 'iOS7' => '', 'Hex' => '274C'), - array( - 'iOS2' => '', - 'iOS5' => 'โญ•', - 'iOS7' => 'โญ•๏ธ', - 'Hex' => '2B55' - ), - array('iOS2' => '', 'iOS5' => 'โ—', 'iOS7' => 'โ—๏ธ', 'Hex' => '2757'), - array('iOS2' => '', 'iOS5' => 'โ“', 'iOS7' => '', 'Hex' => '2753'), - array('iOS2' => '', 'iOS5' => 'โ•', 'iOS7' => '', 'Hex' => '2755'), - array('iOS2' => '', 'iOS5' => 'โ”', 'iOS7' => '', 'Hex' => '2754'), - array('iOS2' => '', 'iOS5' => '๐Ÿ”ƒ', 'iOS7' => '', 'Hex' => '1F503'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ•›', - 'iOS7' => '', - 'Hex' => '1F55B' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿ•ง', 'iOS7' => '', 'Hex' => '1F567'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ•', - 'iOS7' => '', - 'Hex' => '1F550' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿ•œ', 'iOS7' => '', 'Hex' => '1F55C'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ•‘', - 'iOS7' => '', - 'Hex' => '1F551' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿ•', 'iOS7' => '', 'Hex' => '1F55D'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ•’', - 'iOS7' => '', - 'Hex' => '1F552' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿ•ž', 'iOS7' => '', 'Hex' => '1F55E'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ•“', - 'iOS7' => '', - 'Hex' => '1F553' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿ•Ÿ', 'iOS7' => '', 'Hex' => '1F55F'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ•”', - 'iOS7' => '', - 'Hex' => '1F554' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿ• ', 'iOS7' => '', 'Hex' => '1F560'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ••', - 'iOS7' => '', - 'Hex' => '1F555' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ•–', - 'iOS7' => '', - 'Hex' => '1F556' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ•—', - 'iOS7' => '', - 'Hex' => '1F557' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ•˜', - 'iOS7' => '', - 'Hex' => '1F558' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ•™', - 'iOS7' => '', - 'Hex' => '1F559' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ•š', - 'iOS7' => '', - 'Hex' => '1F55A' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿ•ก', 'iOS7' => '', 'Hex' => '1F561'), - array('iOS2' => '', 'iOS5' => '๐Ÿ•ข', 'iOS7' => '', 'Hex' => '1F562'), - array('iOS2' => '', 'iOS5' => '๐Ÿ•ฃ', 'iOS7' => '', 'Hex' => '1F563'), - array('iOS2' => '', 'iOS5' => '๐Ÿ•ค', 'iOS7' => '', 'Hex' => '1F564'), - array('iOS2' => '', 'iOS5' => '๐Ÿ•ฅ', 'iOS7' => '', 'Hex' => '1F565'), - array('iOS2' => '', 'iOS5' => '๐Ÿ•ฆ', 'iOS7' => '', 'Hex' => '1F566'), - array('iOS2' => '', 'iOS5' => 'โœ–', 'iOS7' => 'โœ–๏ธ', 'Hex' => '2716'), - array('iOS2' => '', 'iOS5' => 'โž•', 'iOS7' => '', 'Hex' => '2795'), - array('iOS2' => '', 'iOS5' => 'โž–', 'iOS7' => '', 'Hex' => '2796'), - array('iOS2' => '', 'iOS5' => 'โž—', 'iOS7' => '', 'Hex' => '2797'), - array( - 'iOS2' => '', - 'iOS5' => 'โ™ ', - 'iOS7' => 'โ™ ๏ธ', - 'Hex' => '2660' - ), - array( - 'iOS2' => '', - 'iOS5' => 'โ™ฅ', - 'iOS7' => 'โ™ฅ๏ธ', - 'Hex' => '2665' - ), - array( - 'iOS2' => '', - 'iOS5' => 'โ™ฃ', - 'iOS7' => 'โ™ฃ๏ธ', - 'Hex' => '2663' - ), - array( - 'iOS2' => '', - 'iOS5' => 'โ™ฆ', - 'iOS7' => 'โ™ฆ๏ธ', - 'Hex' => '2666' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿ’ฎ', 'iOS7' => '', 'Hex' => '1F4AE'), - array('iOS2' => '', 'iOS5' => '๐Ÿ’ฏ', 'iOS7' => '', 'Hex' => '1F4AF'), - array('iOS2' => '', 'iOS5' => 'โœ”', 'iOS7' => 'โœ”๏ธ', 'Hex' => '2714'), - array('iOS2' => '', 'iOS5' => 'โ˜‘', 'iOS7' => 'โ˜‘๏ธ', 'Hex' => '2611'), - array('iOS2' => '', 'iOS5' => '๐Ÿ”˜', 'iOS7' => '', 'Hex' => '1F518'), - array('iOS2' => '', 'iOS5' => '๐Ÿ”—', 'iOS7' => '', 'Hex' => '1F517'), - array('iOS2' => '', 'iOS5' => 'โžฐ', 'iOS7' => '', 'Hex' => '27B0'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ”ฑ', - 'iOS7' => '', - 'Hex' => '1F531' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ”ฒ', - 'iOS7' => '', - 'Hex' => '1F532' - ), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ”ณ', - 'iOS7' => '', - 'Hex' => '1F533' - ), - array('iOS2' => '', 'iOS5' => 'โ—ผ', 'iOS7' => 'โ—ผ๏ธ', 'Hex' => '25FC'), - array('iOS2' => '', 'iOS5' => 'โ—ป', 'iOS7' => 'โ—ป๏ธ', 'Hex' => '25FB'), - array('iOS2' => '', 'iOS5' => 'โ—พ', 'iOS7' => 'โ—พ๏ธ', 'Hex' => '25FE'), - array('iOS2' => '', 'iOS5' => 'โ—ฝ', 'iOS7' => 'โ—ฝ๏ธ', 'Hex' => '25FD'), - array('iOS2' => '', 'iOS5' => 'โ–ช', 'iOS7' => 'โ–ช๏ธ', 'Hex' => '25AA'), - array('iOS2' => '', 'iOS5' => 'โ–ซ', 'iOS7' => 'โ–ซ๏ธ', 'Hex' => '25AB'), - array('iOS2' => '', 'iOS5' => '๐Ÿ”บ', 'iOS7' => '', 'Hex' => '1F53A'), - array('iOS2' => '', 'iOS5' => 'โฌœ', 'iOS7' => 'โฌœ๏ธ', 'Hex' => '2B1C'), - array('iOS2' => '', 'iOS5' => 'โฌ›', 'iOS7' => 'โฌ›๏ธ', 'Hex' => '2B1B'), - array('iOS2' => '', 'iOS5' => 'โšซ', 'iOS7' => 'โšซ๏ธ', 'Hex' => '26AB'), - array('iOS2' => '', 'iOS5' => 'โšช', 'iOS7' => 'โšช๏ธ', 'Hex' => '26AA'), - array( - 'iOS2' => '', - 'iOS5' => '๐Ÿ”ด', - 'iOS7' => '', - 'Hex' => '1F534' - ), - array('iOS2' => '', 'iOS5' => '๐Ÿ”ต', 'iOS7' => '', 'Hex' => '1F535'), - array('iOS2' => '', 'iOS5' => '๐Ÿ”ป', 'iOS7' => '', 'Hex' => '1F53B'), - array('iOS2' => '', 'iOS5' => '๐Ÿ”ถ', 'iOS7' => '', 'Hex' => '1F536'), - array('iOS2' => '', 'iOS5' => '๐Ÿ”ท', 'iOS7' => '', 'Hex' => '1F537'), - array('iOS2' => '', 'iOS5' => '๐Ÿ”ธ', 'iOS7' => '', 'Hex' => '1F538'), - array('iOS2' => '', 'iOS5' => '๐Ÿ”น', 'iOS7' => '', 'Hex' => '1F539'), - array('iOS2' => '', 'iOS5' => 'โ‰', 'iOS7' => 'โ‰๏ธ', 'Hex' => '2049'), - array('iOS2' => '', 'iOS5' => 'โ€ผ', 'iOS7' => 'โ€ผ๏ธ', 'Hex' => '203C') - ); -} diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index dcb9df27..7d63a7fa 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -689,7 +689,6 @@ public function sendBroadcastLocation($targets, $long, $lat, $name = null, $url */ public function sendBroadcastMessage($targets, $message) { - $message = $this->parseMessageForEmojis($message); $bodyNode = new ProtocolNode("body", null, null, $message); // Return message ID. Make pull request for this. return $this->sendBroadcast($targets, $bodyNode, "text"); @@ -1485,7 +1484,6 @@ public function sendUnlockGroup($gId) */ public function sendMessage($to, $txt, $id = null) { - $txt = $this->parseMessageForEmojis($txt); $bodyNode = new ProtocolNode("body", null, null, $txt); $id = $this->sendMessageNode($to, $bodyNode, $id); $this->waitForServer($id); @@ -1561,7 +1559,6 @@ public function sendMessageComposing($to) */ public function sendMessageImage($to, $filepath, $storeURLmedia = false, $fsize = 0, $fhash = "", $caption = "") { - $caption = $this->parseMessageForEmojis($caption); if ($fsize == 0 || $fhash == "") { $allowedExtensions = array('jpg', 'jpeg', 'gif', 'png'); $size = 5 * 1024 * 1024; // Easy way to set maximum file size for this media type. @@ -1641,8 +1638,6 @@ protected function sendChatState($to, $state) */ public function sendMessageVideo($to, $filepath, $storeURLmedia = false, $fsize = 0, $fhash = "", $caption = "") { - $caption = $this->parseMessageForEmojis($caption); - if ($fsize == 0 || $fhash == "") { $allowedExtensions = array('3gp', 'mp4', 'mov', 'avi'); $size = 20 * 1024 * 1024; // Easy way to set maximum file size for this media type. @@ -3874,60 +3869,6 @@ protected function sendSetPicture($jid, $filepath) $this->sendNode($node); $this->waitForServer($nodeID); } - /** - * Parse the message text for emojis - * - * This will look for special strings in the message text - * that need to be replaced with a unicode character to show - * the corresponding emoji. - * - * Emojis should be entered in the message text either as the - * correct unicode character directly, or if this isn't possible, - * by putting a placeholder of ##unicodeNumber## in the message text. - * Include the surrounding ## - * eg: - * ##1f604## this will show the smiling face - * ##1f1ec_1f1e7## this will show the UK flag. - * - * Notice that if 2 unicode characters are required they should be joined - * with an underscore. - * - * - * @param string $txt The message to be parsed for emoji code. - * - * @return string - */ - private function parseMessageForEmojis($txt) - { - $matches = null; - preg_match_all('/##(.*?)##/', $txt, $matches, PREG_SET_ORDER); - if (is_array($matches)) { - foreach ($matches as $emoji) { - $txt = str_ireplace($emoji[0], $this->unichr((string) $emoji[1]), $txt); - } - } - - return $txt; - } - - /** - * Creates the correct unicode character from the unicode code point - * - * @param integer $int - * - * @return string - */ - private function unichr($int) - { - $string = null; - $multiChars = explode('_', $int); - - foreach ($multiChars as $char) { - $string .= mb_convert_encoding('&#' . intval($char, 16) . ';', 'UTF-8', 'HTML-ENTITIES'); - } - - return $string; - } /** * @param string $jid From bcb751f757a0f4aa01bd211ed602bee9a04acdc6 Mon Sep 17 00:00:00 2001 From: mgp25 Date: Sun, 3 May 2015 16:13:03 +0200 Subject: [PATCH 352/436] Added events contact notification --- src/events/AllEvents.php | 3 +++ src/whatsprot.class.php | 26 +++++++++++++++++++++++++- 2 files changed, 28 insertions(+), 1 deletion(-) diff --git a/src/events/AllEvents.php b/src/events/AllEvents.php index ad898676..887963f7 100644 --- a/src/events/AllEvents.php +++ b/src/events/AllEvents.php @@ -94,6 +94,9 @@ public function onMessageComposing($mynumber, $from, $id, $type, $time) {} public function onMessagePaused($mynumber, $from, $id, $type, $time) {} public function onMessageReceivedClient($mynumber, $from, $id, $type, $time, $participant) {} public function onMessageReceivedServer($mynumber, $from, $id, $type, $time) {} + public function onNumberWasAdded($mynumber, $jid) {} + public function onNumberWasRemoved($mynumber, $jid) {} + public function onNumberWasUpdated($mynumber, $jid) {} public function onPaidAccount($mynumber, $author, $kind, $status, $creation, $expiration) {} public function onPaymentRecieved($mynumber, $kind, $status, $creation, $expiration) {} public function onPing($mynumber, $id) {} diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index 7d63a7fa..53c551ce 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -3165,7 +3165,31 @@ protected function processInboundDataNode(ProtocolNode $node, $autoReceipt = tru //TODO break; case "contacts": - //TODO + $notification = $node->getChild(0)->getTag(); + if ($notification == 'add') + { + $this->eventManager()->fire("onNumberWasAdded", + array( + $this->phoneNumber, + $node->getChild(0)->getAttribute('jid') + )); + } + elseif ($notification == 'remove') + { + $this->eventManager()->fire("onNumberWasRemoved", + array( + $this->phoneNumber, + $node->getChild(0)->getAttribute('jid') + )); + } + elseif ($notification == 'update') + { + $this->eventManager()->fire("onNumberWasUpdated", + array( + $this->phoneNumber, + $node->getChild(0)->getAttribute('jid') + )); + } break; case "encrypt": $value = $node->getChild(0)->getAttribute('value'); From dc4cfc1cd2e8ef1e374eb1185a586c1022b4e98a Mon Sep 17 00:00:00 2001 From: mgp25 Date: Sun, 3 May 2015 17:20:08 +0200 Subject: [PATCH 353/436] send receipt and ack to call nodes --- src/whatsprot.class.php | 41 +++++++++++++++++++++++++++++++---------- 1 file changed, 31 insertions(+), 10 deletions(-) diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index 53c551ce..0e3893ae 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -2618,13 +2618,13 @@ protected function processInboundDataNode(ProtocolNode $node, $autoReceipt = tru } if ($autoReceipt) { - $this->sendMessageReceived($node, $type, $author); + $this->sendReceipt($node, $type, $author); } } if ($node->getAttribute("type") == "text" && $node->getChild(0)->getTag() == 'enc') { // TODO if ($autoReceipt) { - $this->sendMessageReceived($node, $type); + $this->sendReceipt($node, $type); } } if ($node->getAttribute("type") == "media" && $node->getChild('media') != null) { @@ -2777,7 +2777,7 @@ protected function processInboundDataNode(ProtocolNode $node, $autoReceipt = tru } if ($autoReceipt) { - $this->sendMessageReceived($node, $type); + $this->sendReceipt($node, $type); } } if ($node->getChild('received') != null) { @@ -3295,6 +3295,19 @@ protected function processInboundDataNode(ProtocolNode $node, $autoReceipt = tru } $this->sendAck($node, 'notification'); } + if ($node->getTag() == "call") + { + if ($node->getChild(0)->getTag() == "offer") + { + $callId = $node->getChild(0)->getAttribute("call-id"); + $this->sendReceipt($node, null, null, $callId); + } + else + { + $this->sendAck($node, 'call'); + } + + } if ($node->getTag() == "ib") { foreach($node->getChildren() as $child) @@ -3780,11 +3793,11 @@ protected function sendMessageNode($to, $node, $id = null) /** * Tell the server we received the message. * - * @param ProtocolNode $msg The ProtocolTreeNode that contains the message. + * @param ProtocolNode $node The ProtocolTreeNode that contains the message. * @param string $type * @param string $participant */ - protected function sendMessageReceived($msg, $type = "read", $participant = null) + protected function sendReceipt($node, $type = "read", $participant = null, $callId = null) { $messageHash = array(); if ($type == "read") { @@ -3793,16 +3806,24 @@ protected function sendMessageReceived($msg, $type = "read", $participant = null if ($participant != null) { $messageHash["participant"] = $participant; } - $messageHash["to"] = $msg->getAttribute("from"); - $messageHash["id"] = $msg->getAttribute("id"); + $messageHash["to"] = $node->getAttribute("from"); + $messageHash["id"] = $node->getAttribute("id"); - $messageNode = new ProtocolNode("receipt", $messageHash, null, null); + if ($callId != null) + { + $offerNode = new ProtocolNode("offer", array("call-id" => $callId), null, null); + $messageNode = new ProtocolNode("receipt", $messageHash, array($offerNode), null); + } + else + { + $messageNode = new ProtocolNode("receipt", $messageHash, null, null); + } $this->sendNode($messageNode); $this->eventManager()->fire("onSendMessageReceived", array( $this->phoneNumber, - $msg->getAttribute("id"), - $msg->getAttribute("from"), + $node->getAttribute("id"), + $node->getAttribute("from"), $type )); } From ec731736e409d72b1a0a661c3dcf6171305883b1 Mon Sep 17 00:00:00 2001 From: mgp25 Date: Sun, 3 May 2015 17:40:43 +0200 Subject: [PATCH 354/436] onCallReceived event added --- src/events/AllEvents.php | 1 + src/whatsprot.class.php | 9 +++++++++ 2 files changed, 10 insertions(+) diff --git a/src/events/AllEvents.php b/src/events/AllEvents.php index 887963f7..9ebeb54a 100644 --- a/src/events/AllEvents.php +++ b/src/events/AllEvents.php @@ -37,6 +37,7 @@ protected function startListening() } //Adding to this list? Please put them in alphabetical order! + public function onCallReceived($mynumber, $from, $id, $notify, $time) {} public function onClose($mynumber, $error) {} public function onCodeRegister($mynumber, $login, $password, $type, $expiration, $kind, $price, $cost, $currency, $price_expiration) {} public function onCodeRegisterFailed($mynumber, $status, $reason, $retry_after) {} diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index 0e3893ae..10aa3c0d 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -3301,6 +3301,15 @@ protected function processInboundDataNode(ProtocolNode $node, $autoReceipt = tru { $callId = $node->getChild(0)->getAttribute("call-id"); $this->sendReceipt($node, null, null, $callId); + + $this->eventManager()->fire("onCallReceived", + array( + $this->phoneNumber, + $child->getAttribute("from"), + $child->getAttribute("id"), + $child->getAttribute("notify"), + $child->getAttribute("t") + )); } else { From 2b1d51197266cdbcac080a8e2c70f5274bf34f53 Mon Sep 17 00:00:00 2001 From: mgp25 Date: Sun, 3 May 2015 17:45:25 +0200 Subject: [PATCH 355/436] onCallReceived event fixed --- src/events/AllEvents.php | 2 +- src/whatsprot.class.php | 9 +++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/events/AllEvents.php b/src/events/AllEvents.php index 9ebeb54a..7194cdf7 100644 --- a/src/events/AllEvents.php +++ b/src/events/AllEvents.php @@ -37,7 +37,7 @@ protected function startListening() } //Adding to this list? Please put them in alphabetical order! - public function onCallReceived($mynumber, $from, $id, $notify, $time) {} + public function onCallReceived($mynumber, $from, $id, $notify, $time, $callId) {} public function onClose($mynumber, $error) {} public function onCodeRegister($mynumber, $login, $password, $type, $expiration, $kind, $price, $cost, $currency, $price_expiration) {} public function onCodeRegisterFailed($mynumber, $status, $reason, $retry_after) {} diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index 10aa3c0d..fd0cbca5 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -3305,10 +3305,11 @@ protected function processInboundDataNode(ProtocolNode $node, $autoReceipt = tru $this->eventManager()->fire("onCallReceived", array( $this->phoneNumber, - $child->getAttribute("from"), - $child->getAttribute("id"), - $child->getAttribute("notify"), - $child->getAttribute("t") + $node->getAttribute("from"), + $node->getAttribute("id"), + $node->getAttribute("notify"), + $node->getAttribute("t"), + $node->getChild(0)->getAttribute("call-id") )); } else From 475be24ac08a71a1cec6b8fc2fe558f5aa118165 Mon Sep 17 00:00:00 2001 From: mgp25 Date: Sun, 3 May 2015 17:53:08 +0200 Subject: [PATCH 356/436] rejectCall added --- src/whatsprot.class.php | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index fd0cbca5..975ea108 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -1930,6 +1930,30 @@ public function sendBroadcastVcard($targets, $name, $vCard) return $this->sendBroadcast($targets, $mediaNode, "media"); } + + /** + * Rejects a call + * + * @param array $to Phone number. + * @param string $id The main node id + * @param string $callId The call-id + */ + public function rejectCall($to, $id, $callId) + { + $rejectNode = new ProtocolNode("reject", + array( + "call-id" => $callId + ), null, null); + + $callNode = new ProtocolNode("call", + array( + "id" => $id, + "to" => $this->getJID($to) + ), array($rejectNode), null); + + $this->sendNode($callNode); + } + /** * Sets the bind of the new message. * From 1263d7f1aa08a16593754992a05f94ed42225b7e Mon Sep 17 00:00:00 2001 From: mgp25 Date: Sun, 3 May 2015 20:22:23 +0200 Subject: [PATCH 357/436] Update README.md --- README.md | 137 ++++-------------------------------------------------- 1 file changed, 9 insertions(+), 128 deletions(-) diff --git a/README.md b/README.md index b1900140..41763461 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ Interface to WhatsApp Messenger **Read the [wiki](https://github.com/mgp25/Chat-API/wiki)** and previous issues before opening a new one! Maybe your issue is already answered. -**[WhatsApp incoming updates log](https://github.com/mgp25/Chat-API/wiki/WhatsApp-incoming-updates)** +For new WhatsApp updates check **[WhatsApp incoming updates log](https://github.com/mgp25/Chat-API/wiki/WhatsApp-incoming-updates)** ---------- @@ -16,70 +16,9 @@ Interface to WhatsApp Messenger - [0xTryCatch](https://github.com/0xTryCatch) - [Shirioko](https://github.com/shirioko) +Also Ahmed Moh'd (fb.com/ahmed.mhd) and Ali Hubail (@hubail) for making this project possible. -### Update October 7th, 2014 - -This is going to be the official repository of WhatsAPI. We don't support spam and we won't answer issues like "Blocking" or "sending massive messages". - -**Latest updates** -- *Auto token updater: It uses a private server to generate token. When executing API it will check always for newest token, user agent and version.* -- *Identity generation has changed: Now is random_pseudo_bytes, in the WhatsApp object, the value you set in identity is the name of the file where the identity is going to be saved. I recommend to set as identity your phone number.* - - - - -### Update March 15th, 2014 - -Sources are back after brief downtime due to [DCMA takedown](https://github.com/github/dmca/blob/master/2014-02-12-WhatsApp.md). - -### Note July 30th, 2013 -*New policy:* - -*I no longer provide support to users who are trying to send bulk messages using this API (i.e. a large amount of messages and not the built-in bulk message functionality).* -*Sending advertisments on WhatsApp goes directly against their EULA and I have no way of determining whether the user is trying to send spam, advertising or sending mass messages to "opt-in users".* -*And I also don't want to waste the little spare time that I have on trying to figure out ways to fuck up this beautiful ad-free platform called WhatsApp by enabling people to send spam.* -*Everyone is free to use this API but there will be no more issue reports about being blocked after sending messages to semi-random users.* - -*In the famous words of Heath Ledger as the Joker (taken completely out of context by me):* - -**It's not about the money, it's about sending a message.** - -*\- [shirioko](https://github.com/shirioko)* - ----------- - -### Note July 14th, 2013 -*Events renamed:* -- *A large number of events have been renamed in the event handling system to better match the recent method names.* -- *All event names and parameters have been listed in the EVENTS.md file* - - ----------- - -### Note July 10th, 2013 -*Another massive overhaul in the code:* -- *MAJOR RENAMING OF MOST METHODS!! Old legacy code will break, we are sorry but it is necessary to provide a cleaner interface. Please check the new code.* -- *Methods renamed to give a more consistent feel to the API - all methods are now camelCase watch out for typo's!* -- *Initial movement towards bringing the code into alignment with PSR-2 (http://www.php-fig.org/psr/2/)* -- *There is absolutely NO, NONE, NADA, ZIP, 100% FREE of any need to use/enter a MAC address or IMEI in this code. DO NOT TRY!* -- *[New Android token used](https://github.com/karolsarnacki/whatsapp/commit/55d8233b852ecd9f6a6f845586e91e6fadbd0c44#L1L20) as WP7 one appears to no longer work. Long live the WP7 token?* - ----------- - - -### Note June 18th, 2013 - -*Big overhaul in the code. Big thanks to:* -- *[Ali Hubail](https://github.com/hubail) and* -- *[Ahmed Moh'd](http://fb.com/ahmed.mhd) for making this project happen (and adding me as a member)* -- *[Jannik Vogel](https://github.com/JayFoxRox) for helping me retrieve the latest WhatsApp token, someone should write a book about it some day..* -- *[Tarek Galal](https://github.com/tgalal) for providing the latest WhatsApp functionality in yowsup* -- *[Atans](https://github.com/atans) and* -- *[Jonathan Williamson](https://github.com/jonnywilliamson) for additional fixes* - -*\- [shirioko](https://github.com/shirioko)* - - +And everyone that contributes to it. ---------- ### What is WhatsApp? @@ -87,72 +26,14 @@ According to [the company](http://www.whatsapp.com/): > โ€œWhatsApp Messenger is a cross-platform mobile messenger that replaces SMS and works through the existing internet data plan of your device. WhatsApp is available for iPhone, BlackBerry, Android, Windows Phone, Nokia Symbian60 & S40 phones. Because WhatsApp Messenger uses the same internet data plan that you use for email and web browsing, there is no cost to message and stay in touch with your friends.โ€ -Late 2011 numbers: 1 billion messages per day, ~20 million users. - -### Modified XMPP -WhatsApp uses some sort of customized XMPP server, named internally as FunXMPP, which is basically some extended proprietary version. - -### Login procedure -Much like XMPP, WhatsApp uses JID (jabber id) and password to successfully login to the service. The password is generated by the server and received upon registration. - - -The JID is a concatenation between your countryโ€™s code and mobile number. - -Initial login uses Digest Access Authentication. - -### Message sending -Messages are basically sent as TCP packets, following WhatsAppโ€™s own format (unlike whatโ€™s defined in XMPP RFCs). - -Messages are application level encrypted using RC4 keystreams - -### Multimedia Message sending -Photos, Videos and Audio files shared with WhatsApp contacts are HTTP-uploaded to a server before being sent to the recipient(s) along with Base64 thumbnail of media file (if applicable) along with the generated HTTP link as the message body. - -### Event system -WhatsApi uses an event manager (created by [facine](https://github.com/facine)) which allows you to respond to certain events. - -List of events and example code on how to bind an event handler: -https://github.com/shirioko/WhatsAPI/wiki/WhatsApi-events - -# FAQ - - -- **Whatโ€™s with the hex chars floating all over the code?** - - Mostly WhatsAppโ€™s proprietary control chars/commands, or formatted data according to their serverโ€™s specifications, stored in predefined dictionaries within the clients. - -- **Whatโ€™s your future development plans?** - - We donโ€™t have any. - -- **Would it run over the web?** - - Weโ€™ve tested a slightly-modified version on top of Tornado Web Server and worked like a charm, however, building a chat client is a bit tricky, do your research. - -- **Can I receive chats?** - - Indeed, using the same socket-receiving mechanism. But you have to parse the incoming data. Parsing functions arenโ€™t included in this release, maybe in the next one? - -- **I think the code is messy.** - - Itโ€™s working. - -- **How can I obtain my password?** - - Register a number using WhatsAPI or intercept your phone's password using MissVenom - -# NOTES - -- This proof of concept is extensible to contain every feature that make a fully-fledged client, similar to the official ones, actually could be even better. - -- During the two weeks of analysis of service mechanisms, we stumbled upon serious design and security flaws (they fixed some of them since 2011). For a company with such massive user base, we expected better practises and engineering. +Jan. 2015: 30 billion messages per day, ~700 million users. # License -MIT - refer to the source code for the extra line. - -# Venomous +MIT -Team of Bahraini Developers. +# Terms and conditions -Ahmed Moh'd ([fb.com/ahmed.mhd](https://www.facebook.com/ahmed.mhd)) and Ali Hubail ([@hubail](https://twitter.com/hubail)) contributed to this release. +- You will NOT use this API for marketing purposes (spam, massive sending...). +- We do NOT give support to anyone that wants this API to send massive messages or similar. +- We reserve the right to block any user of this repository that does not meet these conditions. From d856d86cb0a9ebb727514011a2262e5ba5d53c88 Mon Sep 17 00:00:00 2001 From: mgp25 Date: Sun, 3 May 2015 20:23:15 +0200 Subject: [PATCH 358/436] Update README.md --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 41763461..af3b1fe0 100644 --- a/README.md +++ b/README.md @@ -19,6 +19,7 @@ For new WhatsApp updates check **[WhatsApp incoming updates log](https://github. Also Ahmed Moh'd (fb.com/ahmed.mhd) and Ali Hubail (@hubail) for making this project possible. And everyone that contributes to it. + ---------- ### What is WhatsApp? From d3f3b9ffd1750db969cb95e676be3bb7796a4c36 Mon Sep 17 00:00:00 2001 From: mgp25 Date: Tue, 5 May 2015 01:13:42 +0200 Subject: [PATCH 359/436] Fixes #685 --- src/whatsprot.class.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index 975ea108..44c72d0a 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -3314,6 +3314,9 @@ protected function processInboundDataNode(ProtocolNode $node, $autoReceipt = tru )); } break; + case "web": + //TODO + break; default: throw new Exception("Method $type not implemented"); } From 7cb0c1da8f008a59993fc1a40477eb59714bc148 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20P=C3=BCschel?= Date: Tue, 5 May 2015 09:32:15 +0200 Subject: [PATCH 360/436] allow optional identity file path parameter in constructor --- src/whatsprot.class.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index 44c72d0a..9145bdde 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -70,15 +70,14 @@ class WhatsProt * * @param string $number * The user phone number including the country code without '+' or '00'. - * @param string $identity - * The Device Identity token. Obtained during registration with this API - * or using Missvenom to sniff from your phone. * @param string $nickname * The user name. * @param $debug * Debug on or off, false by default. + * @param string $identityFile + * Path to identity file, overrides default path */ - public function __construct($number, $nickname, $debug = false) + public function __construct($number, $nickname, $debug = false, $identityFile = null) { $this->writer = new BinTreeNodeWriter(); $this->reader = new BinTreeNodeReader(); @@ -92,7 +91,7 @@ public function __construct($number, $nickname, $debug = false) Constants::DATA_FOLDER . DIRECTORY_SEPARATOR, $number); - $this->identity = $this->buildIdentity(); + $this->identity = $this->buildIdentity($identityFile); $this->name = $nickname; $this->loginStatus = Constants::DISCONNECTED_STATUS; @@ -2243,14 +2242,15 @@ protected function isLoggedIn(){ /** * Create an identity string * - * @param string $identity Identity. + * @param string $identity_file IdentityFile (optional). * @return string Correctly formatted identity * * @throws Exception Error when cannot write identity data to file. */ - protected function buildIdentity() + protected function buildIdentity($identity_file = null) { - $identity_file = sprintf('%s%s%sid.%s.dat', __DIR__, DIRECTORY_SEPARATOR, Constants::DATA_FOLDER . DIRECTORY_SEPARATOR, $this->phoneNumber); + if (!$identity_file) + $identity_file = sprintf('%s%s%sid.%s.dat', __DIR__, DIRECTORY_SEPARATOR, Constants::DATA_FOLDER . DIRECTORY_SEPARATOR, $this->phoneNumber); if (is_readable($identity_file)) { $data = urldecode(file_get_contents($identity_file)); From 773dca0e87aff2d51c70b0f7b2fc4bea4b360fd3 Mon Sep 17 00:00:00 2001 From: mgp25 Date: Tue, 5 May 2015 13:58:11 +0200 Subject: [PATCH 361/436] web sync notification --- src/events/AllEvents.php | 1 + src/whatsprot.class.php | 16 ++++++++++++++-- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/src/events/AllEvents.php b/src/events/AllEvents.php index 7194cdf7..abc046d6 100644 --- a/src/events/AllEvents.php +++ b/src/events/AllEvents.php @@ -111,4 +111,5 @@ public function onSendPong($mynumber, $msgid) {} public function onSendPresence($mynumber, $type, $name ) {} public function onSendStatusUpdate($mynumber, $txt ) {} public function onStreamError($data) {} + public function onWebSync($mynumber, $from, $id, $syncData, $code, $name) {} } diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index 44c72d0a..f9131c27 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -3314,8 +3314,20 @@ protected function processInboundDataNode(ProtocolNode $node, $autoReceipt = tru )); } break; - case "web": - //TODO + case "web": + if (($node->getChild(0)->getTag() == 'action') && ($node->getChild(0)->getAttribute('type') == 'sync')) + { + $data = $node->getChild(0)->getChildren(); + $this->eventManager()->fire("onWebSync", + array( + $this->phoneNumber, + $node->getAttribute('from'), + $node->getAttribute('id'), + $data[0]->getData(), + $data[1]->getData(), + $data[2]->getData() + )); + } break; default: throw new Exception("Method $type not implemented"); From e6dbd67c40df0d1887f5947bbfa4a1d4f962a829 Mon Sep 17 00:00:00 2001 From: mgp25 Date: Thu, 7 May 2015 12:20:38 +0200 Subject: [PATCH 362/436] 2.12.81 data update --- src/Constants.php | 4 ++-- src/token.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Constants.php b/src/Constants.php index 0f5ae991..a8a6e9f5 100644 --- a/src/Constants.php +++ b/src/Constants.php @@ -19,8 +19,8 @@ class Constants const WHATSAPP_REQUEST_HOST = 'v.whatsapp.net/v2/code'; // The request code host. const WHATSAPP_SERVER = 's.whatsapp.net'; // The hostname used to login/send messages. const WHATSAPP_DEVICE = 'S40'; // The device name. - const WHATSAPP_VER = '2.12.68'; // The WhatsApp version. - const WHATSAPP_USER_AGENT = 'WhatsApp/2.12.68 S40Version/14.26 Device/Nokia302'; // User agent used in request/registration code. + const WHATSAPP_VER = '2.12.81'; // The WhatsApp version. + const WHATSAPP_USER_AGENT = 'WhatsApp/2.12.81 S40Version/14.26 Device/Nokia302'; // User agent used in request/registration code. const WHATSAPP_VER_CHECKER = 'https://coderus.openrepos.net/whitesoft/whatsapp_version'; // Check WhatsApp version } diff --git a/src/token.php b/src/token.php index b9166990..9fadc320 100755 --- a/src/token.php +++ b/src/token.php @@ -20,7 +20,7 @@ function generateRequestToken($country, $phone) // return base64_encode($output); $const = 'PdA2DJyKoUrwLw1Bg6EIhzh502dF9noR9uFCllGk'; - $releaseTime = '1425519315543'; + $releaseTime = '1430860548912'; $token = md5($const . $releaseTime . $phone); return $token; From 797e56868ae4612f532a6441aed0fa7bb28b00f1 Mon Sep 17 00:00:00 2001 From: ducch Date: Thu, 7 May 2015 21:04:35 +0300 Subject: [PATCH 363/436] prevent unexpected behaviour when identity file is 0 and such --- src/whatsprot.class.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index fd7011c3..1257a3a9 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -77,7 +77,7 @@ class WhatsProt * @param string $identityFile * Path to identity file, overrides default path */ - public function __construct($number, $nickname, $debug = false, $identityFile = null) + public function __construct($number, $nickname, $debug = false, $identityFile = false) { $this->writer = new BinTreeNodeWriter(); $this->reader = new BinTreeNodeReader(); @@ -2247,9 +2247,9 @@ protected function isLoggedIn(){ * * @throws Exception Error when cannot write identity data to file. */ - protected function buildIdentity($identity_file = null) + protected function buildIdentity($identity_file = false) { - if (!$identity_file) + if ($identity_file === false) $identity_file = sprintf('%s%s%sid.%s.dat', __DIR__, DIRECTORY_SEPARATOR, Constants::DATA_FOLDER . DIRECTORY_SEPARATOR, $this->phoneNumber); if (is_readable($identity_file)) { From 804c0c9222caad47d49e69922a9da32e36acee8a Mon Sep 17 00:00:00 2001 From: mgp25 Date: Thu, 7 May 2015 20:44:14 +0200 Subject: [PATCH 364/436] Update createAuthBlob --- src/whatsprot.class.php | 1 - 1 file changed, 1 deletion(-) diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index 1257a3a9..2ee2f798 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -2016,7 +2016,6 @@ protected function createAuthBlob() $this->outputKey = new KeyStream($key[0], $key[1]); $this->reader->setKey($this->inputKey); //$this->writer->setKey($this->outputKey); - $phone = $this->dissectPhone(); $array = "\0\0\0\0" . $this->phoneNumber . $this->challengeData . time(); $this->challengeData = null; return $this->outputKey->EncodeMessage($array, 0, strlen($array), false); From 003d4bd56cfd1f4450e73a8d3e74bc84ac5a0d08 Mon Sep 17 00:00:00 2001 From: mgp25 Date: Fri, 8 May 2015 10:13:16 +0200 Subject: [PATCH 365/436] Added function update() You can update WA version and Token without waiting new commits --- src/Constants.php | 2 +- src/func.php | 10 +++++----- src/whatsprot.class.php | 20 ++++++++++++-------- 3 files changed, 18 insertions(+), 14 deletions(-) diff --git a/src/Constants.php b/src/Constants.php index a8a6e9f5..1e506373 100644 --- a/src/Constants.php +++ b/src/Constants.php @@ -21,6 +21,6 @@ class Constants const WHATSAPP_DEVICE = 'S40'; // The device name. const WHATSAPP_VER = '2.12.81'; // The WhatsApp version. const WHATSAPP_USER_AGENT = 'WhatsApp/2.12.81 S40Version/14.26 Device/Nokia302'; // User agent used in request/registration code. - const WHATSAPP_VER_CHECKER = 'https://coderus.openrepos.net/whitesoft/whatsapp_version'; // Check WhatsApp version + const WHATSAPP_VER_CHECKER = 'https://coderus.openrepos.net/whitesoft/whatsapp_scratch'; // Check WhatsApp version } diff --git a/src/func.php b/src/func.php index 4e323e02..ceeb6fa8 100755 --- a/src/func.php +++ b/src/func.php @@ -149,7 +149,7 @@ function videoThumbnail() { return '/9j/4QAYRXhpZgAASUkqAAgAAAAAAAAAAAAAAP/sABFEdWNreQABAAQAAABQAAD/4QMpaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wLwA8P3hwYWNrZXQgYmVnaW49Iu+7vyIgaWQ9Ilc1TTBNcENlaGlIenJlU3pOVGN6a2M5ZCI/PiA8eDp4bXBtZXRhIHhtbG5zOng9ImFkb2JlOm5zOm1ldGEvIiB4OnhtcHRrPSJBZG9iZSBYTVAgQ29yZSA1LjAtYzA2MCA2MS4xMzQ3NzcsIDIwMTAvMDIvMTItMTc6MzI6MDAgICAgICAgICI+IDxyZGY6UkRGIHhtbG5zOnJkZj0iaHR0cDovL3d3dy53My5vcmcvMTk5OS8wMi8yMi1yZGYtc3ludGF4LW5zIyI+IDxyZGY6RGVzY3JpcHRpb24gcmRmOmFib3V0PSIiIHhtbG5zOnhtcD0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wLyIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bXA6Q3JlYXRvclRvb2w9IkFkb2JlIFBob3Rvc2hvcCBDUzUgV2luZG93cyIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDo2MTQyRUVCOEI3MDgxMUUyQjNGQkY1OEU5M0U2MDE1MyIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDo2MTQyRUVCOUI3MDgxMUUyQjNGQkY1OEU5M0U2MDE1MyI+IDx4bXBNTTpEZXJpdmVkRnJvbSBzdFJlZjppbnN0YW5jZUlEPSJ4bXAuaWlkOjYxNDJFRUI2QjcwODExRTJCM0ZCRjU4RTkzRTYwMTUzIiBzdFJlZjpkb2N1bWVudElEPSJ4bXAuZGlkOjYxNDJFRUI3QjcwODExRTJCM0ZCRjU4RTkzRTYwMTUzIi8+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8+/+4ADkFkb2JlAGTAAAAAAf/bAIQAAgICAgICAgICAgMCAgIDBAMCAgMEBQQEBAQEBQYFBQUFBQUGBgcHCAcHBgkJCgoJCQwMDAwMDAwMDAwMDAwMDAEDAwMFBAUJBgYJDQsJCw0PDg4ODg8PDAwMDAwPDwwMDAwMDA8MDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwM/8AAEQgAZABkAwERAAIRAQMRAf/EALUAAAEEAwEBAQAAAAAAAAAAAAAGBwgJBAUKAwECAQEAAQUBAQAAAAAAAAAAAAAAAwECBAYHBQgQAAAFBAADBAUFDQkBAAAAAAECAwQFABEGByESCDFRIhNBYTIUCYEz07QVcZGhUmKCkqIjZWZ2OHKzJHSEJZUWNhcRAAIBAQMHCAgEBwEAAAAAAAABAgMRBAUhMdGScwYWQVGRseFSJAdhcaEiQrLSNcESE1PwgTJyI2M0F//aAAwDAQACEQMRAD8Av8oAoAoAoAoAoAoAoAoAoAoAoAoAoAoAoAoDHcPGjQomdOkWxShzGMqcpAAA9NzCHCgEe/2draKAxpPYONx4E4n95lWaVv01QoDBLtvXKxUDsspbSyTohTtV4wiz9NUpvZEijVNUpr+oaAZCa64umuEUXRPnLqScN1DJKt2ENKLmBQhuUxBN7qBQEBCw3GgHTf7gTaRDibb6+y5+ybslXwnK0aoiZJFIVjAQF3SYiblDgFqAhEx+KDrybyTHsbhNaThFckkmka0fzMnFx6CZ3ipUiHV8tdyYCgJuPC9APDvbZG/sS1lnubYkrBMZPDY5zJfYibhJ44VTbiAqcoHYn4JkAxh8Ijw7KAxOgHqKyfqK1FMTObyjWZy7GZ5aPkZVmVJNFw3WSI5anKmig2KSxTiQfBx5b3G9ATpoBP5ZKuYLFslm2ZElHkPFPHzVNfm8oyjdA6pAU5fFyiJQvbjagKXMj+IbmSbhw1hMhlpVqkPISTJFRkcCwhwMciShHByFEfZAxxNbt40A9nSx1JOd2LZxCZdO5QTI4b3eQimycr7sVePU/ZKmKDYEuKatuYA9BgoBout3Mdga5m8SnsYeShsNyVmZgsR1MSSoN5RpcxiiALAWyyRgMHrKNALPoj21D7HwvIseyLGYJ7m2GSBnKzpw3FZRzHPx5kVv2hhNdJQDJiN/xe+gIpddkJlWv9poZTDqlY4ns1sLxqmi2TBNvJNClSeNwMJRHxF5VShfsEe6gJndDu8pLYmm20JIySSeU6oXJCv1OVFJRSPOAqR7oR5QvcvMmI/jF9dAVz9Yelswg93zymDNJjJsWz9McgjEIQyz4GbhwYSvWhyNRP5YlWATkAQDwm4dlAWrdLWV7AyjS2HG2PjWTQ2bY0QYOXbSsRKCo/TZABWz0pfdzc5VkeUDflANAVi7o+Hdvd3t3OSaj1s7kNfyz77WxiROu0jwalff4g7YAdrInAWyphAvh7LekKAuT1hi24VNc4c32fg5i5w2iUY7MkE3sc4bO1UieQdUDlciBgXTABOAh2iIcaAxujTpaddMEZtSOPKouonOcpPLYxDpAJlI2NIUwIN11fZOoHOIDyXKBSl4iIjYCaVAJ/LW6jvFcmaIoi5VdRL1JJuWwioY6BygUL8OIjbjQHNDvpzgLrNwVxpvjaavlOCz44CVVvBmODo/uQpJugMAOAa8oORSAExU4l9NALHo/SScdQOF/wDX2kuko2RfLZA597S8r7MBAQcFUICPEDmEgBx9q1AT363ZbA4zQj1DIIl9MO5ObjkcbYqO00hF4mcVTrAYiQGAE0SnvbtvagIh9CCMPNbinZGGxd7AxUFjDks/IN5AwmU98VIm2bjzJiA3OUTcezlvQD+9cWdYtrHFMCbQ7B87yzIZpd21I+dIuwRYtERKuqBHCKpScx1CFASlAaAxOhrYGU7RPsKeyf7RJjGNFYxkGZsug1N9pK86y3lmbt0hHlR5QG4j20BreuHqayjUeT4FhuucyyuHlV4tzL5QmjLAYARXUKmyKYFEj2MPlnMFrcKAdfoo2LsbZ2scgzrZGW5fKISOQKMsSVPMGTN7sySKRyYPKTTKJRWMIAIgPZQETes/q22DgG7HuC6y2TmcLH4zDsksiQSl01SBJuAM4UDmWRUMAkSOmBgva/ooCc3SXkme5fojDMt2ZluZS+S5eo7k2LlSYMkqMcusJWRTFSTTLxIXmCxb2MF6AVXSXuyT2hvDqsxhtk8pPYHryWhWGJtZRYjszZcEnLeQMg55QUMmou3EQKcTWELltegJ+0B+FEyKpnSULzJqFEpyj6QELCFAcpmzcWLj21NhYtDFI3gYDIpaPiET3OqRu0dKJpFOe4cwgUoAI241tW5+B0MYvkqFdyUVBy92xO1NLlTyZTwN48Xnhd2jVgk25KOX1N/gLHTW0Mv0hKzs3isXByknPs02C7mXRWVFBBNTzRKj5Sqduc1uYRv2BXRX5a4Z+5V6Y/SaZHf28csI9D0mXunbuwd8BjieXkiYxpjHvBmDGIRVSSOq55QOqqCqqgiYClAoWtYKs/8AN8N/cq9MfpL+O7xyQj0PSZ+lty51omMnozD4bHX45I7SdycjLILquB8hMU0kiiksmAELcRtbtEatflxhv7lXpj9Jct+rx3I9D0iX3FlWZ75ydjlOZqsmTqMjiRkdHRaZ02qKJTmUMYpVTqG5lDmuYb+gKjfl3hq+Or0x+kuW/F47kPbpHa07u3YmlsLQwXD4bGl4sj1zIuH0g2cKO3Dl0ICc6p01yFHlApSlsHAAqN+X2HL46vTH6S5b7XjuQ9ukZzaMLO7lzqc2Fl0mCM7PAgRVuwTAjVuk2SBFJFAignMBSlC/ER4iI1G9wcOXx1elaCq30vHch7dJJvXG/dl6wwrFcBxeExT7AxBoVnHe9M3B1lQA4qHVXMVwUDHUOYTGEACrHuHh/fqdK0F63zvHch7dJEjLtPq5/k+T5dkeQPHE3mEi5k5pZMCFKZZ0fmOUlwEQKUPCUL8AAKs4Fw/v1OlaCvGVfuR9ukmybqd3BiuHCyg4bEI5li8IRjBpkZOQBuk1QBBAS3c25iAACH5VY1+3LuNC7VKsZVPzRg5LKrLUrcuTMTXTe6tWr06bhGyUkuXlfrHm+D7jccjqHaOaqpnWyrI8yOxmpVQ5jCsiybpuEgEo8AHzXixjD6eb1BXL07Ub+85bzVSgUBy9boNy7v2uP8Xz311auheWn3Kpsn8yNK39VtwhtF1MQAKca7W2cnUT1BSo2yVRMlI17CI2KHC49ny1FJkiiKBsTsrHlIlUTfN06x5SJFE3aCXZwqGUi9I3DdsJrcKjbK22G5TbJpJmVVMVNMgXOc3AAqiI2xu84fKPoKVTQAyTFJHmsPAVBAweI3q7gqDE4fluNfn/AE59Rl4XLxtHaR6yxj4RX9Pmcfz8++pM6+e45kdxlnZaxVxQKA5dN3m5d27WH+MZ764tXQfLX7lU2T+ZGm79K24w2i6mNuCldpbOVqJ7EPcQCopMlUR9tIIIOMgmEHCCblBSKEFEVSFOQweaXtKYBCvGxebVOLTsy/gZ9yinJ28w9EnqjGJLmVYFVgnJuIC28SN/WibgH5ohXlQxKrDP7y9OkzJ3OEs2QQkhrDJ4q526BJpsXj5zP27B3pG8QfJesuGIU558j9Okxp3WcfSadszOU4pqkMmoUbGSOUSmAfWUbCFZDdpjt2G4FRuyKHmjzqdpUC+0P3e75aKLZE5GrcC5fmAVfCkXimgX2Q9Y94+upoxUSNyE9lbLy8Wnj29loYf1i1h4q/A19nPqZl4VLxtDaR6ywf4RP9Pmcfz8++pM6+eY5kd2lnZaxVxQKA5b96m5d1bVH+Mp364tW/8Alv8AcqmyfzI0/fdW3GG0XUxrQU9ddnbOYqJmtjcxr1FJkiiSG0V/6WV9cWP96WvFxd/416zOuUfefqJYtyXtWutnpG2TOikUTmOFicREPR90ewKtsbLWxD5PleErFO2fkRmXIBy+W0KB1Sj/AJgtgL9+s+7XWussfdXp0GFXr0fiyv8AjlGUO1ZqulVGDZVq1ON0kFlfOUL/AGj2C/3q9yP5kvedr6DyJyTeTIjZosOAcPRVbSFyNJm7Ly8Myc9rcrA4/rFrBxR+Cr7Ofysy8KfjaG0j1k2/hE/0+Zx/Pz76kyr58jmR3yWdlrFXFAoDlp34Ntz7UH+M5364vW/+XH3Kpsn8yNS30/4obRdTGhFyQnaYa7KzmkUZjV+QtgAhjD8gVFJEqiPnp/J46DmpV/MOk41mMaKaahwMcx1BUKIEKUoCIjYOyvLxGhKrBKKtdpkXecYSbb5B2pHcwKCKWPxh1Q7CvX48pfulRIN/0hrDpYTyzf8AJaRUvy+FdIkHU/Pz5ry0ms4SEfC1IPlol9QJksH3716FO706X9K0nn1a8p52bNg1AAAAKAB6ACr2YzkKto1CxfDUbI2xRt2YCHs1Y2WNie2E0AmBZce1uWNUG/5xawsTfg6+zn8rM3Cn46htI9ZLL4RP9Pecfz6++pMq+f45kd/lnZaxVxQKA5Y+oI/LuTahr8BzSd4/6xet+8ufuM9k+tGqb4q25x/vXUxjTKCYbBXZWznKjYbmORuICPbVrRbKQuY9H2eAVY0Y8pC4YI+yNqjaIZSFqxR7OFWNETkLJikHDhUTI3IVzJELF7KjZY2KlogA24VEylpoNmNuXXOaGt2RSo/hLWDiL8JX2c/lZm4U/G0NpDrRIj4RSyJen7OEhUKCn/fnvgvx8TFmIcPkGuBRzI+g5Z2Wu1cWn4Nfhb0CFwoDnh3j0ub5ktr7HeMtWT8zGSOSychGycc3Mugqi6drLJKJqkAwCBk1AuFrgPAbCFejheK3jDK3613aUrLMqtTT5LDEvtxpXyn+nVVqtt5sozanSv1AIcf/AIrmNg9P2esIfgSrYuPsV70NRaTyHurcXyS1uw8y9OXUMh83pjLwt+7V/oacfYr3oai0kb3Rw98ktbsPcmiepdH5rTWXcO+NW+hpx9ivehqLSWvc7DnyT1noMkun+qlH5rTWWcP3Wr9DVOPcU56eotJbwZhvNPWegyC6z6ukfmtN5X8sUp9DVOPMU56ep2lvBWG809d6D2Lg/WWl81pnKf8AiT/Q1TjrE+enqdpTgjDOaeu9B7FxrraS+b0zlFg7P9oN9DVOOcS/16naU4Hwzmnr9hkkiOuwogCOlsnMPoD7HH6Gqcb4l/r1O0pwPhnNPX7DEnsM698mhn0G70llAMpFPy3HLGeWIlvew2IQRD1XrHvO92IXilKlJwSkrHZGx2PPltdlpPddz8Ou1WNWMZOUXarZNq1ZnZZyE0/h6aF6idVsX5c3xh1iOPykoZ8ES/EpHJjAkRIyp0wMPLzCXgA8eF61k2guO5T+Ty38XLb5aA9qALUB8sHdQBYO4KALB3BQBYO4KALB3BQBYO4KALB3BQBYO6gCwd1AfaAKAKAKAKAKAKAKAKAKAKAKAKAKAKA//9k='; } -function updateData($nameFile, $WAver, $classesMD5 = "") +function updateData($nameFile, $WAver, $WAToken) { $file = __DIR__ . "/" . $nameFile; $open = fopen($file, 'r+'); @@ -159,11 +159,11 @@ function updateData($nameFile, $WAver, $classesMD5 = "") $content = explode("\n", $content); if ($file == __DIR__ . '/token.php') { - $content[6] = ' $classesMd5 = ' . "\"" . trim($classesMD5) . "\"; // $WAver"; + $content[22] = ' $releaseTime = \'' . $WAToken .'\';'; } else { - if ($file == __DIR__ . '/whatsprot.class.php') { - $content[48] = ' const WHATSAPP_VER = \'' . trim($WAver) . '\'; // The WhatsApp version.'; - // $content[49] = ' const WHATSAPP_USER_AGENT = \'WhatsApp/' . trim($WAver) . ' Android/4.3 Device/GalaxyS3\'; // User agent used in request/registration code.'; + if ($file == __DIR__ . '/Constants.php') { + $content[21] = ' const WHATSAPP_VER = \'' . trim($WAver) . '\'; // The WhatsApp version.'; + $content[22] = ' const WHATSAPP_USER_AGENT = \'WhatsApp/' . trim($WAver) . ' S40Version/14.26 Device/Nokia302\'; // User agent used in request/registration code.'; } } diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index 2ee2f798..0a5d4f6b 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -392,6 +392,18 @@ public function codeRequest($method = 'sms', $carrier = "T-Mobile5") return $response; } + public function update() + { + $WAData = json_decode(file_get_contents(Constants::WHATSAPP_VER_CHECKER), true); + $Waver = $WAData['e']; + + if(Constants::WHATSAPP_VER != $WAver) + { + updateData('token.php', null, $WAData['h']); + updateData('Constants.php', $Waver); + } + } + /** * Connect (create a socket) to the WhatsApp network. * @@ -403,14 +415,6 @@ public function connect() return true; } - //$WAData = json_decode(file_get_contents(Constants::WHATSAPP_VER_CHECKER), true); - - // if(Constants::WHATSAPP_VER != $WAver) - // { - // updateData('token.php', $WAData->e, $WAData->h); - // updateData('whatsprot.class.php', $WAData->e); - // } - /* Create a TCP/IP socket. */ $socket = socket_create(AF_INET, SOCK_STREAM, SOL_TCP); if ($socket !== false) { From 1ce9b19d24d802b5ce169e7067700db074e90af5 Mon Sep 17 00:00:00 2001 From: mgp25 Date: Fri, 8 May 2015 12:05:06 +0200 Subject: [PATCH 366/436] Update codeRequest --- src/whatsprot.class.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index 0a5d4f6b..a719c568 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -254,7 +254,10 @@ public function codeRegister($code) $this->debugPrint($query); $this->debugPrint($response); - throw new Exception('An error occurred registering the registration code from WhatsApp.'); + if ($response->reason == 'old_version') + $this->update(); + + throw new Exception("An error occurred registering the registration code from WhatsApp. Reason: $response->reason"); } else { $this->eventManager()->fire("onCodeRegister", array( From 4754a42a4edf5adb73f0f2f4a1861200627fc743 Mon Sep 17 00:00:00 2001 From: mgp25 Date: Fri, 8 May 2015 12:55:01 +0200 Subject: [PATCH 367/436] update updateData() --- src/func.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/func.php b/src/func.php index ceeb6fa8..7deeda84 100755 --- a/src/func.php +++ b/src/func.php @@ -149,7 +149,7 @@ function videoThumbnail() { return '/9j/4QAYRXhpZgAASUkqAAgAAAAAAAAAAAAAAP/sABFEdWNreQABAAQAAABQAAD/4QMpaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wLwA8P3hwYWNrZXQgYmVnaW49Iu+7vyIgaWQ9Ilc1TTBNcENlaGlIenJlU3pOVGN6a2M5ZCI/PiA8eDp4bXBtZXRhIHhtbG5zOng9ImFkb2JlOm5zOm1ldGEvIiB4OnhtcHRrPSJBZG9iZSBYTVAgQ29yZSA1LjAtYzA2MCA2MS4xMzQ3NzcsIDIwMTAvMDIvMTItMTc6MzI6MDAgICAgICAgICI+IDxyZGY6UkRGIHhtbG5zOnJkZj0iaHR0cDovL3d3dy53My5vcmcvMTk5OS8wMi8yMi1yZGYtc3ludGF4LW5zIyI+IDxyZGY6RGVzY3JpcHRpb24gcmRmOmFib3V0PSIiIHhtbG5zOnhtcD0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wLyIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bXA6Q3JlYXRvclRvb2w9IkFkb2JlIFBob3Rvc2hvcCBDUzUgV2luZG93cyIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDo2MTQyRUVCOEI3MDgxMUUyQjNGQkY1OEU5M0U2MDE1MyIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDo2MTQyRUVCOUI3MDgxMUUyQjNGQkY1OEU5M0U2MDE1MyI+IDx4bXBNTTpEZXJpdmVkRnJvbSBzdFJlZjppbnN0YW5jZUlEPSJ4bXAuaWlkOjYxNDJFRUI2QjcwODExRTJCM0ZCRjU4RTkzRTYwMTUzIiBzdFJlZjpkb2N1bWVudElEPSJ4bXAuZGlkOjYxNDJFRUI3QjcwODExRTJCM0ZCRjU4RTkzRTYwMTUzIi8+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8+/+4ADkFkb2JlAGTAAAAAAf/bAIQAAgICAgICAgICAgMCAgIDBAMCAgMEBQQEBAQEBQYFBQUFBQUGBgcHCAcHBgkJCgoJCQwMDAwMDAwMDAwMDAwMDAEDAwMFBAUJBgYJDQsJCw0PDg4ODg8PDAwMDAwPDwwMDAwMDA8MDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwM/8AAEQgAZABkAwERAAIRAQMRAf/EALUAAAEEAwEBAQAAAAAAAAAAAAAGBwgJBAUKAwECAQEAAQUBAQAAAAAAAAAAAAAAAwECBAYHBQgQAAAFBAADBAUFDQkBAAAAAAECAwQFABEGByESCDFRIhNBYTIUCYEz07QVcZGhUmKCkqIjZWZ2OHKzJHSEJZUWNhcRAAIBAQMHCAgEBwEAAAAAAAABAgMRBAUhMdGScwYWQVGRseFSJAdhcaEiQrLSNcESE1PwgTJyI2M0F//aAAwDAQACEQMRAD8Av8oAoAoAoAoAoAoAoAoAoAoAoAoAoAoAoAoDHcPGjQomdOkWxShzGMqcpAAA9NzCHCgEe/2draKAxpPYONx4E4n95lWaVv01QoDBLtvXKxUDsspbSyTohTtV4wiz9NUpvZEijVNUpr+oaAZCa64umuEUXRPnLqScN1DJKt2ENKLmBQhuUxBN7qBQEBCw3GgHTf7gTaRDibb6+y5+ybslXwnK0aoiZJFIVjAQF3SYiblDgFqAhEx+KDrybyTHsbhNaThFckkmka0fzMnFx6CZ3ipUiHV8tdyYCgJuPC9APDvbZG/sS1lnubYkrBMZPDY5zJfYibhJ44VTbiAqcoHYn4JkAxh8Ijw7KAxOgHqKyfqK1FMTObyjWZy7GZ5aPkZVmVJNFw3WSI5anKmig2KSxTiQfBx5b3G9ATpoBP5ZKuYLFslm2ZElHkPFPHzVNfm8oyjdA6pAU5fFyiJQvbjagKXMj+IbmSbhw1hMhlpVqkPISTJFRkcCwhwMciShHByFEfZAxxNbt40A9nSx1JOd2LZxCZdO5QTI4b3eQimycr7sVePU/ZKmKDYEuKatuYA9BgoBout3Mdga5m8SnsYeShsNyVmZgsR1MSSoN5RpcxiiALAWyyRgMHrKNALPoj21D7HwvIseyLGYJ7m2GSBnKzpw3FZRzHPx5kVv2hhNdJQDJiN/xe+gIpddkJlWv9poZTDqlY4ns1sLxqmi2TBNvJNClSeNwMJRHxF5VShfsEe6gJndDu8pLYmm20JIySSeU6oXJCv1OVFJRSPOAqR7oR5QvcvMmI/jF9dAVz9Yelswg93zymDNJjJsWz9McgjEIQyz4GbhwYSvWhyNRP5YlWATkAQDwm4dlAWrdLWV7AyjS2HG2PjWTQ2bY0QYOXbSsRKCo/TZABWz0pfdzc5VkeUDflANAVi7o+Hdvd3t3OSaj1s7kNfyz77WxiROu0jwalff4g7YAdrInAWyphAvh7LekKAuT1hi24VNc4c32fg5i5w2iUY7MkE3sc4bO1UieQdUDlciBgXTABOAh2iIcaAxujTpaddMEZtSOPKouonOcpPLYxDpAJlI2NIUwIN11fZOoHOIDyXKBSl4iIjYCaVAJ/LW6jvFcmaIoi5VdRL1JJuWwioY6BygUL8OIjbjQHNDvpzgLrNwVxpvjaavlOCz44CVVvBmODo/uQpJugMAOAa8oORSAExU4l9NALHo/SScdQOF/wDX2kuko2RfLZA597S8r7MBAQcFUICPEDmEgBx9q1AT363ZbA4zQj1DIIl9MO5ObjkcbYqO00hF4mcVTrAYiQGAE0SnvbtvagIh9CCMPNbinZGGxd7AxUFjDks/IN5AwmU98VIm2bjzJiA3OUTcezlvQD+9cWdYtrHFMCbQ7B87yzIZpd21I+dIuwRYtERKuqBHCKpScx1CFASlAaAxOhrYGU7RPsKeyf7RJjGNFYxkGZsug1N9pK86y3lmbt0hHlR5QG4j20BreuHqayjUeT4FhuucyyuHlV4tzL5QmjLAYARXUKmyKYFEj2MPlnMFrcKAdfoo2LsbZ2scgzrZGW5fKISOQKMsSVPMGTN7sySKRyYPKTTKJRWMIAIgPZQETes/q22DgG7HuC6y2TmcLH4zDsksiQSl01SBJuAM4UDmWRUMAkSOmBgva/ooCc3SXkme5fojDMt2ZluZS+S5eo7k2LlSYMkqMcusJWRTFSTTLxIXmCxb2MF6AVXSXuyT2hvDqsxhtk8pPYHryWhWGJtZRYjszZcEnLeQMg55QUMmou3EQKcTWELltegJ+0B+FEyKpnSULzJqFEpyj6QELCFAcpmzcWLj21NhYtDFI3gYDIpaPiET3OqRu0dKJpFOe4cwgUoAI241tW5+B0MYvkqFdyUVBy92xO1NLlTyZTwN48Xnhd2jVgk25KOX1N/gLHTW0Mv0hKzs3isXByknPs02C7mXRWVFBBNTzRKj5Sqduc1uYRv2BXRX5a4Z+5V6Y/SaZHf28csI9D0mXunbuwd8BjieXkiYxpjHvBmDGIRVSSOq55QOqqCqqgiYClAoWtYKs/8AN8N/cq9MfpL+O7xyQj0PSZ+lty51omMnozD4bHX45I7SdycjLILquB8hMU0kiiksmAELcRtbtEatflxhv7lXpj9Jct+rx3I9D0iX3FlWZ75ydjlOZqsmTqMjiRkdHRaZ02qKJTmUMYpVTqG5lDmuYb+gKjfl3hq+Or0x+kuW/F47kPbpHa07u3YmlsLQwXD4bGl4sj1zIuH0g2cKO3Dl0ICc6p01yFHlApSlsHAAqN+X2HL46vTH6S5b7XjuQ9ukZzaMLO7lzqc2Fl0mCM7PAgRVuwTAjVuk2SBFJFAignMBSlC/ER4iI1G9wcOXx1elaCq30vHch7dJJvXG/dl6wwrFcBxeExT7AxBoVnHe9M3B1lQA4qHVXMVwUDHUOYTGEACrHuHh/fqdK0F63zvHch7dJEjLtPq5/k+T5dkeQPHE3mEi5k5pZMCFKZZ0fmOUlwEQKUPCUL8AAKs4Fw/v1OlaCvGVfuR9ukmybqd3BiuHCyg4bEI5li8IRjBpkZOQBuk1QBBAS3c25iAACH5VY1+3LuNC7VKsZVPzRg5LKrLUrcuTMTXTe6tWr06bhGyUkuXlfrHm+D7jccjqHaOaqpnWyrI8yOxmpVQ5jCsiybpuEgEo8AHzXixjD6eb1BXL07Ub+85bzVSgUBy9boNy7v2uP8Xz311auheWn3Kpsn8yNK39VtwhtF1MQAKca7W2cnUT1BSo2yVRMlI17CI2KHC49ny1FJkiiKBsTsrHlIlUTfN06x5SJFE3aCXZwqGUi9I3DdsJrcKjbK22G5TbJpJmVVMVNMgXOc3AAqiI2xu84fKPoKVTQAyTFJHmsPAVBAweI3q7gqDE4fluNfn/AE59Rl4XLxtHaR6yxj4RX9Pmcfz8++pM6+e45kdxlnZaxVxQKA5dN3m5d27WH+MZ764tXQfLX7lU2T+ZGm79K24w2i6mNuCldpbOVqJ7EPcQCopMlUR9tIIIOMgmEHCCblBSKEFEVSFOQweaXtKYBCvGxebVOLTsy/gZ9yinJ28w9EnqjGJLmVYFVgnJuIC28SN/WibgH5ohXlQxKrDP7y9OkzJ3OEs2QQkhrDJ4q526BJpsXj5zP27B3pG8QfJesuGIU558j9Okxp3WcfSadszOU4pqkMmoUbGSOUSmAfWUbCFZDdpjt2G4FRuyKHmjzqdpUC+0P3e75aKLZE5GrcC5fmAVfCkXimgX2Q9Y94+upoxUSNyE9lbLy8Wnj29loYf1i1h4q/A19nPqZl4VLxtDaR6ywf4RP9Pmcfz8++pM6+eY5kd2lnZaxVxQKA5b96m5d1bVH+Mp364tW/8Alv8AcqmyfzI0/fdW3GG0XUxrQU9ddnbOYqJmtjcxr1FJkiiSG0V/6WV9cWP96WvFxd/416zOuUfefqJYtyXtWutnpG2TOikUTmOFicREPR90ewKtsbLWxD5PleErFO2fkRmXIBy+W0KB1Sj/AJgtgL9+s+7XWussfdXp0GFXr0fiyv8AjlGUO1ZqulVGDZVq1ON0kFlfOUL/AGj2C/3q9yP5kvedr6DyJyTeTIjZosOAcPRVbSFyNJm7Ly8Myc9rcrA4/rFrBxR+Cr7Ofysy8KfjaG0j1k2/hE/0+Zx/Pz76kyr58jmR3yWdlrFXFAoDlp34Ntz7UH+M5364vW/+XH3Kpsn8yNS30/4obRdTGhFyQnaYa7KzmkUZjV+QtgAhjD8gVFJEqiPnp/J46DmpV/MOk41mMaKaahwMcx1BUKIEKUoCIjYOyvLxGhKrBKKtdpkXecYSbb5B2pHcwKCKWPxh1Q7CvX48pfulRIN/0hrDpYTyzf8AJaRUvy+FdIkHU/Pz5ry0ms4SEfC1IPlol9QJksH3716FO706X9K0nn1a8p52bNg1AAAAKAB6ACr2YzkKto1CxfDUbI2xRt2YCHs1Y2WNie2E0AmBZce1uWNUG/5xawsTfg6+zn8rM3Cn46htI9ZLL4RP9Pecfz6++pMq+f45kd/lnZaxVxQKA5Y+oI/LuTahr8BzSd4/6xet+8ufuM9k+tGqb4q25x/vXUxjTKCYbBXZWznKjYbmORuICPbVrRbKQuY9H2eAVY0Y8pC4YI+yNqjaIZSFqxR7OFWNETkLJikHDhUTI3IVzJELF7KjZY2KlogA24VEylpoNmNuXXOaGt2RSo/hLWDiL8JX2c/lZm4U/G0NpDrRIj4RSyJen7OEhUKCn/fnvgvx8TFmIcPkGuBRzI+g5Z2Wu1cWn4Nfhb0CFwoDnh3j0ub5ktr7HeMtWT8zGSOSychGycc3Mugqi6drLJKJqkAwCBk1AuFrgPAbCFejheK3jDK3613aUrLMqtTT5LDEvtxpXyn+nVVqtt5sozanSv1AIcf/AIrmNg9P2esIfgSrYuPsV70NRaTyHurcXyS1uw8y9OXUMh83pjLwt+7V/oacfYr3oai0kb3Rw98ktbsPcmiepdH5rTWXcO+NW+hpx9ivehqLSWvc7DnyT1noMkun+qlH5rTWWcP3Wr9DVOPcU56eotJbwZhvNPWegyC6z6ukfmtN5X8sUp9DVOPMU56ep2lvBWG809d6D2Lg/WWl81pnKf8AiT/Q1TjrE+enqdpTgjDOaeu9B7FxrraS+b0zlFg7P9oN9DVOOcS/16naU4Hwzmnr9hkkiOuwogCOlsnMPoD7HH6Gqcb4l/r1O0pwPhnNPX7DEnsM698mhn0G70llAMpFPy3HLGeWIlvew2IQRD1XrHvO92IXilKlJwSkrHZGx2PPltdlpPddz8Ou1WNWMZOUXarZNq1ZnZZyE0/h6aF6idVsX5c3xh1iOPykoZ8ES/EpHJjAkRIyp0wMPLzCXgA8eF61k2guO5T+Ty38XLb5aA9qALUB8sHdQBYO4KALB3BQBYO4KALB3BQBYO4KALB3BQBYO6gCwd1AfaAKAKAKAKAKAKAKAKAKAKAKAKAKAKA//9k='; } -function updateData($nameFile, $WAver, $WAToken) +function updateData($nameFile, $WAver, $WAToken = null) { $file = __DIR__ . "/" . $nameFile; $open = fopen($file, 'r+'); From fdfd5b0b433c16738ad0b31b6b722a0ecc17e773 Mon Sep 17 00:00:00 2001 From: ducch Date: Fri, 8 May 2015 15:43:27 +0300 Subject: [PATCH 368/436] remove redundant code that's never being used --- examples/whatsapp.php | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/examples/whatsapp.php b/examples/whatsapp.php index 3ec7f0de..9d1be139 100755 --- a/examples/whatsapp.php +++ b/examples/whatsapp.php @@ -721,7 +721,7 @@ private function webLogout() * * @return void */ - public function showWebLoginForm($error = null) + public function showWebLoginForm() { ob_start(); ?> @@ -782,11 +782,6 @@ public function showWebLoginForm($error = null)

'; - } - ?>
From 5cd74a67cbea288bb6f557527a9401cc89cd6bcc Mon Sep 17 00:00:00 2001 From: ducch Date: Fri, 8 May 2015 15:42:44 +0300 Subject: [PATCH 369/436] update phpdoc --- examples/whatsapp.php | 4 ++-- src/whatsprot.class.php | 13 ++++++++----- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/examples/whatsapp.php b/examples/whatsapp.php index 3ec7f0de..7582940d 100755 --- a/examples/whatsapp.php +++ b/examples/whatsapp.php @@ -719,7 +719,7 @@ private function webLogout() /** * Show Web app Login page * - * @return void + * @return string */ public function showWebLoginForm($error = null) { @@ -818,7 +818,7 @@ public function showWebLoginForm($error = null) /** * Show main Web App. * - * @return void + * @return string */ private function showWebForm() { diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index a719c568..60e1e120 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -74,7 +74,7 @@ class WhatsProt * The user name. * @param $debug * Debug on or off, false by default. - * @param string $identityFile + * @param mixed $identityFile * Path to identity file, overrides default path */ public function __construct($number, $nickname, $debug = false, $identityFile = false) @@ -1504,8 +1504,8 @@ public function sendMessage($to, $txt, $id = null) /** * Send a read receipt to a message. * - * @param $to The recipient. - * @param $id + * @param string $to The recipient. + * @param string $id */ public function sendMessageRead($to, $id) { @@ -2248,7 +2248,7 @@ protected function isLoggedIn(){ /** * Create an identity string * - * @param string $identity_file IdentityFile (optional). + * @param mixed $identity_file IdentityFile (optional). * @return string Correctly formatted identity * * @throws Exception Error when cannot write identity data to file. @@ -3399,7 +3399,8 @@ protected function processInboundDataNode(ProtocolNode $node, $autoReceipt = tru } /** - * @param $node ProtocolNode + * @param $node ProtocolNode + * @param $class string */ protected function sendAck($node, $class) { @@ -3851,6 +3852,7 @@ protected function sendMessageNode($to, $node, $id = null) * @param ProtocolNode $node The ProtocolTreeNode that contains the message. * @param string $type * @param string $participant + * @param string $callId */ protected function sendReceipt($node, $type = "read", $participant = null, $callId = null) { @@ -3986,6 +3988,7 @@ public static function parseJID($jid) /** * @param ProtocolNode $groupNode + * @param string $fromGetGroups */ protected function handleGroupV2InfoResponse(ProtocolNode $groupNode, $fromGetGroups = false) { From ca137ab52c74b44c4d8c6ca01bfeffd26022b28c Mon Sep 17 00:00:00 2001 From: ducch Date: Fri, 8 May 2015 15:50:12 +0300 Subject: [PATCH 370/436] remove redundant variable declaration --- src/tokenmap.class.php | 3 ++- src/whatsprot.class.php | 1 - 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/tokenmap.class.php b/src/tokenmap.class.php index 6218b455..c6d1a063 100755 --- a/src/tokenmap.class.php +++ b/src/tokenmap.class.php @@ -489,7 +489,7 @@ public static function GetToken($token, &$subdict, &$string) if (!$subdict && $token >= 236 && $token < (236 + count(self::$secondaryStrings))) { $subdict = true; } - $tokenMap = array(); + if ($subdict) { $tokenMap = self::$secondaryStrings; } else { @@ -499,6 +499,7 @@ public static function GetToken($token, &$subdict, &$string) if ($token < 0 || $token > count($tokenMap)) { return;//fail } + $string = $tokenMap[$token]; if (!$string) { throw new Exception("Invalid token/length in GetToken"); diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index a719c568..3d0413f2 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -3561,7 +3561,6 @@ protected function processUploadResponse($node) $filepath = $this->mediaQueue[$id]['filePath']; $to = $this->mediaQueue[$id]['to']; - $icon = ""; switch ($filetype) { case "image": $caption = $this->mediaQueue[$id]['caption']; From 7f988e439fdf342c1c0da7be5a6ba17aa33314ce Mon Sep 17 00:00:00 2001 From: mgp25 Date: Mon, 11 May 2015 15:14:05 +0200 Subject: [PATCH 371/436] Fixes #713 --- src/whatsprot.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index 315b8e9a..2f365d5a 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -248,7 +248,7 @@ public function codeRegister($code) $this->phoneNumber, $response->status, $response->reason, - $response->retry_after + isset($response->retry_after) ? $response->retry_after : null )); $this->debugPrint($query); From 6cf1ea23766377178045c02c612e01917e2f5701 Mon Sep 17 00:00:00 2001 From: mgp25 Date: Tue, 12 May 2015 18:53:53 +0200 Subject: [PATCH 372/436] Fix typo --- src/whatsprot.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index 2f365d5a..e5b1fde7 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -398,12 +398,12 @@ public function codeRequest($method = 'sms', $carrier = "T-Mobile5") public function update() { $WAData = json_decode(file_get_contents(Constants::WHATSAPP_VER_CHECKER), true); - $Waver = $WAData['e']; + $WAver = $WAData['e']; if(Constants::WHATSAPP_VER != $WAver) { updateData('token.php', null, $WAData['h']); - updateData('Constants.php', $Waver); + updateData('Constants.php', $WAver); } } From f37c99d4456570f9ee019de1caf701adbedbe601 Mon Sep 17 00:00:00 2001 From: mgp25 Date: Thu, 14 May 2015 19:43:24 +0200 Subject: [PATCH 373/436] correct iq id --- src/whatsprot.class.php | 87 ++++++++++++++++++++++++----------------- 1 file changed, 51 insertions(+), 36 deletions(-) diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index e5b1fde7..e14bf752 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -51,6 +51,7 @@ class WhatsProt protected $mediaFileInfo = array(); // Media File Information protected $mediaQueue = array(); // Queue for media message nodes protected $messageCounter = 1; // Message counter for auto-id. + protected $iqCounter = 1; protected $messageQueue = array(); // Queue for received messages. protected $name; // The user name. protected $newMsgBind = false; // @@ -586,7 +587,7 @@ public function sendActiveStatus() */ public function sendGetCipherKeysFromUser($number) { - $msgId = $this->createMsgId(); + $msgId = $this->createIqId(); $userNode = new ProtocolNode("user", array( @@ -733,7 +734,7 @@ public function sendBroadcastVideo($targets, $path, $storeURLmedia = false, $fsi */ public function sendDeleteBroadcastLists($lists) { - $msgId = $this->createMsgId(); + $msgId = $this->createIqId(); $listNode = array(); if ($lists != null && count($lists) > 0) { for ($i = 0; $i < count($lists); $i++) { @@ -761,7 +762,7 @@ public function sendDeleteBroadcastLists($lists) */ protected function sendClearDirty($categories) { - $msgId = $this->createMsgId(); + $msgId = $this->createIqId(); $catnodes = array(); foreach ($categories as $category) { @@ -787,7 +788,7 @@ public function sendClientConfig() $child = new ProtocolNode("config", $attr, null, ""); $node = new ProtocolNode("iq", array( - "id" => $this->createMsgId(), + "id" => $this->createIqId(), "type" => "set", "xmlns" => "urn:xmpp:whatsapp:push", "to" => Constants::WHATSAPP_SERVER @@ -798,7 +799,7 @@ public function sendClientConfig() public function sendGetClientConfig() { - $msgId = $this->createMsgId(); + $msgId = $this->createIqId(); $child = new ProtocolNode("config", null, null, null); $node = new ProtocolNode("iq", array( @@ -820,7 +821,7 @@ public function sendGetClientConfig() */ public function sendChangeNumber($number, $identity) { - $msgId = $this->createMsgId(); + $msgId = $this->createIqId(); $usernameNode = new ProtocolNode("username", null, null, $number); $passwordNode = new ProtocolNode("password", null, null, urldecode($identity)); @@ -856,7 +857,7 @@ public function sendGetGroups() */ public function sendGetGroupV2Info($groupID) { - $msgId = $this->nodeId['get_groupv2_info'] = $this->createMsgId(); + $msgId = $this->nodeId['get_groupv2_info'] = $this->createIqId(); $queryNode = new ProtocolNode("query", array( @@ -880,7 +881,7 @@ public function sendGetGroupV2Info($groupID) */ public function sendGetPrivacyBlockedList() { - $msgId = $this->nodeId['privacy'] = $this->createMsgId(); + $msgId = $this->nodeId['privacy'] = $this->createIqId(); $child = new ProtocolNode("list", array( "name" => "default" @@ -903,7 +904,7 @@ public function sendGetPrivacyBlockedList() */ public function sendGetPrivacySettings() { - $msgId = $this->createMsgId(); + $msgId = $this->createIqId(); $privacyNode = new ProtocolNode("privacy", null, null, null); $node = new ProtocolNode("iq", array( @@ -927,7 +928,7 @@ public function sendGetPrivacySettings() */ public function sendSetPrivacySettings($category, $value) { - $msgId = $this->createMsgId(); + $msgId = $this->createIqId(); $categoryNode = new ProtocolNode("category", array( "name" => $category, @@ -957,7 +958,7 @@ public function sendSetPrivacySettings($category, $value) */ public function sendGetProfilePicture($number, $large = false) { - $msgId = $this->createMsgId(); + $msgId = $this->createIqId(); $hash = array(); $hash["type"] = "image"; @@ -988,7 +989,7 @@ public function sendGetProfilePhotoIds($numbers) $numbers = array($numbers); } - $msgId = $this->createMsgId(); + $msgId = $this->createIqId(); $userNode = array(); for ($i=0; $i < count($numbers); $i++) { @@ -1023,7 +1024,7 @@ public function sendGetProfilePhotoIds($numbers) */ public function sendGetRequestLastSeen($to) { - $msgId = $this->createMsgId(); + $msgId = $this->createIqId(); $queryNode = new ProtocolNode("query", null, null, null); @@ -1044,7 +1045,7 @@ public function sendGetRequestLastSeen($to) */ public function sendGetServerProperties() { - $id = $this->createMsgId(); + $id = $this->createIqId(); $child = new ProtocolNode("props", null, null, null); $node = new ProtocolNode("iq", array( @@ -1068,7 +1069,7 @@ public function sendGetServerProperties() public function sendGetServicePricing($lg, $lc) { - $msgId = $this->createMsgId(); + $msgId = $this->createIqId(); $pricingNode = new ProtocolNode("pricing", array( "lg" => $lg, @@ -1091,7 +1092,7 @@ public function sendGetServicePricing($lg, $lc) public function sendExtendAccount() { - $msgId = $this->createMsgId(); + $msgId = $this->createIqId(); $extendingNode = new ProtocolNode("extend", null, null, null); $node = new ProtocolNode("iq", array( @@ -1109,7 +1110,7 @@ public function sendExtendAccount() */ public function sendGetBroadcastLists() { - $msgId = $this->nodeId['get_lists'] = $this->createMsgId(); + $msgId = $this->nodeId['get_lists'] = $this->createIqId(); $listsNode = new ProtocolNode("lists", null, null, null); $node = new ProtocolNode("iq", array( @@ -1130,7 +1131,7 @@ public function sendGetBroadcastLists() */ public function sendGetNormalizedJid($countryCode, $number) { - $msgId = $this->createMsgId(); + $msgId = $this->createIqId(); $ccNode = new ProtocolNode("cc", null, null, $countryCode); $inNode = new ProtocolNode("in", null, null, $number); $normalizeNode = new ProtocolNode("normalize", null, array($ccNode, $inNode), null); @@ -1154,7 +1155,7 @@ public function sendGetNormalizedJid($countryCode, $number) */ public function sendRemoveAccount($lg = null, $lc = null, $feedback = null) { - $msgId = $this->createMsgId(); + $msgId = $this->createIqId(); if ($feedback != null && strlen($feedback) > 0) { if ($lg == null) { @@ -1192,7 +1193,7 @@ public function sendRemoveAccount($lg = null, $lc = null, $feedback = null) */ public function sendPing() { - $msgId = $this->createMsgId(); + $msgId = $this->createIqId(); $pingNode = new ProtocolNode("ping", null, null, null); $node = new ProtocolNode("iq", array( @@ -1213,7 +1214,7 @@ public function sendPing() public function sendGetHasVoipEnabled($jids) { - $msgId = $this->createMsgId(); + $msgId = $this->createIqId(); if (!is_array($jids)) { @@ -1258,7 +1259,7 @@ public function sendGetStatuses($jids) "to" => Constants::WHATSAPP_SERVER, "type" => "get", "xmlns" => "status", - "id" => $this->createMsgId() + "id" => $this->createIqId() ), array( new ProtocolNode("status", null, $children, null) ), null); @@ -1290,7 +1291,7 @@ public function sendGroupsChatCreate($subject, $participants) ), null, null); } - $id = $this->nodeId['groupcreate'] = $this->createMsgId(); + $id = $this->nodeId['groupcreate'] = $this->createIqId(); $createNode = new ProtocolNode("create", array( @@ -1329,7 +1330,7 @@ public function sendSetGroupSubject($gjid, $subject) $child = new ProtocolNode("subject", null, null, $subject); $node = new ProtocolNode("iq", array( - "id" => $this->createMsgId(), + "id" => $this->createIqId(), "type" => "set", "to" => $this->getJID($gjid), "xmlns" => "w:g2" @@ -1345,7 +1346,7 @@ public function sendSetGroupSubject($gjid, $subject) */ public function sendGroupsLeave($gjids) { - $msgId = $this->nodeId['leavegroup'] = $this->createMsgId(); + $msgId = $this->nodeId['leavegroup'] = $this->createIqId(); if (!is_array($gjids)) { $gjids = array($this->getJID($gjids)); @@ -1443,7 +1444,7 @@ public function sendDemoteParticipants($gId, $participants) */ public function sendLockGroup($gId) { - $msgId = $this->createMsgId(); + $msgId = $this->createIqId(); $lockedNode = new ProtocolNode("locked", null, null, null); $node = new ProtocolNode("iq", array( @@ -1465,7 +1466,7 @@ public function sendLockGroup($gId) */ public function sendUnlockGroup($gId) { - $msgId = $this->createMsgId(); + $msgId = $this->createIqId(); $unlockedNode = new ProtocolNode("unlocked", null, null, null); $node = new ProtocolNode("iq", array( @@ -1799,7 +1800,7 @@ public function sendSetPrivacyBlockedList($blockedJids = array()) $child2 = new ProtocolNode("query", null, array($child), null); $node = new ProtocolNode("iq", array( - "id" => $this->createMsgId(), + "id" => $this->createIqId(), "xmlns" => "jabber:iq:privacy", "type" => "set" ), array($child2), null); @@ -1822,7 +1823,7 @@ public function sendSetProfilePicture($path) */ public function sendRemoveProfilePicture() { - $msgId = $this->createMsgId(); + $msgId = $this->createIqId(); $picture = new ProtocolNode("picture", null, null, null); @@ -1856,7 +1857,7 @@ public function sendSetRecoveryToken($token) $node = new ProtocolNode("iq", array( - "id" => $this->createMsgId(), + "id" => $this->createIqId(), "type" => "set", "to" => Constants::WHATSAPP_SERVER ), array($child), null); @@ -1876,7 +1877,7 @@ public function sendStatusUpdate($txt) array( "to" => Constants::WHATSAPP_SERVER, "type" => "set", - "id" => $this->createMsgId(), + "id" => $this->createIqId(), "xmlns" => "status" ), array($child), null); @@ -2070,6 +2071,20 @@ protected function createMsgId() return $this->loginTime . "-" . $msgid; } + /** + * iq id + * + * @return string + * Iq id + */ + protected function createIqId() + { + $iqId = $this->iqCounter; + $this->iqCounter++; + + return dechex($iqId); + } + /** * Print a message to the debug console. * @@ -2333,7 +2348,7 @@ public function sendSync(array $numbers, array $deletedNumbers = null, $syncType $context = "background"; } - $id = $this->createMsgId(); + $id = $this->createIqId(); $node = new ProtocolNode("iq", array( @@ -3124,7 +3139,7 @@ protected function processInboundDataNode(ProtocolNode $node, $autoReceipt = tru } if ($node->getTag() == "message" && $node->getAttribute('type') == "media" && $node->getChild(0)->getAttribute('type') == "image" ) { - $msgId = $this->createMsgId(); + $msgId = $this->createIqId(); $ackNode = new ProtocolNode("ack", array( @@ -3765,7 +3780,7 @@ protected function sendData($data) */ protected function sendGetGroupsFiltered($type) { - $msgID = $this->nodeId['getgroups'] = $this->createMsgId(); + $msgID = $this->nodeId['getgroups'] = $this->createIqId(); $child = new ProtocolNode($type, null, null, null); $node = new ProtocolNode("iq", array( @@ -3908,7 +3923,7 @@ protected function sendNode($node, $encrypt = true) */ protected function sendRequestFileUpload($b64hash, $type, $size, $filepath, $to, $caption = "") { - $id = $this->createMsgId(); + $id = $this->createIqId(); if (!is_array($to)) { $to = $this->getJID($to); @@ -3952,7 +3967,7 @@ protected function sendRequestFileUpload($b64hash, $type, $size, $filepath, $to, */ protected function sendSetPicture($jid, $filepath) { - $nodeID = $this->createMsgId(); + $nodeID = $this->createIqId(); $data = preprocessProfilePicture($filepath); $preview = createIconGD($filepath, 96, true); From b9bb9c2641b6a58df6c0e25697a87abce5689000 Mon Sep 17 00:00:00 2001 From: ducch Date: Sat, 16 May 2015 18:51:10 +0300 Subject: [PATCH 374/436] update phpdoc --- src/whatsprot.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index 60e1e120..5b072dec 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -1206,7 +1206,7 @@ public function sendPing() } /** - * Get VOIP information of a number or numbers. + * Get VoIP information of a number or numbers. * * @param mixed $jids */ @@ -3988,7 +3988,7 @@ public static function parseJID($jid) /** * @param ProtocolNode $groupNode - * @param string $fromGetGroups + * @param mixed $fromGetGroups */ protected function handleGroupV2InfoResponse(ProtocolNode $groupNode, $fromGetGroups = false) { From f1d923f353d5254e59d35270dd89868e690a1887 Mon Sep 17 00:00:00 2001 From: mgp25 Date: Mon, 18 May 2015 10:23:35 +0200 Subject: [PATCH 375/436] 2.12.82 data --- src/Constants.php | 4 ++-- src/token.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Constants.php b/src/Constants.php index 1e506373..2b5bbb96 100644 --- a/src/Constants.php +++ b/src/Constants.php @@ -19,8 +19,8 @@ class Constants const WHATSAPP_REQUEST_HOST = 'v.whatsapp.net/v2/code'; // The request code host. const WHATSAPP_SERVER = 's.whatsapp.net'; // The hostname used to login/send messages. const WHATSAPP_DEVICE = 'S40'; // The device name. - const WHATSAPP_VER = '2.12.81'; // The WhatsApp version. - const WHATSAPP_USER_AGENT = 'WhatsApp/2.12.81 S40Version/14.26 Device/Nokia302'; // User agent used in request/registration code. + const WHATSAPP_VER = '2.12.82'; // The WhatsApp version. + const WHATSAPP_USER_AGENT = 'WhatsApp/2.12.82 S40Version/14.26 Device/Nokia302'; // User agent used in request/registration code. const WHATSAPP_VER_CHECKER = 'https://coderus.openrepos.net/whitesoft/whatsapp_scratch'; // Check WhatsApp version } diff --git a/src/token.php b/src/token.php index 9fadc320..68b9b916 100755 --- a/src/token.php +++ b/src/token.php @@ -20,7 +20,7 @@ function generateRequestToken($country, $phone) // return base64_encode($output); $const = 'PdA2DJyKoUrwLw1Bg6EIhzh502dF9noR9uFCllGk'; - $releaseTime = '1430860548912'; + $releaseTime = '1431039885607'; $token = md5($const . $releaseTime . $phone); return $token; From c1efc16163911133e80c0087c612b52292d5fd63 Mon Sep 17 00:00:00 2001 From: mgp25 Date: Tue, 19 May 2015 14:27:47 +0200 Subject: [PATCH 376/436] getMediaFile updated --- src/whatsprot.class.php | 55 +++++++++++------------------------------ 1 file changed, 15 insertions(+), 40 deletions(-) diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index 05b83e77..225413bc 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -2408,70 +2408,45 @@ protected function getJID($number) * * @return bool false if file information can not be obtained. */ - protected function getMediaFile($filepath, $maxsizebytes = 1048576) + protected function getMediaFile($filepath, $maxsizebytes = 5242880) { if (filter_var($filepath, FILTER_VALIDATE_URL) !== false) { $this->mediaFileInfo = array(); $this->mediaFileInfo['url'] = $filepath; - //File is a URL. Create a curl connection but DON'T download the body content - //because we want to see if file is too big. - $curl = curl_init(); - curl_setopt($curl, CURLOPT_URL, "$filepath"); - curl_setopt($curl, CURLOPT_USERAGENT, "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.11) Gecko/20071127 Firefox/2.0.0.11"); - curl_setopt($curl, CURLOPT_RETURNTRANSFER, true); - curl_setopt($curl, CURLOPT_HEADER, false); - curl_setopt($curl, CURLOPT_NOBODY, true); + $image = file_get_contents($filepath); + $filesize = strlen($image); - if (curl_exec($curl) === false) { - return false; - } + $file_info = new finfo(FILEINFO_MIME_TYPE); + $mime_type = $file_info->buffer($image); - //While we're here, get mime type and filesize and extension - $info = curl_getinfo($curl); - $this->mediaFileInfo['filesize'] = $info['download_content_length']; - $this->mediaFileInfo['filemimetype'] = $info['content_type']; - $this->mediaFileInfo['fileextension'] = pathinfo(parse_url($this->mediaFileInfo['url'], PHP_URL_PATH), PATHINFO_EXTENSION); + $this->mediaFileInfo['filemimetype'] = $mime_type; - //Only download file if it's not too big - //TODO check what max file size whatsapp server accepts. if ($this->mediaFileInfo['filesize'] < $maxsizebytes) { - //Create temp file in media folder. Media folder must be writable! $this->mediaFileInfo['filepath'] = tempnam(__DIR__ . DIRECTORY_SEPARATOR . Constants::DATA_FOLDER . DIRECTORY_SEPARATOR . Constants::MEDIA_FOLDER, 'WHA'); - $fp = fopen($this->mediaFileInfo['filepath'], 'w'); - if ($fp) { - curl_setopt($curl, CURLOPT_NOBODY, false); - curl_setopt($curl, CURLOPT_BUFFERSIZE, 1024); - curl_setopt($curl, CURLOPT_FILE, $fp); - curl_exec($curl); - fclose($fp); - } else { - unlink($this->mediaFileInfo['filepath']); - curl_close($curl); - return false; - } - //Success - curl_close($curl); + file_put_contents($this->mediaFileInfo['filepath'], $image); + $size = getimagesize($this->mediaFileInfo['filepath']); + $extension = ltrim (image_type_to_extension($size[2]), '.'); + + $this->mediaFileInfo['fileextension'] = $extension; + $this->mediaFileInfo['filesize'] = $filesize; + unlink($this->mediaFileInfo['filepath']); return true; } else { - //File too big. Don't Download. - curl_close($curl); return false; } } else if (file_exists($filepath)) { //Local file $this->mediaFileInfo['filesize'] = filesize($filepath); if ($this->mediaFileInfo['filesize'] < $maxsizebytes) { - $this->mediaFileInfo['filepath'] = $filepath; + $this->mediaFileInfo['filepath'] = $filepath; $this->mediaFileInfo['fileextension'] = pathinfo($filepath, PATHINFO_EXTENSION); - $this->mediaFileInfo['filemimetype'] = get_mime($filepath); + $this->mediaFileInfo['filemimetype'] = get_mime($filepath); return true; } else { - //File too big return false; } } - //Couldn't tell what file was, local or URL. return false; } From 34d9d179793b6152d2fe0ffeb555b158640c71e1 Mon Sep 17 00:00:00 2001 From: ludufre Date: Tue, 19 May 2015 17:23:54 -0300 Subject: [PATCH 377/436] Fix Send Media issues - Fix `Undefined index: filesize` in getMediaFile() - Fix `failed to open stream: No such file or directory` in getMediaFile() - Fix missing '.' in stored media extension --- src/whatsprot.class.php | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index 225413bc..2ff7419c 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -2404,7 +2404,7 @@ protected function getJID($number) * Retrieves media file and info from either a URL or localpath * * @param string $filepath The URL or path to the mediafile you wish to send - * @param integer $maxsizebytes The maximum size in bytes the media file can be. Default 1MB + * @param integer $maxsizebytes The maximum size in bytes the media file can be. Default 5MB * * @return bool false if file information can not be obtained. */ @@ -2415,7 +2415,7 @@ protected function getMediaFile($filepath, $maxsizebytes = 5242880) $this->mediaFileInfo['url'] = $filepath; $image = file_get_contents($filepath); - $filesize = strlen($image); + $this->mediaFileInfo['filesize'] = strlen($image); $file_info = new finfo(FILEINFO_MIME_TYPE); $mime_type = $file_info->buffer($image); @@ -2427,10 +2427,7 @@ protected function getMediaFile($filepath, $maxsizebytes = 5242880) file_put_contents($this->mediaFileInfo['filepath'], $image); $size = getimagesize($this->mediaFileInfo['filepath']); $extension = ltrim (image_type_to_extension($size[2]), '.'); - $this->mediaFileInfo['fileextension'] = $extension; - $this->mediaFileInfo['filesize'] = $filesize; - unlink($this->mediaFileInfo['filepath']); return true; } else { return false; @@ -3467,7 +3464,7 @@ protected function processTempMediaFile($storeURLmedia) if (isset($this->mediaFileInfo['url'])) { if ($storeURLmedia) { if (is_file($this->mediaFileInfo['filepath'])) { - rename($this->mediaFileInfo['filepath'], $this->mediaFileInfo['filepath'] . $this->mediaFileInfo['fileextension']); + rename($this->mediaFileInfo['filepath'], $this->mediaFileInfo['filepath'].'.'.$this->mediaFileInfo['fileextension']); } } else { if (is_file($this->mediaFileInfo['filepath'])) { From d22e69f33b82465bc6f28c48d88414bd98fc34cf Mon Sep 17 00:00:00 2001 From: Felipe Rodrigues Date: Thu, 21 May 2015 10:51:03 -0300 Subject: [PATCH 378/436] Send receipt before fire event Actually, if we handle the received messages and answer that, the answer message is sent before the receipt node. --- src/whatsprot.class.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index 2ff7419c..914a5862 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -2603,6 +2603,9 @@ protected function processInboundDataNode(ProtocolNode $node, $autoReceipt = tru } if ($node->getAttribute("type") == "text" && $node->getChild('body') != null) { $author = $node->getAttribute("participant"); + if ($autoReceipt) { + $this->sendReceipt($node, $type, $author); + } if ($author == "") { //private chat message $this->eventManager()->fire("onGetMessage", @@ -2634,9 +2637,6 @@ protected function processInboundDataNode(ProtocolNode $node, $autoReceipt = tru )); } - if ($autoReceipt) { - $this->sendReceipt($node, $type, $author); - } } if ($node->getAttribute("type") == "text" && $node->getChild(0)->getTag() == 'enc') { // TODO From e48aa47c1bfa61d2edc0a15815ba1230a22df88e Mon Sep 17 00:00:00 2001 From: gerhard Date: Fri, 22 May 2015 09:04:52 +0200 Subject: [PATCH 379/436] fixed onGetGroupMessage fire to save incoming messages to messageStore. --- src/whatsprot.class.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index 2ff7419c..7161df69 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -2632,6 +2632,9 @@ protected function processInboundDataNode(ProtocolNode $node, $autoReceipt = tru $node->getAttribute("notify"), $node->getChild("body")->getData() )); + if ($this->messageStore !== null) { + $this->messageStore->saveMessage($author,$node->getAttribute('from'), $node->getChild("body")->getData(), $node->getAttribute('id'), $node->getAttribute('t')); + } } if ($autoReceipt) { From ec1a438d6405e15a52faae5ce82d15fa7c3bc524 Mon Sep 17 00:00:00 2001 From: mgp25 Date: Sat, 23 May 2015 10:19:56 +0200 Subject: [PATCH 380/436] fix glitch lastseen --- src/whatsprot.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index 2ff7419c..b455f7fc 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -2949,6 +2949,7 @@ protected function processInboundDataNode(ProtocolNode $node, $autoReceipt = tru $this->phoneNumber, $blockedJids )); + return; } $this->eventManager()->fire("onGetRequestLastSeen", array( @@ -2957,7 +2958,6 @@ protected function processInboundDataNode(ProtocolNode $node, $autoReceipt = tru $node->getAttribute('id'), $node->getChild(0)->getAttribute('seconds') )); - array_push($this->messageQueue, $node); } if ($node->getChild("props") != null) { //server properties From e5157ff4212670fd11fcf3aea094335b5ac759f1 Mon Sep 17 00:00:00 2001 From: mgp25 Date: Sat, 23 May 2015 10:35:38 +0200 Subject: [PATCH 381/436] Added waitForServer --- src/whatsprot.class.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index 4a90fdcb..35b93ca5 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -1013,6 +1013,7 @@ public function sendGetProfilePhotoIds($numbers) ), array($listNode), null); $this->sendNode($iqNode); + $this->waitForServer($msgId); return true; } @@ -1254,17 +1255,20 @@ public function sendGetStatuses($jids) $children[] = new ProtocolNode("user", array("jid" => $this->getJID($jid)), null, null); } + $iqId = $this->createIqId(); + $node = new ProtocolNode("iq", array( "to" => Constants::WHATSAPP_SERVER, "type" => "get", "xmlns" => "status", - "id" => $this->createIqId() + "id" => $iqId; ), array( new ProtocolNode("status", null, $children, null) ), null); $this->sendNode($node); + $this->waitForServer($iqId); } /** From bac10291c15cf8fd51710a2b313df6af6684cef8 Mon Sep 17 00:00:00 2001 From: mgp25 Date: Sat, 23 May 2015 17:04:35 +0200 Subject: [PATCH 382/436] fix typo --- src/whatsprot.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index f6149135..872444cf 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -1262,7 +1262,7 @@ public function sendGetStatuses($jids) "to" => Constants::WHATSAPP_SERVER, "type" => "get", "xmlns" => "status", - "id" => $iqId; + "id" => $iqId ), array( new ProtocolNode("status", null, $children, null) ), null); From 69b388e4bf7e7ffd39352cfa6c703b49f1266e76 Mon Sep 17 00:00:00 2001 From: mgp25 Date: Sat, 23 May 2015 23:37:24 +0200 Subject: [PATCH 383/436] Update saveMessage --- src/whatsprot.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index 872444cf..774fa4cb 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -2624,7 +2624,7 @@ protected function processInboundDataNode(ProtocolNode $node, $autoReceipt = tru )); if ($this->messageStore !== null) { - $this->messageStore->saveMessage($node->getAttribute('from'), $this->phoneNumber, $node->getChild("body")->getData(), $node->getAttribute('id'), $node->getAttribute('t')); + $this->messageStore->saveMessage(ExtractNumber($node->getAttribute('from')), $this->phoneNumber, $node->getChild("body")->getData(), $node->getAttribute('id'), $node->getAttribute('t')); } } else { //group chat message @@ -2640,7 +2640,7 @@ protected function processInboundDataNode(ProtocolNode $node, $autoReceipt = tru $node->getChild("body")->getData() )); if ($this->messageStore !== null) { - $this->messageStore->saveMessage($author,$node->getAttribute('from'), $node->getChild("body")->getData(), $node->getAttribute('id'), $node->getAttribute('t')); + $this->messageStore->saveMessage($author, $node->getAttribute('from'), $node->getChild("body")->getData(), $node->getAttribute('id'), $node->getAttribute('t')); } } From b9ff95aa60b211b508acde06a19e2c5c3bb50680 Mon Sep 17 00:00:00 2001 From: mgp25 Date: Sun, 24 May 2015 12:01:47 +0200 Subject: [PATCH 384/436] Update README.md --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index af3b1fe0..29e01382 100644 --- a/README.md +++ b/README.md @@ -38,3 +38,7 @@ MIT - You will NOT use this API for marketing purposes (spam, massive sending...). - We do NOT give support to anyone that wants this API to send massive messages or similar. - We reserve the right to block any user of this repository that does not meet these conditions. + +## Legal + +This code is in no way affiliated with, authorized, maintained, sponsored or endorsed by WhatsApp or any of its affiliates or subsidiaries. This is an independent and unofficial API. Use at your own risk. From 876af9640e6befd3ec2151804d53a976b6118296 Mon Sep 17 00:00:00 2001 From: mgp25 Date: Sun, 24 May 2015 18:27:14 +0200 Subject: [PATCH 385/436] Full CLI Client Hope you like it :) --- examples/WA CLI Client/client.php | 731 +++++++++++++++++++++ examples/WA CLI Client/data/media/.gitkeep | 0 2 files changed, 731 insertions(+) create mode 100755 examples/WA CLI Client/client.php create mode 100644 examples/WA CLI Client/data/media/.gitkeep diff --git a/examples/WA CLI Client/client.php b/examples/WA CLI Client/client.php new file mode 100755 index 00000000..c595c7fb --- /dev/null +++ b/examples/WA CLI Client/client.php @@ -0,0 +1,731 @@ + PDO::FETCH_ASSOC, PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION)); + $db->exec('CREATE TABLE data (`username` TEXT, `password` TEXT, `nickname` TEXT, `login` TEXT)'); + $sql = 'INSERT INTO data (`username`, `password`, `nickname`, `login`) VALUES (:username, :password, :nickname, :login)'; + $query = $db->prepare($sql); + + $query->execute( + array( + ':username' => $argv[1], + ':password' => $argv[2], + ':nickname' => $argv[3], + ':login' => '1' + ) + ); + } +} + +if ((!file_exists($fileName))) +{ + + echo "Welcome to CLI WA Client\n"; + echo "========================\n\n\n"; + echo "Your number > "; + $number = trim(fgets(STDIN)); + $w = new WhatsProt($number, $nickname, $debug); + + try + { + $result = $w->codeRequest('sms'); + } catch (Exception $e) + { + echo "there is an error" . $e; + } + echo "\nEnter sms code you have received > "; + $code = trim(str_replace("-", "", fgets(STDIN))); + try + { + $result = $w->codeRegister($code); + } catch (Exception $e) + { + echo "there is an error"; + } + + echo "\nYour nickname > "; + $nickname = trim(fgets(STDIN)); + do + { + echo "Is '$nickname' right?\n"; + echo "yes/no > "; + $right = trim(fgets(STDIN)); + if ($right != 'yes') + { + echo "\nYour nickname > "; + $nickname = trim(fgets(STDIN)); + } + + } while ($right != 'yes'); + + $db = new \PDO("sqlite:" . $fileName, null, null, array(PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC, PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION)); + $db->exec('CREATE TABLE data (`username` TEXT, `password` TEXT, `nickname` TEXT, `login` TEXT)'); + + $sql = 'INSERT INTO data (`username`, `password`, `nickname`, `login`) VALUES (:username, :password, :nickname, :login)'; + $query = $db->prepare($sql); + + $query->execute( + array( + ':username' => $number, + ':password' => $result->pw, + ':nickname' => $nickname, + ':login' => '1' + ) + ); +} + +$db = new \PDO("sqlite:" . $fileName, null, null, array(PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC, PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION)); +$sql = 'SELECT username, password, nickname, login FROM data'; +$row = $db->query($sql); +$result = $row->fetchAll(); +$username = $result[0]['username']; +$password = $result[0]['password']; +$nickname = $result[0]['nickname']; +$login = $result[0]['login']; + +$w = new WhatsProt($username, $nickname, $debug); +$GLOBALS["wa"] = $w; +$w->setMessageStore(new SqliteMessageStore($username)); +$events = new MyEvents($w); +$w->eventManager()->bind('onGetSyncResult', 'onSyncResult'); +$w->eventManager()->bind('onGetRequestLastSeen', 'onGetRequestLastSeen'); +$w->eventManager()->bind('onPresenceAvailable', 'onPresenceAvailable'); +$w->eventManager()->bind('onPresenceUnavailable', 'onPresenceUnavailable'); +$w->eventManager()->bind('onGetImage', 'onGetImage'); +$w->eventManager()->bind('onGetVideo', 'onGetVideo'); +$w->eventManager()->bind('onGetAudio', 'onGetAudio'); + +$w->connect(); +try +{ + $w->loginWithPassword($password); +} +catch (Exception $e) +{ + echo "Error: $e"; + exit(); +} +echo "\nConnected to WA\n\n"; +if ($login == '1') +{ + $w->sendGetClientConfig(); + $w->sendGetServerProperties(); + $w->sendGetGroups(); + $w->sendGetBroadcastLists(); + + $sql = "UPDATE data SET login=?"; + $query = $db->prepare($sql); + $query->execute(array('0')); +} +$w->sendGetPrivacyBlockedList(); +$w->sendAvailableForChat($nickname); +$show = true; +global $onlineContacts; +$GLOBALS["online_contacts"] = array(); +$GLOBALS["current_contact"]; +$poll = 0; +do +{ + if ($show) + { + showContacts(); + $show = false; + } + $poll++; + if ($poll == 10) + { + $w->pollMessage(); + $poll = 0; + } + $mainCmd = fgets_u(STDIN); + switch ($mainCmd) { + case '/add': + echo "\nEnter the number you want to add > "; + $numberToAdd = trim(fgets(STDIN)); + do { + echo "\nIs it right yes/no > "; + $check = trim(fgets(STDIN)); + if ($check != 'yes') + { + echo "\nEnter the number you want to add > "; + $numberToAdd = trim(fgets(STDIN)); + } + } while ($check != 'yes'); + echo "\nEnter the nickname/name > "; + $nickname = trim(fgets(STDIN)); + $w->sendSync(array($numberToAdd), null, 3); + if ($existUser) + { + $w->sendPresenceSubscription($numberToAdd); + addContact($numberToAdd, $nickname); + } + break; + case '/delete': + echo "\nEnter the nickname you want to remove > "; + $nickname = trim(fgets(STDIN)); + do { + echo "\nIs it right yes/no > "; + $check = trim(fgets(STDIN)); + if ($check != 'yes') + { + echo "\nEnter the nickname you want to remove > "; + $nickname = trim(fgets(STDIN)); + } + } while ($check != 'yes'); + $numberToRemove = findPhoneByNickname($nickname); + $w->sendSync(array(), array($numberToRemove), 3); + $w->sendPresenceUnsubscription($numberToRemove); + $contactsDB = __DIR__ . DIRECTORY_SEPARATOR . 'contacts.db'; + $cDB = new \PDO("sqlite:" . $contactsDB, null, null, array(PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC, PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION)); + $sql = "DELETE FROM contacts WHERE nickname = :nickname"; + $query = $cDB->prepare($sql); + $query->execute(array(':nickname' => $nickname)); + break; + case '/contacts': + $show = true; + break; + case '/status': + echo "\nEnter your status > "; + $status = trim(fgets(STDIN)); + do { + echo "\nIs it right yes/no > "; + $check = trim(fgets(STDIN)); + if ($check != 'yes') + { + echo "\nEnter your status > "; + $status = trim(fgets(STDIN)); + } + } while ($check != 'yes'); + $w->sendStatusUpdate($status); + break; + case '/profile': + echo "\nEnter your profile picture URL > "; + $profile = trim(fgets(STDIN)); + do { + echo "\nIs it right yes/no > "; + $check = trim(fgets(STDIN)); + if ($check != 'yes') + { + echo "\nEnter your profile picture URL > "; + $profile = trim(fgets(STDIN)); + } + } while ($check != 'yes'); + if (!filter_var($profile, FILTER_VALIDATE_URL) === false) { + if(@getimagesize($profile) !== false) { + $w->sendSetProfilePicture($profile); + } + } + else { + echo "$profile is NOT a valid URL\n\n"; + } + break; + case '/credits': + echo "\nSpecials thanks to 0xtryCatch :D\n"; + break; + case '/secret'; + echo "If you are a spammer or bulk sender, this is your lucky day! Follow the link:\n"; + echo "http://bit.ly/1dOj8e0\n\n"; + echo ":)\n\n"; + exit(); + break; + case '/chat': + echo "\nEnter the name of the contact > "; + $nickname = trim(fgets(STDIN)); + do { + echo "\nIs it right yes/no > "; + $check = trim(fgets(STDIN)); + if ($check != 'yes') + { + echo "\nEnter the number you want to add > "; + $nickname = trim(fgets(STDIN)); + } + } while ($check != 'yes'); + + echo "\n\n"; + echo "You are chatting with $nickname\n"; + echo "=================================\n\n"; + $contact = findPhoneByNickname($nickname); + $latestMsgs = getLatestMessages($contact); + $GLOBALS["current_contact"] = $contact; + foreach ($latestMsgs as $msg) + { + echo "\n- ".$nickname.": ".$msg['message']." ".date('t/m/Y h:i:s A', $msg['t'])."\n"; + } + $pn = new ProcessNode($w, $contact); + $w->setNewMessageBind($pn); + $chatting = true; + $compose = true; + $lastSeen = true; + while ($chatting) { + $w->pollMessage(); + $msgs = $w->getMessages(); + foreach ($msgs as $m) { + # process inbound messages + //print($m->NodeString("") . "\n"); + } + if ($compose) + { + $w->sendMessageComposing($contact); + $compose = false; + } + if ($lastSeen) + { + if (!in_array($contact, $GLOBALS["online_contacts"])) + $w->sendGetRequestLastSeen($contact); + $lastSeen = false; + } + $line = fgets_u(STDIN); + /* + $typing = true; + while (($c = fread(STDIN, 1)) && ($w->pollMessage())) + { + if ($typing) + $w->sendMessageComposing($contact); + switch (ord($c)) { + case 8: + // Backspace + $text = substr($line, 0, -1); + break; + case 10: + // Newline + $line = $text; + $text = ""; + $w->sendMessagePaused($contact); + break 2; + default: + $text .= $c; + break; + } + $typing = false; + } + */ + if ($line != "") { + if (strrchr($line, " ")) { + $command = trim(strstr($line, ' ', TRUE)); + } else { + $command = $line; + } + switch ($command) { + case "/current": + $nickname = findNicknameByPhone($contact); + echo "[] Interactive conversation with $nickname:\n"; + break; + case "/lastseen": + echo "[] Last seen $contact: "; + $w->sendMessagePaused($contact); + $compose = true; + $w->sendGetRequestLastSeen($contact); + break; + case "/block": + echo "< User is now blocked >\n"; + $w->sendMessagePaused($contact); + $compose = true; + $blocked = privacySettings($contact, 'block'); + $w->sendSetPrivacyBlockedList($blocked); + break; + case "/unblock": + echo "< User is now unblocked >\n"; + $w->sendMessagePaused($contact); + $compose = true; + $blocked = privacySettings($contact, 'unblock'); + $w->sendSetPrivacyBlockedList($blocked); + break; + case "/back": + echo "\nYou are now in the main menu\n"; + echo "================================\n\n"; + $chatting = false; + break; + case '/time': + echo date("l jS \of F Y h:i:s A") . "\n\n"; + break; + case '/help': + echo "Available commands\n"; + echo "==================\n\n"; + echo "/query - Shows the number you are chatting with\n"; + echo "/lastseen - Last seen of the user\n"; + echo "/block - Blocks the user\n"; + echo "/unblock - Unblocks user\n"; + echo "/time - Current time\n"; + echo "/back - Return to main menu\n\n"; + break; + default: + $w->sendMessagePaused($contact); + if (!filter_var($line, FILTER_VALIDATE_URL) === false) { + if(@getimagesize($line) !== false) { + $w->sendMessageImage($contact, $line); + } + } + else + $w->sendMessage($contact , $line); + $compose = true; + break; + } + } + } + break; + case '/time': + echo date("l jS \of F Y h:i:s A") . "\n\n"; + break; + case '/help': + echo "Available commands\n"; + echo "==================\n\n"; + echo "/add - Adds a contact\n"; + echo "/delete - Removes a contact\n"; + echo "/chat - Starts a conversation\n"; + echo "/contacts - Shows all contacts\n"; + echo "/status - Change status\n"; + echo "/profile - Change profile image\n"; + echo "/time - Current time\n"; + echo "/credits - Credits & special thanks\n"; + echo "/exit - Close WA CLI Client\n\n"; + break; + default: + //code + break; + } +} while (($mainCmd != '/exit')); + +$w->disconnect(); +echo "Disconnected. Bye! :D\n"; + +function showContacts() +{ + $contactsDB = __DIR__ . DIRECTORY_SEPARATOR . 'contacts.db'; + if (file_exists($contactsDB)) + { + + $cDB = new \PDO("sqlite:" . $contactsDB, null, null, array(PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC, PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION)); + $sql = 'SELECT nickname FROM contacts'; + $row = $cDB->query($sql); + $contacts = $row->fetchAll(); + echo "\n Contacts\n"; + echo "==================\n\n"; + foreach ($contacts as $contact) + { + echo "- " . $contact['nickname'] . "\n"; + } + echo "\n\n"; + } +} + +function fgets_u($pStdn) +{ + $pArr = array($pStdn); + + if (false === ($num_changed_streams = stream_select($pArr, $write = NULL, $except = NULL, 0))) { + print("\$ 001 Socket Error : UNABLE TO WATCH STDIN.\n"); + + return FALSE; + } elseif ($num_changed_streams > 0) { + return trim(fgets($pStdn, 1024)); + } + return null; +} + +function addContact($number, $name) +{ + $contactsDB = __DIR__ . DIRECTORY_SEPARATOR . 'contacts.db'; + if (!file_exists($contactsDB)) + { + $db = new \PDO("sqlite:" . $contactsDB, null, null, array(PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC, PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION)); + $db->exec('CREATE TABLE contacts (`phone` TEXT, `nickname` TEXT)'); + } + else { + $db = new \PDO("sqlite:" . $contactsDB, null, null, array(PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC, PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION)); + } + $sql = 'INSERT INTO contacts (`phone`, `nickname`) VALUES (:phone, :nickname)'; + $query = $db->prepare($sql); + + $query->execute( + array( + ':phone' => $number, + ':nickname' => $name + ) + ); + +} + +function findPhoneByNickname($contact) +{ + $contactsDB = __DIR__ . DIRECTORY_SEPARATOR . 'contacts.db'; + if (file_exists($contactsDB)) + { + $cDB = new \PDO("sqlite:" . $contactsDB, null, null, array(PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC, PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION)); + $sql = 'SELECT phone FROM contacts WHERE nickname = :nickname'; + $query = $cDB->prepare($sql); + $query->execute(array(':nickname' => $contact)); + $contact = $query->fetchAll(); + $contact = $contact[0]['phone']; + + return $contact; + } +} + +function findNicknameByPhone($phone) +{ + $contactsDB = __DIR__ . DIRECTORY_SEPARATOR . 'contacts.db'; + if (file_exists($contactsDB)) + { + $cDB = new \PDO("sqlite:" . $contactsDB, null, null, array(PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC, PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION)); + $sql = 'SELECT nickname FROM contacts WHERE phone = :phone'; + $query = $cDB->prepare($sql); + $query->execute(array(':phone' => $phone)); + $contact = $query->fetchAll(); + $contact = $contact[0]['nickname']; + + return $contact; + } +} + +function getLatestMessages($phone) +{ + $msgDB = $GLOBALS["msg_db"]; + if (file_exists($msgDB)) + { + $cDB = new \PDO("sqlite:" . $msgDB, null, null, array(PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC, PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION)); + $sql = 'SELECT message, t FROM messages WHERE `from` = :phone LIMIT 20'; + $query = $cDB->prepare($sql); + $query->execute(array(':phone' => $phone)); + $messages = $query->fetchAll(); + + return $messages; + } +} + +function privacySettings($number, $option) +{ + if ($option == 'block') + { + $privacyDB = __DIR__ . DIRECTORY_SEPARATOR . 'privacy.db'; + if (!file_exists($privacyDB)) + { + $pDB = new \PDO("sqlite:" . $privacyDB, null, null, array(PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC, PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION)); + $pDB->exec('CREATE TABLE blocked (`phone` TEXT)'); + } + else { + $pDB = new \PDO("sqlite:" . $privacyDB, null, null, array(PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC, PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION)); + } + $sql = 'INSERT INTO blocked (`phone`) VALUES (:phone)'; + $query = $pDB->prepare($sql); + + $query->execute( + array( + ':phone' => $number + ) + ); + + $sql = 'SELECT phone FROM blocked'; + $query = $pDB->prepare($sql); + $query->execute(); + $blocked = $query->fetchAll(); + $i = 0; + for ($i; $i < count($blocked); $i++) + { + $blockedList[] = $blocked[$i]['phone']; + } + + return $blockedList; + } + else { + $privacyDB = __DIR__ . DIRECTORY_SEPARATOR . 'privacy.db'; + if (file_exists($privacyDB)) + { + $pDB = new \PDO("sqlite:" . $privacyDB, null, null, array(PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC, PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION)); + $sql = "DELETE FROM blocked WHERE phone = :phone"; + $query = $pDB->prepare($sql); + $query->execute(array(':phone' => $number)); + + $sql = 'SELECT phone FROM blocked'; + $query = $pDB->prepare($sql); + $query->execute(); + $blocked = $query->fetchAll(); + $i = 0; + for ($i; $i < count($blocked); $i++) + { + $blockedList[] = $blocked[$i]['phone']; + } + + return $blockedList; + } + } + +} + +function onSyncResult($result) +{ + foreach ($result->existing as $number) { + global $existUser; + $existUser = true; + } +} + +function onGetRequestLastSeen( $mynumber, $from, $id, $seconds ) +{ + $nickname = findNicknameByPhone(ExtractNumber($from)); + if (($seconds != "") || ($seconds != null)) + echo "$nickname last seen: " . gmdate('l jS \of F Y h:i:s A', intval($seconds)). "\n"; +} + +function onPresenceAvailable($mynumber, $from) +{ + $number = ExtractNumber($from); + if (!in_array($number, $GLOBALS["online_contacts"])) + array_push($GLOBALS["online_contacts"], $number); + $nickname = findNicknameByPhone($number); + echo " < $nickname is now online >\n"; +} + +function onPresenceUnavailable($mynumber, $from, $last) +{ + $number = ExtractNumber($from); + if(($key = array_search($number, $GLOBALS["online_contacts"])) !== false) { + unset($GLOBALS["online_contacts"][$key]); + } + $nickname = findNicknameByPhone($number); + echo " < $nickname is now offline >\n"; +} + +function onGetMessage($mynumber, $from, $id, $type, $time, $name, $body) +{ + $number = ExtractNumber($from); + if ($number != $GLOBALS["current_contact"]) + { + $nickname = findNicknameByPhone($number); + if (($nickname != "") || ($nickname != null)) + echo " < New message from $nickname >"; + else{ + echo " < New message from $name ($number) >"; + do{ + echo "\nDo you want to add $name ($number)? add/block/nothing\n"; + echo "> "; + $option = trim(fgets(STDIN)); + } while(($option != 'add') || ($option != 'block') || ($option != 'nothing')); + + switch ($option) + { + case 'add': + echo "\nEnter the nickname/name > "; + $nickname = trim(fgets(STDIN)); + addContact($number, $nickname); + $GLOBALS['wa']->sendSync(array($number), null, 3); + $GLOBALS['wa']->sendPresenceSubscription($number); + break; + case 'block': + $blockedContacts = privacySettings($number, 'block'); + $GLOBALS['wa']->sendSetPrivacyBlockedList($blockedContacts); + echo "$name ($number) is now blocked\n"; + break; + } + + } + } +} + +function onGetImage($mynumber, $from, $id, $type, $time, $name, $size, $url, $file, $mimeType, $fileHash, $width, $height, $preview, $caption) +{ + $number = ExtractNumber($from); + $nickname = findNicknameByPhone($number); + $path = __DIR__ . DIRECTORY_SEPARATOR . "data/media/$nickname/"; + if (!file_exists($path)) + mkdir($path); + $filename = $path . time() . ".jpg"; + $data = file_get_contents($url); + $fp = @fopen($filename, "w"); + if ($fp) { + fwrite($fp, $data); + fclose($fp); + } + echo " < Received image from $nickname >\n"; +} + +function onGetVideo($mynumber, $from, $id, $type, $time, $name, $url, $file, $size, $mimeType, $fileHash, $duration, $vcodec, $acodec, $preview, $caption) +{ + $number = ExtractNumber($from); + $nickname = findNicknameByPhone($number); + $path = "data/media/$nickname/"; + if (!file_exists($path)) + mkdir($path); + $filename = __DIR__ . DIRECTORY_SEPARATOR . $path . time() . ".jpg"; + $data = file_get_contents($url); + $fp = @fopen($filename, "w"); + if ($fp) { + fwrite($fp, $data); + fclose($fp); + } + echo " < Received video from $nickname >\n"; +} + +function onGetAudio($mynumber, $from, $id, $type, $time, $name, $size, $url, $file, $mimeType, $fileHash, $duration, $acodec, $fromJID_ifGroup = null) +{ + $number = ExtractNumber($from); + $nickname = findNicknameByPhone($number); + $path = "data/media/$nickname/"; + if (!file_exists($path)) + mkdir($path); + $filename = __DIR__ . DIRECTORY_SEPARATOR . $path . time() . ".jpg"; + $data = file_get_contents($url); + $fp = @fopen($filename, "w"); + if ($fp) { + fwrite($fp, $data); + fclose($fp); + } + echo " < Received audio from $nickname >\n"; +} + +class ProcessNode +{ + protected $wp = false; + protected $target = false; + + public function __construct($wp, $target) + { + $this->wp = $wp; + $this->target = $target; + } + + public function process($node) + { + if ($node->getAttribute("type") == 'text') + { + $text = $node->getChild('body'); + $text = $text->getData(); + $number = ExtractNumber($node->getAttribute("from")); + $nickname = findNicknameByPhone($number); + + echo "\n- ".$nickname.": ".$text." ".date('H:i')."\n"; + } + + } +} diff --git a/examples/WA CLI Client/data/media/.gitkeep b/examples/WA CLI Client/data/media/.gitkeep new file mode 100644 index 00000000..e69de29b From 62b23555ff3477cae73ff63416be43bc4c71ab5b Mon Sep 17 00:00:00 2001 From: mgp25 Date: Mon, 25 May 2015 21:40:33 +0200 Subject: [PATCH 386/436] Fixes #754 --- examples/exampleFunctional.php | 32 +++++++++++++++++--------------- 1 file changed, 17 insertions(+), 15 deletions(-) diff --git a/examples/exampleFunctional.php b/examples/exampleFunctional.php index bf36bfb2..01534e0a 100755 --- a/examples/exampleFunctional.php +++ b/examples/exampleFunctional.php @@ -159,21 +159,23 @@ public function process($node) { // Example of process function, you have to guess a number (psss it's 5) // If you guess it right you get a gift - $text = $node->getChild('body'); - $text = $text->getData(); - if ($text && ($text == "5" || trim($text) == "5")) { - $this->wp->sendMessageImage($this->target, "https://s3.amazonaws.com/f.cl.ly/items/2F3U0A1K2o051q1q1e1G/baby-nailed-it.jpg"); - $this->wp->sendMessage($this->target, "Congratulations you guessed the right number!"); + if ($node->getAttribute("type") == 'text') + { + $text = $node->getChild('body'); + $text = $text->getData(); + if ($text && ($text == "5" || trim($text) == "5")) { + $this->wp->sendMessageImage($this->target, "https://s3.amazonaws.com/f.cl.ly/items/2F3U0A1K2o051q1q1e1G/baby-nailed-it.jpg"); + $this->wp->sendMessage($this->target, "Congratulations you guessed the right number!"); + } + elseif (ctype_digit($text)) { + if ((int)$text != "5") + $this->wp->sendMessage($this->target, "I'm sorry, try again!"); + } + $text = $node->getChild('body'); + $text = $text->getData(); + $notify = $node->getAttribute("notify"); + + echo "\n- ".$notify.": ".$text." ".date('H:i')."\n"; } - elseif (ctype_digit($text)) { - if ((int)$text != "5") - $this->wp->sendMessage($this->target, "I'm sorry, try again!"); - } - $text = $node->getChild('body'); - $text = $text->getData(); - $notify = $node->getAttribute("notify"); - - echo "\n- ".$notify.": ".$text." ".date('H:i')."\n"; - } } From cf9cf605786e93b9c8273b381da6c2ce0010000e Mon Sep 17 00:00:00 2001 From: Emanuele Gaspari Date: Tue, 26 May 2015 09:58:22 +0200 Subject: [PATCH 387/436] typo --- examples/exampleRegister.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/exampleRegister.php b/examples/exampleRegister.php index 199da01a..9a4d9c97 100755 --- a/examples/exampleRegister.php +++ b/examples/exampleRegister.php @@ -18,7 +18,7 @@ $username = '34666554433'; // Telephone number including the country code without '+' or '00'. $nickname = 'John Doe'; // This is the username displayed by WhatsApp clients. -// Create a instance of WhastPort. +// Create an instance of WhatsProt. $w = new WhatsProt($username, $nickname, $debug); // How to create an account __ONLY__ if you do not have a associated to our phone number. From 276b2d86575b2d075d163cdb198b90174c18379c Mon Sep 17 00:00:00 2001 From: mgp25 Date: Tue, 26 May 2015 13:03:10 +0200 Subject: [PATCH 388/436] Fixes #736 --- src/events/AllEvents.php | 2 +- src/whatsprot.class.php | 18 +++++++++++++----- 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/src/events/AllEvents.php b/src/events/AllEvents.php index abc046d6..401b1639 100644 --- a/src/events/AllEvents.php +++ b/src/events/AllEvents.php @@ -54,7 +54,7 @@ public function onDissectPhone($mynumber, $phonecountry, $phonecc, $phone, $phon public function onDissectPhoneFailed($mynumber) {} public function onGetAudio($mynumber, $from, $id, $type, $time, $name, $size, $url, $file, $mimeType, $fileHash, $duration, $acodec, $fromJID_ifGroup = null) {} public function onGetBroadcastLists($mynumber, $broadcastLists){} - public function onGetError($mynumber, $from, $id, $data) {} + public function onGetError($mynumber, $from, $id, $data, $errorType = null) {} public function onGetExtendAccount($mynumber, $kind, $status, $creation, $expiration) {} public function onGetFeature($mynumber, $from, $encrypt) {} public function onGetGroupMessage($mynumber, $from_group_jid, $from_user_jid, $id, $type, $time, $name, $body) {} diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index 774fa4cb..a97431dc 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -904,7 +904,7 @@ public function sendGetPrivacyBlockedList() */ public function sendGetPrivacySettings() { - $msgId = $this->createIqId(); + $msgId = $this->nodeId['privacy_settings'] = $this->createIqId(); $privacyNode = new ProtocolNode("privacy", null, null, null); $node = new ProtocolNode("iq", array( @@ -958,7 +958,7 @@ public function sendSetPrivacySettings($category, $value) */ public function sendGetProfilePicture($number, $large = false) { - $msgId = $this->createIqId(); + $msgId = $this->nodeId['getprofilepic'] = $this->createIqId(); $hash = array(); $hash["type"] = "image"; @@ -1025,7 +1025,7 @@ public function sendGetProfilePhotoIds($numbers) */ public function sendGetRequestLastSeen($to) { - $msgId = $this->createIqId(); + $msgId = $this->nodeId['getlastseen'] = $this->createIqId(); $queryNode = new ProtocolNode("query", null, null, null); @@ -1255,7 +1255,7 @@ public function sendGetStatuses($jids) $children[] = new ProtocolNode("user", array("jid" => $this->getJID($jid)), null, null); } - $iqId = $this->createIqId(); + $iqId = $this->nodeId['getstatuses'] = $this->createIqId(); $node = new ProtocolNode("iq", array( @@ -3108,12 +3108,20 @@ protected function processInboundDataNode(ProtocolNode $node, $autoReceipt = tru } } if ($node->getTag() == "iq" && $node->getAttribute('type') == "error") { + $errorType=null; + foreach ($this->nodeId AS $type => $nodeID) { + if ($nodeID == $node->getAttribute('id')) { + $errorType = $type; + break; + } + } $this->eventManager()->fire("onGetError", array( $this->phoneNumber, $node->getAttribute('from'), $node->getAttribute('id'), - $node->getChild(0) + $node->getChild(0), + $errorType )); } From 32e3a8e0cde252c36bf8864f75eb9096dbb4b835 Mon Sep 17 00:00:00 2001 From: mgp25 Date: Thu, 28 May 2015 21:17:10 +0200 Subject: [PATCH 389/436] fix uploading videos and audios --- src/func.php | 29 +++++++++++++++++++++++++++++ src/whatsprot.class.php | 16 +++++----------- 2 files changed, 34 insertions(+), 11 deletions(-) diff --git a/src/func.php b/src/func.php index 7deeda84..6c43edcf 100755 --- a/src/func.php +++ b/src/func.php @@ -211,3 +211,32 @@ function get_mime($file) return false; } + +function getExtensionFromMime($mime) +{ + $extensions = array( + 'audio/3gpp' => '3gp', + 'audio/x-caf' => 'caf', + 'audio/wav' => 'wav', + 'audio/mpeg' => 'mp3', + 'audio/mpeg3' => 'mp3', + 'audio/x-mpeg-3' => 'mp3', + 'audio/x-ms-wma' => 'wma', + 'audio/ogg' => 'ogg', + 'audio/aiff' => 'aif', + 'audio/x-aiff' => 'aif', + 'audio/aac' => 'aac', + 'audio/mp4' => 'm4a', + 'image/jpeg' => 'jpg', + 'image/gif' => 'gif', + 'image/png' => 'png', + 'video/3gpp' => '3gp', + 'video/mp4' => 'mp4', + 'video/quicktime' => 'mov', + 'video/avi' => 'avi', + 'video/msvideo' => 'avi', + 'video/x-msvideo' => 'avi' + ); + + return $extensions[$mime]; +} diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index a97431dc..6cb14de5 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -2418,20 +2418,14 @@ protected function getMediaFile($filepath, $maxsizebytes = 5242880) $this->mediaFileInfo = array(); $this->mediaFileInfo['url'] = $filepath; - $image = file_get_contents($filepath); - $this->mediaFileInfo['filesize'] = strlen($image); - - $file_info = new finfo(FILEINFO_MIME_TYPE); - $mime_type = $file_info->buffer($image); - - $this->mediaFileInfo['filemimetype'] = $mime_type; + $media = file_get_contents($filepath); + $this->mediaFileInfo['filesize'] = strlen($media); if ($this->mediaFileInfo['filesize'] < $maxsizebytes) { $this->mediaFileInfo['filepath'] = tempnam(__DIR__ . DIRECTORY_SEPARATOR . Constants::DATA_FOLDER . DIRECTORY_SEPARATOR . Constants::MEDIA_FOLDER, 'WHA'); - file_put_contents($this->mediaFileInfo['filepath'], $image); - $size = getimagesize($this->mediaFileInfo['filepath']); - $extension = ltrim (image_type_to_extension($size[2]), '.'); - $this->mediaFileInfo['fileextension'] = $extension; + file_put_contents($this->mediaFileInfo['filepath'], $media); + $this->mediaFileInfo['filemimetype'] = get_mime($this->mediaFileInfo['filepath']); + $this->mediaFileInfo['fileextension'] = getExtensionFromMime($this->mediaFileInfo['filemimetype']); return true; } else { return false; From 320166d34863f1e9f496d4521dcb0b8c173b0a1d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20P=C3=BCschel?= Date: Fri, 29 May 2015 12:53:59 +0200 Subject: [PATCH 390/436] always wait for response from server after sending the auth response --- src/whatsprot.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index 6cb14de5..6f187683 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -2236,7 +2236,7 @@ protected function doLogin() $this->sendNode($data); $this->reader->setKey($this->inputKey); $this->writer->setKey($this->outputKey); - $this->pollMessage(); + while (!$this->pollMessage()) {}; } if ($this->loginStatus === Constants::DISCONNECTED_STATUS) { From 1170d14f448f550d8f0c0cbccf532e07d4cf7a42 Mon Sep 17 00:00:00 2001 From: WHAnonymous Date: Mon, 1 Jun 2015 19:19:48 +0000 Subject: [PATCH 391/436] Update README.md --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 29e01382..0ff3660f 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,8 @@ Interface to WhatsApp Messenger For new WhatsApp updates check **[WhatsApp incoming updates log](https://github.com/mgp25/Chat-API/wiki/WhatsApp-incoming-updates)** +**Do you like this project? Support it by donating BTC** to 1HcEX9foem5atreEg1gbQ6xVeosN5WEcjs ![btc](http://www.montrealbitcoin.com/img/favicon.ico) + ---------- ### Special thanks From e09d8f325657fbc5b616e3574ee7b563bb088466 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tobi=20Sch=C3=A4fer?= Date: Sun, 14 Jun 2015 14:14:55 +0200 Subject: [PATCH 392/436] Wait for Server after status update Status updates will be taken directly --- src/whatsprot.class.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index 6f187683..37b74a75 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -1877,15 +1877,17 @@ public function sendSetRecoveryToken($token) public function sendStatusUpdate($txt) { $child = new ProtocolNode("status", null, null, $txt); + $nodeID = $this->createIqId(); $node = new ProtocolNode("iq", array( "to" => Constants::WHATSAPP_SERVER, "type" => "set", - "id" => $this->createIqId(), + "id" => $nodeID, "xmlns" => "status" ), array($child), null); $this->sendNode($node); + $this->waitForServer($nodeID); $this->eventManager()->fire("onSendStatusUpdate", array( $this->phoneNumber, From e8712d8675b1d71b6369eebacaf23545527a9d4d Mon Sep 17 00:00:00 2001 From: Carson Full Date: Tue, 16 Jun 2015 14:30:41 -0500 Subject: [PATCH 393/436] Update composer links and package name --- composer.json | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/composer.json b/composer.json index 1ec01af1..9f4718ce 100644 --- a/composer.json +++ b/composer.json @@ -1,6 +1,6 @@ { - "name": "mgp25/whatsapi", - "description": "The php WhatsApp library ", + "name": "whatsapp/chat-api", + "description": "The PHP WhatsApp library", "license": "MIT", "keywords": [ "WhatsApp", @@ -10,18 +10,17 @@ { "role": "Contributors", "name": "Chat API Contributing Team", - "homepage": "https://github.com/mgp25/Chat-API/graphs/contributors" + "homepage": "https://github.com/WHAnonymous/Chat-API/graphs/contributors" } ], "support": { - "issues": "https://github.com/mgp25/Chat-API/issues", - "wiki": "https://github.com/mgp25/Chat-API/wiki", - "source": "https://github.com/mgp25/Chat-API" + "issues": "https://github.com/WHAnonymous/Chat-API/issues", + "wiki": "https://github.com/WHAnonymous/Chat-API/wiki", + "source": "https://github.com/WHAnonymous/Chat-API" }, "autoload": { "classmap": [ - "src/", - "src/events" + "src/" ] }, "require": { From 8ea1de69c2ea7edc7f88c2b9d86c7e99ec561c02 Mon Sep 17 00:00:00 2001 From: Carson Full Date: Tue, 16 Jun 2015 14:31:24 -0500 Subject: [PATCH 394/436] Update readme links --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 0ff3660f..4dbdbfeb 100644 --- a/README.md +++ b/README.md @@ -2,9 +2,9 @@ Interface to WhatsApp Messenger -**Read the [wiki](https://github.com/mgp25/Chat-API/wiki)** and previous issues before opening a new one! Maybe your issue is already answered. +**Read the [wiki](https://github.com/WHAnonymous/Chat-API/wiki)** and previous issues before opening a new one! Maybe your issue is already answered. -For new WhatsApp updates check **[WhatsApp incoming updates log](https://github.com/mgp25/Chat-API/wiki/WhatsApp-incoming-updates)** +For new WhatsApp updates check **[WhatsApp incoming updates log](https://github.com/WHAnonymous/Chat-API/wiki/WhatsApp-incoming-updates)** **Do you like this project? Support it by donating BTC** to 1HcEX9foem5atreEg1gbQ6xVeosN5WEcjs ![btc](http://www.montrealbitcoin.com/img/favicon.ico) From b92f8f981c8beabe0ae0c1443ad758367ab12a99 Mon Sep 17 00:00:00 2001 From: WHAnonymous Date: Thu, 25 Jun 2015 11:04:21 +0000 Subject: [PATCH 395/436] Update README.md --- README.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 4dbdbfeb..a93afda2 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Chat API +# Chat API [![Latest Stable Version](https://poser.pugx.org/whatsapp/chat-api/v/stable)](https://packagist.org/packages/whatsapp/chat-api) [![Total Downloads](https://poser.pugx.org/whatsapp/chat-api/downloads)](https://packagist.org/packages/whatsapp/chat-api) [![License](https://poser.pugx.org/whatsapp/chat-api/license)](https://packagist.org/packages/whatsapp/chat-api) Interface to WhatsApp Messenger @@ -9,6 +9,11 @@ For new WhatsApp updates check **[WhatsApp incoming updates log](https://github. **Do you like this project? Support it by donating BTC** to 1HcEX9foem5atreEg1gbQ6xVeosN5WEcjs ![btc](http://www.montrealbitcoin.com/img/favicon.ico) ---------- +### Installation + +```sh +composer require whatsapp/chat-api +``` ### Special thanks From 4e146b0f64716062b0d67a0b336e5b455ce4233c Mon Sep 17 00:00:00 2001 From: BartS23 Date: Tue, 30 Jun 2015 12:15:19 +0200 Subject: [PATCH 396/436] send additional video infos to events OnGetVideo and onGetGroupVideo --- src/whatsprot.class.php | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index 37b74a75..89f77e4c 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -2709,7 +2709,14 @@ protected function processInboundDataNode(ProtocolNode $node, $autoReceipt = tru $node->getChild("media")->getAttribute('vcodec'), $node->getChild("media")->getAttribute('acodec'), $node->getChild("media")->getData(), - $node->getChild("media")->getAttribute('caption') + $node->getChild("media")->getAttribute('caption'), + $node->getChild("media")->getAttribute('width'), + $node->getChild("media")->getAttribute('height'), + $node->getChild("media")->getAttribute('fps'), + $node->getChild("media")->getAttribute('vbitrate'), + $node->getChild("media")->getAttribute('asampfreq'), + $node->getChild("media")->getAttribute('asampfmt'), + $node->getChild("media")->getAttribute('abitrate') )); } else { $this->eventManager()->fire("onGetGroupVideo", @@ -2730,7 +2737,14 @@ protected function processInboundDataNode(ProtocolNode $node, $autoReceipt = tru $node->getChild("media")->getAttribute('vcodec'), $node->getChild("media")->getAttribute('acodec'), $node->getChild("media")->getData(), - $node->getChild("media")->getAttribute('caption') + $node->getChild("media")->getAttribute('caption'), + $node->getChild("media")->getAttribute('width'), + $node->getChild("media")->getAttribute('height'), + $node->getChild("media")->getAttribute('fps'), + $node->getChild("media")->getAttribute('vbitrate'), + $node->getChild("media")->getAttribute('asampfreq'), + $node->getChild("media")->getAttribute('asampfmt'), + $node->getChild("media")->getAttribute('abitrate') )); } } elseif ($node->getChild("media")->getAttribute('type') == 'audio') { From 5d51914037eca653cb73c73d205a43cd2df86eec Mon Sep 17 00:00:00 2001 From: mgp25 Date: Fri, 3 Jul 2015 11:32:33 +0200 Subject: [PATCH 397/436] Fixed #823 --- src/events/AllEvents.php | 1 + src/whatsprot.class.php | 16 ++++++++++++++-- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/src/events/AllEvents.php b/src/events/AllEvents.php index 401b1639..660d6dd5 100644 --- a/src/events/AllEvents.php +++ b/src/events/AllEvents.php @@ -83,6 +83,7 @@ public function onGroupisCreated($mynumber, $creator, $gid, $subject, $admin, $c public function onGroupsChatCreate($mynumber, $gid) {} public function onGroupsChatEnd($mynumber, $gid) {} public function onGroupsParticipantsAdd($mynumber, $groupId, $jid) {} + public function onGroupsParticipantChangedNumber($mynumber, $groupId, $time, $oldNumber, $notify, $newNumber) {} public function onGroupsParticipantsPromote($myNumber, $groupJID, $time, $issuerJID, $issuerName, $promotedJIDs = array()) {} public function onGroupsParticipantsRemove($mynumber, $groupId, $jid) {} public function onLogin($mynumber) {} diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index 89f77e4c..58ddc985 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -2716,7 +2716,7 @@ protected function processInboundDataNode(ProtocolNode $node, $autoReceipt = tru $node->getChild("media")->getAttribute('vbitrate'), $node->getChild("media")->getAttribute('asampfreq'), $node->getChild("media")->getAttribute('asampfmt'), - $node->getChild("media")->getAttribute('abitrate') + $node->getChild("media")->getAttribute('abitrate') )); } else { $this->eventManager()->fire("onGetGroupVideo", @@ -2744,7 +2744,7 @@ protected function processInboundDataNode(ProtocolNode $node, $autoReceipt = tru $node->getChild("media")->getAttribute('vbitrate'), $node->getChild("media")->getAttribute('asampfreq'), $node->getChild("media")->getAttribute('asampfmt'), - $node->getChild("media")->getAttribute('abitrate') + $node->getChild("media")->getAttribute('abitrate') )); } } elseif ($node->getChild("media")->getAttribute('type') == 'audio') { @@ -3306,6 +3306,18 @@ protected function processInboundDataNode(ProtocolNode $node, $autoReceipt = tru ) ); } + else if ($node->hasChild('modify')) { + $this->eventManager()->fire("onGroupsParticipantChangedNumber", + array( + $this->phoneNumber, + $node->getAttribute('from'), + $node->getAttribute('t'), + $node->getAttribute('participant'), + $node->getAttribute('notify'), + $node->getChild(0)->getChild(0)->getAttribute('jid') + ) + ); + } break; case "account": if (($node->getChild(0)->getAttribute('author')) == "") From 552c76c2f9874fb2bcee469096ff72ee6f4cae3a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20P=C3=BCschel?= Date: Mon, 6 Jul 2015 13:48:50 +0200 Subject: [PATCH 398/436] fix double wait after sendMessage --- src/whatsprot.class.php | 1 - 1 file changed, 1 deletion(-) diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index 58ddc985..123648fd 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -1497,7 +1497,6 @@ public function sendMessage($to, $txt, $id = null) { $bodyNode = new ProtocolNode("body", null, null, $txt); $id = $this->sendMessageNode($to, $bodyNode, $id); - $this->waitForServer($id); if ($this->messageStore !== null) { $this->messageStore->saveMessage($this->phoneNumber, $to, $txt, $id, time()); From 5f9ddf71dc49509b2802d1af2d595137a392cead Mon Sep 17 00:00:00 2001 From: mgp25 Date: Tue, 7 Jul 2015 15:06:28 +0200 Subject: [PATCH 399/436] Fixes #824 --- composer.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 9f4718ce..ae76ae84 100644 --- a/composer.json +++ b/composer.json @@ -1,10 +1,12 @@ { "name": "whatsapp/chat-api", + "version": "2.5", "description": "The PHP WhatsApp library", "license": "MIT", "keywords": [ "WhatsApp", - "WhatsAPI" + "WhatsAPI", + "Chat-API" ], "authors": [ { From 7b1473718d40df3adc7da4c5791630ec4c299e00 Mon Sep 17 00:00:00 2001 From: mgp25 Date: Thu, 9 Jul 2015 12:21:27 +0200 Subject: [PATCH 400/436] Update to 2.12.88 --- src/Constants.php | 2 +- src/token.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Constants.php b/src/Constants.php index 2b5bbb96..93450865 100644 --- a/src/Constants.php +++ b/src/Constants.php @@ -19,7 +19,7 @@ class Constants const WHATSAPP_REQUEST_HOST = 'v.whatsapp.net/v2/code'; // The request code host. const WHATSAPP_SERVER = 's.whatsapp.net'; // The hostname used to login/send messages. const WHATSAPP_DEVICE = 'S40'; // The device name. - const WHATSAPP_VER = '2.12.82'; // The WhatsApp version. + const WHATSAPP_VER = '2.12.88'; // The WhatsApp version. const WHATSAPP_USER_AGENT = 'WhatsApp/2.12.82 S40Version/14.26 Device/Nokia302'; // User agent used in request/registration code. const WHATSAPP_VER_CHECKER = 'https://coderus.openrepos.net/whitesoft/whatsapp_scratch'; // Check WhatsApp version diff --git a/src/token.php b/src/token.php index 68b9b916..7192e88c 100755 --- a/src/token.php +++ b/src/token.php @@ -20,7 +20,7 @@ function generateRequestToken($country, $phone) // return base64_encode($output); $const = 'PdA2DJyKoUrwLw1Bg6EIhzh502dF9noR9uFCllGk'; - $releaseTime = '1431039885607'; + $releaseTime = '1435097139726'; $token = md5($const . $releaseTime . $phone); return $token; From 3e195d16a50a9b131d5213170477d34cf3134c05 Mon Sep 17 00:00:00 2001 From: mgp25 Date: Thu, 9 Jul 2015 17:20:49 +0200 Subject: [PATCH 401/436] Fixes #838 --- src/Constants.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Constants.php b/src/Constants.php index 93450865..34fe80ce 100644 --- a/src/Constants.php +++ b/src/Constants.php @@ -20,7 +20,7 @@ class Constants const WHATSAPP_SERVER = 's.whatsapp.net'; // The hostname used to login/send messages. const WHATSAPP_DEVICE = 'S40'; // The device name. const WHATSAPP_VER = '2.12.88'; // The WhatsApp version. - const WHATSAPP_USER_AGENT = 'WhatsApp/2.12.82 S40Version/14.26 Device/Nokia302'; // User agent used in request/registration code. + const WHATSAPP_USER_AGENT = 'WhatsApp/2.12.88 S40Version/14.26 Device/Nokia302'; // User agent used in request/registration code. const WHATSAPP_VER_CHECKER = 'https://coderus.openrepos.net/whitesoft/whatsapp_scratch'; // Check WhatsApp version } From 0c20fd21772325dd7b705b2bcb7038f20d83d39a Mon Sep 17 00:00:00 2001 From: Quentin Ligier Date: Tue, 14 Jul 2015 18:31:25 +0200 Subject: [PATCH 402/436] Update README.md --- README.md | 52 ++-------------------------------------------------- 1 file changed, 2 insertions(+), 50 deletions(-) diff --git a/README.md b/README.md index a93afda2..1fe10af6 100644 --- a/README.md +++ b/README.md @@ -1,51 +1,3 @@ -# Chat API [![Latest Stable Version](https://poser.pugx.org/whatsapp/chat-api/v/stable)](https://packagist.org/packages/whatsapp/chat-api) [![Total Downloads](https://poser.pugx.org/whatsapp/chat-api/downloads)](https://packagist.org/packages/whatsapp/chat-api) [![License](https://poser.pugx.org/whatsapp/chat-api/license)](https://packagist.org/packages/whatsapp/chat-api) +# Chat API -Interface to WhatsApp Messenger - -**Read the [wiki](https://github.com/WHAnonymous/Chat-API/wiki)** and previous issues before opening a new one! Maybe your issue is already answered. - -For new WhatsApp updates check **[WhatsApp incoming updates log](https://github.com/WHAnonymous/Chat-API/wiki/WhatsApp-incoming-updates)** - -**Do you like this project? Support it by donating BTC** to 1HcEX9foem5atreEg1gbQ6xVeosN5WEcjs ![btc](http://www.montrealbitcoin.com/img/favicon.ico) - ----------- -### Installation - -```sh -composer require whatsapp/chat-api -``` - -### Special thanks - -- [CODeRUS](https://github.com/CODeRUS) -- [tgalal](https://github.com/tgalal) -- [SikiFn](https://github.com/SikiFn) -- [0xTryCatch](https://github.com/0xTryCatch) -- [Shirioko](https://github.com/shirioko) - -Also Ahmed Moh'd (fb.com/ahmed.mhd) and Ali Hubail (@hubail) for making this project possible. - -And everyone that contributes to it. - ----------- - -### What is WhatsApp? -According to [the company](http://www.whatsapp.com/): - -> โ€œWhatsApp Messenger is a cross-platform mobile messenger that replaces SMS and works through the existing internet data plan of your device. WhatsApp is available for iPhone, BlackBerry, Android, Windows Phone, Nokia Symbian60 & S40 phones. Because WhatsApp Messenger uses the same internet data plan that you use for email and web browsing, there is no cost to message and stay in touch with your friends.โ€ - -Jan. 2015: 30 billion messages per day, ~700 million users. - -# License - -MIT - -# Terms and conditions - -- You will NOT use this API for marketing purposes (spam, massive sending...). -- We do NOT give support to anyone that wants this API to send massive messages or similar. -- We reserve the right to block any user of this repository that does not meet these conditions. - -## Legal - -This code is in no way affiliated with, authorized, maintained, sponsored or endorsed by WhatsApp or any of its affiliates or subsidiaries. This is an independent and unofficial API. Use at your own risk. +Fork of [WHAnonymous/Chat-API](https://github.com/WHAnonymous/Chat-API) From 09c7e98fa7279d67d1c841c7de3c676340e8bdf2 Mon Sep 17 00:00:00 2001 From: Quentin Ligier Date: Tue, 14 Jul 2015 18:34:37 +0200 Subject: [PATCH 403/436] Create smileys.class.php Add smileys to Whatsapp --- src/smileys.class.php | 903 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 903 insertions(+) create mode 100644 src/smileys.class.php diff --git a/src/smileys.class.php b/src/smileys.class.php new file mode 100644 index 00000000..c5953ef6 --- /dev/null +++ b/src/smileys.class.php @@ -0,0 +1,903 @@ +SMILEY_XXX where XXX is the index): + * $s = new Smileys; + * echo $s->GRINNING_FACE_WITH_SMILING_EYES; + * // or + * echo $s->SMILEY_23; + * + * Complete list with images: + * http://www.typografie.info/3/page/artikel.htm/_/wissen/unicode-emoji-deutsch + * http://appamatix.com/843-whatsapp-emoticons-meanings-emoji-list/ + */ + +class SmileyNotFoundException extends Exception {}; + +class Smileys { + private $listSmileys = array( + 'SMILING_FACE_WITH_OPEN_MOUTH_AND_SMILING_EYES' => 0x1F604, // Smiley 1 + 'SMILING_FACE_WITH_OPEN_MOUTH' => 0x1F603, // Smiley 2 + 'GRINNING_FACE_WITH_SMILING_EYES' => 0x1F600, // Smiley 3 + 'SMILING_FACE_WITH_SMILING_EYES' => 0x1F60A, // Smiley 4 + 'WHITE_SMILING_FACE' => 0x263A, // Smiley 5 + 'WINKING_FACE' => 0x1F609, // Smiley 6 + 'SMILING_FACE_WITH_HEART_SHAPED_EYES' => 0x1F60D, // Smiley 7 + 'FACE_THROWING_A_KISS' => 0x1F618, // Smiley 8 + 'KISSING_FACE_WITH_CLOSED_EYES' => 0x1F61A, // Smiley 9 + 'KISSING_FACE' => 0x1F617, // Smiley 10 + 'KISSING_FACE_WITH_SMILING_EYES' => 0x1F619, // Smiley 11 + 'FACE_WITH_STUCK_OUT_TONGUE_AND_WINKING_EYE' => 0x1F61C, // Smiley 12 + 'FACE_WITH_STUCK_OUT_TONGUE_AND_TIGHTLY_CLOSED_EYES' => 0x1F61D, // Smiley 13 + 'FACE_WITH_STUCK_OUT_TONGUE' => 0x1F61B, // Smiley 14 + 'FLUSHED_FACE' => 0x1F633, // Smiley 15 + 'GRINNING_FACE_WITH_SMILING_EYES' => 0x1F601, // Smiley 16 + 'PENSIVE_FACE' => 0x1F614, // Smiley 17 + 'RELIEVED_FACE' => 0x1F60C, // Smiley 18 + 'UNAMUSED_FACE' => 0x1F612, // Smiley 19 + 'DISAPPOINTED_FACE' => 0x1F61E, // Smiley 20 + 'PERSEVERING_FACE' => 0x1F623, // Smiley 21 + 'CRYING_FACE' => 0x1F622, // Smiley 22 + 'FACE_WITH_TEARS_OF_JOY' => 0x1F602, // Smiley 23 + 'LOUDLY_CRYING_FACE' => 0x1F62D, // Smiley 24 + 'SLEEPY_FACE' => 0x1F62A, // Smiley 25 + 'DISAPPOINTED_BUT_RELIEVED_FACE' => 0x1F625, // Smiley 26 + 'FACE_WITH_OPEN_MOUTH_AND_COLD_SWEAT' => 0x1F630, // Smiley 27 + 'SMILING_FACE_WITH_OPEN_MOUTH_AND_COLD_SWEAT' => 0x1F605, // Smiley 28 + 'FACE_WITH_COLD_SWEAT' => 0x1F613, // Smiley 29 + 'WEARY_FACE' => 0x1F629, // Smiley 30 + 'TIRED_FACE' => 0x1F62B, // Smiley 31 + 'FEARFUL_FACE' => 0x1F628, // Smiley 32 + 'FACE_SCREAMING_IN_FEAR' => 0x1F631, // Smiley 33 + 'ANGRY_FACE' => 0x1F620, // Smiley 34 + 'POUTING_FACE' => 0x1F621, // Smiley 35 + 'FACE_WITH_LOOK_OF_TRIUMPH' => 0x1F624, // Smiley 36 + 'CONFOUNDED_FACE' => 0x1F616, // Smiley 37 + 'SMILING_FACE_WITH_OPEN_MOUTH_AND_TIGHTLY_CLOSED_EYES' => 0x1F606, // Smiley 38 + 'FACE_SAVOURING_DELICIOUS_FOOD' => 0x1F60B, // Smiley 39 + 'FACE_WITH_MEDICAL_MASK' => 0x1F637, // Smiley 40 + 'SMILING_FACE_WITH_SUNGLASSES' => 0x1F60E, // Smiley 41 + 'SLEEPING_FACE' => 0x1F634, // Smiley 42 + 'DIZZY_FACE' => 0x1F635, // Smiley 43 + 'ASTONISHED_FACE' => 0x1F632, // Smiley 44 + 'WORRIED_FACE' => 0x1F61F, // Smiley 45 + 'FROWNING_FACE_WITH_OPEN_MOUTH' => 0x1F626, // Smiley 46 + 'ANGUISHED_FACE' => 0x1F627, // Smiley 47 + 'SMILING_FACE_WITH_HORNS' => 0x1F608, // Smiley 48 + 'IMP' => 0x1F47F, // Smiley 49 + 'FACE_WITH_OPEN_MOUTH' => 0x1F62E, // Smiley 50 + 'GRIMACING_FACE' => 0x1F62C, // Smiley 51 + 'NEUTRAL_FACE' => 0x1F610, // Smiley 52 + 'CONFUSED_FACE' => 0x1F615, // Smiley 53 + 'HUSHED_FACE' => 0x1F62F, // Smiley 54 + 'FACE_WITHOUT_MOUTH' => 0x1F636, // Smiley 55 + 'SMILING_FACE_WITH_HALO' => 0x1F607, // Smiley 56 + 'SMIRKING_FACE' => 0x1F60F, // Smiley 57 + 'EXPRESSIONLESS_FACE' => 0x1F611, // Smiley 58 + 'MAN_WITH_GUA_PI_MAO' => 0x1F472, // Smiley 59 + 'MAN_WITH_TURBAN' => 0x1F473, // Smiley 60 + 'POLICE_OFFICER' => 0x1F46E, // Smiley 61 + 'CONSTRUCTION_WORKER' => 0x1F477, // Smiley 62 + 'GUARDSMAN' => 0x1F482, // Smiley 63 + 'BABY' => 0x1F476, // Smiley 64 + 'BOY' => 0x1F466, // Smiley 65 + 'GIRL' => 0x1F467, // Smiley 66 + 'MAN' => 0x1F468, // Smiley 67 + 'WOMAN' => 0x1F469, // Smiley 68 + 'OLDER_MAN' => 0x1F474, // Smiley 69 + 'OLDER_WOMAN' => 0x1F475, // Smiley 70 + 'PERSON_WITH_BLONDE_HAIR' => 0x1F471, // Smiley 71 + 'BABY_ANGEL' => 0x1F47C, // Smiley 72 + 'PRINCESS' => 0x1F478, // Smiley 73 + 'SMILING_CAT_FACE_WITH_OPEN_MOUTH' => 0x1F63A, // Smiley 74 + 'GRINNING_CAT_FACE_WITH_SMILING_EYES' => 0x1F638, // Smiley 75 + 'SMILING_FACE_FACE_WITH_HEART_SHAPED_EYES' => 0x1F63B, // Smiley 76 + 'KISSING_CAT_FACE_WITH_CLOSED_EYES' => 0x1F63D, // Smiley 77 + 'CAT_FACE_WITH_WRY_SMILE' => 0x1F63C, // Smiley 78 + 'WEARY_CAT_FACE' => 0x1F640, // Smiley 79 + 'CRYING_CAT_FACE' => 0x1F63F, // Smiley 80 + 'CAT_FACE_WITH_TEARS_OF_JOY' => 0x1F639, // Smiley 81 + 'POUTING_CAT_FACE' => 0x1F63E, // Smiley 82 + 'JAPANESE_OGRE' => 0x1F479, // Smiley 83 + 'JAPANESE_GOBLIN' => 0x1F47A, // Smiley 84 + 'SEE_NO_EVIL_MONKEY' => 0x1F648, // Smiley 85 + 'HEAR_NO_EVIL_MONKEY' => 0x1F649, // Smiley 86 + 'SPEAK_NO_EVIL_MONKEY' => 0x1F64A, // Smiley 87 + 'SKULL' => 0x1F480, // Smiley 88 + 'EXTRATERRESTRIAL_ALIEN' => 0x1F47D, // Smiley 89 + 'PILE_OF_POO' => 0x1F4A9, // Smiley 90 + 'FIRE' => 0x1F525, // Smiley 91 + 'SPARKLES' => 0x2728, // Smiley 92 + 'GLOWING_STAR' => 0x1F31F, // Smiley 93 + 'DIZZY_SYMBOL' => 0x1F4AB, // Smiley 94 + 'COLLISION_SYMBOL' => 0x1F4A5, // Smiley 95 + 'ANGER_SYMBOL' => 0x1F4A2, // Smiley 96 + 'SPLASHING_SWEAT_SYMBOL' => 0x1F4A6, // Smiley 97 + 'DROPLET' => 0x1F4A7, // Smiley 98 + 'SLEEPING_SYMBOL' => 0x1F4A4, // Smiley 99 + 'DASH_SYMBOL' => 0x1F4A8, // Smiley 100 + 'EAR' => 0x1F442, // Smiley 101 + 'EYES' => 0x1F440, // Smiley 102 + 'NOSE' => 0x1F443, // Smiley 103 + 'TONGUE' => 0x1F445, // Smiley 104 + 'MOUTH' => 0x1F444, // Smiley 105 + 'THUMBS_UP_SIGN' => 0x1F44D, // Smiley 106 + 'THUMBS_DOWN_SIGN' => 0x1F44E, // Smiley 107 + 'OK_HAND_SIGN' => 0x1F44C, // Smiley 108 + 'FISTED_HAND_SIGN' => 0x1F44A, // Smiley 109 + 'RAISED_FIST' => 0x270A, // Smiley 110 + 'VICTORY_HAND' => 0x270C, // Smiley 111 + 'WAVING_HAND_SIGN' => 0x1F44B, // Smiley 112 + 'RAISED_HAND' => 0x270B, // Smiley 113 + 'OPEN_HANDS_SIGN' => 0x1F450, // Smiley 114 + 'WHITE_UP_POINTING_BACKHAND_INDEX' => 0x1F446, // Smiley 115 + 'WHITE_DOWN_POINTING_BACKHAND_INDEX' => 0x1F447, // Smiley 116 + 'WHITE_RIGHT_POINTING_BACKHAND_INDEX' => 0x1F449, // Smiley 117 + 'WHITE_LEFT_POINTING_BACKHAND_INDEX' => 0x1F448, // Smiley 118 + 'PERSON_RAISING_BOTH_HANDS_IN_CELEBRATION' => 0x1F64C, // Smiley 119 + 'PERSON_WITH_FOLDED_HANDS' => 0x1F64F, // Smiley 120 + 'WHITE_UP_POINTING_INDEX' => 0x261D, // Smiley 121 + 'CLAPPING_HANDS_SIGN' => 0x1F44F, // Smiley 122 + 'FLEXED_BICEPS' => 0x1F4AA, // Smiley 123 + 'PEDESTRIAN' => 0x1F6B6, // Smiley 124 + 'RUNNER' => 0x1F3C3, // Smiley 125 + 'DANCER' => 0x1F483, // Smiley 126 + 'MAN_AND_WOMAN_HOLDING_HANDS' => 0x1F46B, // Smiley 127 + 'FAMILY' => 0x1F46A, // Smiley 128 + 'TWO_MEN_HOLDING_HANDS' => 0x1F46C, // Smiley 129 + 'TWO_WOMEN_HOLDING_HANDS' => 0x1F46D, // Smiley 130 + 'KISS' => 0x1F48F, // Smiley 131 + 'COUPLE_WITH_HEART' => 0x1F491, // Smiley 132 + 'WOMEN_WITH_BUNNY_EARS' => 0x1F46F, // Smiley 133 + 'FACE_WITH_OK_GESTURE' => 0x1F646, // Smiley 134 + 'FACE_WITH_NO_GOOD_GESTURE' => 0x1F645, // Smiley 135 + 'INFORMATION_DESK_PERSON' => 0x1F481, // Smiley 136 + 'HAPPY_PERSON_RAISING_ONE_HAND' => 0x1F64B, // Smiley 137 + 'FACE_MASSAGE' => 0x1F486, // Smiley 138 + 'HAIRCUT' => 0x1F487, // Smiley 139 + 'NAIL_POLISH' => 0x1F485, // Smiley 140 + 'BRIDE_WITH_VEIL' => 0x1F470, // Smiley 141 + 'PERSON_WITH_POUTING_FACE' => 0x1F64E, // Smiley 142 + 'PERSON_FROWNING' => 0x1F64D, // Smiley 143 + 'PERSON_BOWING_DEEPLY' => 0x1F647, // Smiley 144 + 'TOP_HAT' => 0x1F3A9, // Smiley 145 + 'CROWN' => 0x1F451, // Smiley 146 + 'WOMANS_HAT' => 0x1F452, // Smiley 147 + 'ATHLETIC_SHOE' => 0x1F45F, // Smiley 148 + 'MENS_SHOE' => 0x1F45E, // Smiley 149 + 'WOMANS_SANDAL' => 0x1F461, // Smiley 150 + 'HIGH_HEELED_SHOE' => 0x1F460, // Smiley 151 + 'WOMANS_BOOTS' => 0x1F462, // Smiley 152 + 'T_SHIRT' => 0x1F455, // Smiley 153 + 'NECKTIE' => 0x1F454, // Smiley 154 + 'WOMANS_CLOTHES' => 0x1F45A, // Smiley 155 + 'DRESS' => 0x1F457, // Smiley 156 + 'RUNNING_SHIRT_WITH_SASH' => 0x1F3BD, // Smiley 157 + 'JEANS' => 0x1F456, // Smiley 158 + 'KIMONO' => 0x1F458, // Smiley 159 + 'BIKINI' => 0x1F459, // Smiley 160 + 'BRIEFCASE' => 0x1F4BC, // Smiley 161 + 'HANDBAG' => 0x1F45C, // Smiley 162 + 'POUCH' => 0x1F45D, // Smiley 163 + 'PURSE' => 0x1F45B, // Smiley 164 + 'EYEGLASSES' => 0x1F453, // Smiley 165 + 'RIBBON' => 0x1F380, // Smiley 166 + 'CLOSED_UMBRELLA' => 0x1F302, // Smiley 167 + 'LIPSTICK' => 0x1F484, // Smiley 168 + 'YELLOW_HEART' => 0x1F49B, // Smiley 169 + 'BLUE_HEART' => 0x1F499, // Smiley 170 + 'PURPLE_HEART' => 0x1F49C, // Smiley 171 + 'GREEN_HEART' => 0x1F49A, // Smiley 172 + 'HEAVY_BLACK_HEART' => 0x2764, // Smiley 173 + 'BROKEN_HEART' => 0x1F494, // Smiley 174 + 'GROWING_HEART' => 0x1F497, // Smiley 175 + 'BEATING_HEART' => 0x1F493, // Smiley 176 + 'TWO_HEARTS' => 0x1F495, // Smiley 177 + 'SPARKLING_HEARTS' => 0x1F496, // Smiley 178 + 'REVOLVING_HEARTS' => 0x1F49E, // Smiley 179 + 'HEART_WITH_ARROW' => 0x1F498, // Smiley 180 + 'LOVE_LETTER' => 0x1F48C, // Smiley 181 + 'KISS_MARK' => 0x1F48B, // Smiley 182 + 'RING' => 0x1F48D, // Smiley 183 + 'GEM_STONE' => 0x1F48E, // Smiley 184 + 'BUST_IN_SILHOUETTE' => 0x1F464, // Smiley 185 + 'BUSTS_IN_SILHOUETTE' => 0x1F465, // Smiley 186 + 'SPEECH_BALLOON' => 0x1F4AC, // Smiley 187 + 'FOOTPRINTS' => 0x1F463, // Smiley 188 + 'THOUGHT_BALLOON' => 0x1F4AD, // Smiley 189 + 'DOG_FACE' => 0x1F436, // Smiley 190 + 'WOLF_FACE' => 0x1F43A, // Smiley 191 + 'CAT_FACE' => 0x1F431, // Smiley 192 + 'MOUSE_FACE' => 0x1F42D, // Smiley 193 + 'HAMSTER_FACE' => 0x1F439, // Smiley 194 + 'RABBIT_FACE' => 0x1F430, // Smiley 195 + 'FROG_FACE' => 0x1F438, // Smiley 196 + 'TIGER_FACE' => 0x1F42F, // Smiley 197 + 'KOALA' => 0x1F428, // Smiley 198 + 'BEAR_FACE' => 0x1F43B, // Smiley 199 + 'PIG_FACE' => 0x1F437, // Smiley 200 + 'PIG_NOSE' => 0x1F43D, // Smiley 201 + 'COW_FACE' => 0x1F42E, // Smiley 202 + 'BOAR' => 0x1F417, // Smiley 203 + 'MONKEY_FACE' => 0x1F435, // Smiley 204 + 'MONKEY' => 0x1F412, // Smiley 205 + 'HORSE_FACE' => 0x1F434, // Smiley 206 + 'SHEEP' => 0x1F411, // Smiley 207 + 'ELEPHANT' => 0x1F418, // Smiley 208 + 'PANDA_FACE' => 0x1F43C, // Smiley 209 + 'PENGUIN' => 0x1F427, // Smiley 210 + 'BIRD' => 0x1F426, // Smiley 211 + 'BABY_CHICK' => 0x1F424, // Smiley 212 + 'FRONT_FACING_BABY_CHICK' => 0x1F425, // Smiley 213 + 'HATCHING_CHICK' => 0x1F423, // Smiley 214 + 'CHICKEN' => 0x1F414, // Smiley 215 + 'SNAKE' => 0x1F40D, // Smiley 216 + 'TURTLE' => 0x1F422, // Smiley 217 + 'BUG' => 0x1F41B, // Smiley 218 + 'HONEYBEE' => 0x1F41D, // Smiley 219 + 'ANT' => 0x1F41C, // Smiley 220 + 'LADY_BEETLE' => 0x1F41E, // Smiley 221 + 'SNAIL' => 0x1F40C, // Smiley 222 + 'OCTOPUS' => 0x1F419, // Smiley 223 + 'SPIRAL_SHELL' => 0x1F41A, // Smiley 224 + 'TROPICAL_FISH' => 0x1F420, // Smiley 225 + 'FISH' => 0x1F41F, // Smiley 226 + 'DOLPHIN' => 0x1F42C, // Smiley 227 + 'SPOUTING_WHALE' => 0x1F433, // Smiley 228 + 'WHALE' => 0x1F40B, // Smiley 229 + 'COW' => 0x1F404, // Smiley 230 + 'RAM' => 0x1F40F, // Smiley 231 + 'RAT' => 0x1F400, // Smiley 232 + 'WATER_BUFFALO' => 0x1F403, // Smiley 233 + 'TIGER' => 0x1F405, // Smiley 234 + 'RABBIT' => 0x1F407, // Smiley 235 + 'DRAGON' => 0x1F409, // Smiley 236 + 'HORSE' => 0x1F40E, // Smiley 237 + 'GOAT' => 0x1F410, // Smiley 238 + 'ROOSTER' => 0x1F413, // Smiley 239 + 'DOG' => 0x1F415, // Smiley 240 + 'PIG' => 0x1F416, // Smiley 241 + 'MOUSE' => 0x1F401, // Smiley 242 + 'OX' => 0x1F402, // Smiley 243 + 'DRAGON_FACE' => 0x1F432, // Smiley 244 + 'BLOWFISH' => 0x1F421, // Smiley 245 + 'CROCODILE' => 0x1F40A, // Smiley 246 + 'BACTRIAN_CAMEL' => 0x1F42B, // Smiley 247 + 'DROMEDARY_CAMEL' => 0x1F42A, // Smiley 248 + 'LEOPARD' => 0x1F406, // Smiley 249 + 'CAT' => 0x1F408, // Smiley 250 + 'POODLE' => 0x1F429, // Smiley 251 + 'PAW_PRINTS' => 0x1F43E, // Smiley 252 + 'BOUQET' => 0x1F490, // Smiley 253 + 'CHERRY_BLOSSOM' => 0x1F338, // Smiley 254 + 'TULIP' => 0x1F337, // Smiley 255 + 'FOUR_LEAF_CLOVER' => 0x1F340, // Smiley 256 + 'ROSE' => 0x1F339, // Smiley 257 + 'SUNFLOWER' => 0x1F33B, // Smiley 258 + 'HIBISCUS' => 0x1F33A, // Smiley 259 + 'MAPLE_LEAF' => 0x1F341, // Smiley 260 + 'LEAF_FLUTTERING_IN_WIND' => 0x1F343, // Smiley 261 + 'FALLEN_LEAF' => 0x1F342, // Smiley 262 + 'HERB' => 0x1F33F, // Smiley 263 + 'EAR_OF_RICE' => 0x1F33E, // Smiley 264 + 'MUSHROOM' => 0x1F344, // Smiley 265 + 'CACTUS' => 0x1F335, // Smiley 266 + 'PALM_TREE' => 0x1F334, // Smiley 267 + 'EVERGREEN_TREE' => 0x1F332, // Smiley 268 + 'DECIDUOUS_TREE' => 0x1F333, // Smiley 269 + 'CHESTNUT' => 0x1F330, // Smiley 270 + 'SEEDLING' => 0x1F331, // Smiley 271 + 'BLOSSOM' => 0x1F33C, // Smiley 272 + 'GLOBE_WITH_MERIDIANS' => 0x1F310, // Smiley 273 + 'SUN_WITH_FACE' => 0x1F31E, // Smiley 274 + 'FULL_MOON_WITH_FACE' => 0x1F31D, // Smiley 275 + 'NEW_MOON_WITH_FACE' => 0x1F31A, // Smiley 276 + 'NEW_MOON_SYMBOL' => 0x1F311, // Smiley 277 + 'WAXING_CRESCENDING_MOON_SYMBOL' => 0x1F312, // Smiley 278 + 'FIRST_QUARTER_MOON_SYMBOL' => 0x1F313, // Smiley 279 + 'WAXING_GIBBOUS_MOON_SYMBOL' => 0x1F314, // Smiley 280 + 'FULL_MOON_SYMBOL' => 0x1F315, // Smiley 281 + 'WANNING_GIBBOUS_MOON_SYMBOL' => 0x1F316, // Smiley 282 + 'LAST_QUARTER_MOON_SYMBOL' => 0x1F317, // Smiley 283 + 'WANNING_CRESCENT_MOON_SYMBOL' => 0x1F318, // Smiley 284 + 'LAST_QUARTER_MOON_WITH_FACE' => 0x1F31C, // Smiley 285 + 'FIRST_QUARTER_MOON_WITH_FACE' => 0x1F31B, // Smiley 286 + 'CRESCENT_MOON' => 0x1F319, // Smiley 287 + 'EARTH_GLOBE_EUROPE_AFRICA' => 0x1F30D, // Smiley 288 + 'EARTH_GLOBE_AMERICAS' => 0x1F30E, // Smiley 289 + 'EARTH_GLOBE_ASIA_AUSTRALIA' => 0x1F30F, // Smiley 290 + 'VOLCANO' => 0x1F30B, // Smiley 291 + 'MILKY_WAY' => 0x1F30C, // Smiley 292 + 'SHOOTING_STAR' => 0x1F320, // Smiley 293 + 'WHITE_MEDIUM_STAR' => 0x2B50, // Smiley 294 + 'BLACK_SUN_WITH_RAYS' => 0x2600, // Smiley 295 + 'SUN_BEHIND_CLOUD' => 0x26C5, // Smiley 296 + 'CLOUD' => 0x2601, // Smiley 297 + 'HIGH_VOLTAGE_SIGN' => 0x26A1, // Smiley 298 + 'UMBRELLA_WITH_RAIN_DROPS' => 0x2614, // Smiley 299 + 'SNOW_FLAKE' => 0x2744, // Smiley 300 + 'SNOWMAN_WITHOUT_SNOW' => 0x26C4, // Smiley 301 + 'CYCLONE' => 0x1F300, // Smiley 302 + 'FOGGY' => 0x1F301, // Smiley 303 + 'RAINBOW' => 0x1F308, // Smiley 304 + 'WATER_WAVE' => 0x1F30A, // Smiley 305 + 'PINE_DECORATION' => 0x1F38D, // Smiley 306 + 'HEART_WITH_RIBBON' => 0x1F49D, // Smiley 307 + 'JAPANESE_DOLLS' => 0x1F38E, // Smiley 308 + 'SCHOOL_SATCHEL' => 0x1F392, // Smiley 309 + 'GRADUATION_CAP' => 0x1F393, // Smiley 310 + 'CARP_STREAMER' => 0x1F38F, // Smiley 311 + 'FIREWORKS' => 0x1F386, // Smiley 312 + 'FIREWORKS_SPARKLER' => 0x1F387, // Smiley 313 + 'WIND_CHIME' => 0x1F390, // Smiley 314 + 'MOON_VIEWING_CEREMONY' => 0x1F391, // Smiley 315 + 'JACK_O_LANTERN' => 0x1F383, // Smiley 316 + 'GHOST' => 0x1F47B, // Smiley 317 + 'FATHER_CHRISTMAS' => 0x1F385, // Smiley 318 + 'CHRISTMAS_TREE' => 0x1F384, // Smiley 319 + 'WRAPPED_PRESENT' => 0x1F381, // Smiley 320 + 'TANABATA_TREE' => 0x1F38B, // Smiley 321 + 'PARTY_POPPER' => 0x1F389, // Smiley 322 + 'CONFETTI_BALL' => 0x1F38A, // Smiley 323 + 'BALLOON' => 0x1F388, // Smiley 324 + 'CROSSED_FLAGS' => 0x1F38C, // Smiley 325 + 'CRYSTAL_BALL' => 0x1F52E, // Smiley 326 + 'MOVIE_CAMERA' => 0x1F3A5, // Smiley 327 + 'CAMERA' => 0x1F4F7, // Smiley 328 + 'VIDEO_CAMERA' => 0x1F4F9, // Smiley 329 + 'VIDEOCASSETTE' => 0x1F4FC, // Smiley 330 + 'OPTICAL_DISC' => 0x1F4BF, // Smiley 331 + 'DVD' => 0x1F4C0, // Smiley 332 + 'MINIDISC' => 0x1F4BD, // Smiley 333 + 'FLOPPY_DISK' => 0x1F4BE, // Smiley 334 + 'PERSONAL_COMPUTER' => 0x1F4BB, // Smiley 335 + 'MOBILE_PHONE' => 0x1F4F1, // Smiley 336 + 'BLACK_TELEPHONE' => 0x260E, // Smiley 337 + 'TELEPHONE_RECEIVER' => 0x1F4DE, // Smiley 338 + 'PAGER' => 0x1F4DF, // Smiley 339 + 'FAX_MACHINE' => 0x1F4E0, // Smiley 340 + 'SATELLITE_ANTENNA' => 0x1F4E1, // Smiley 341 + 'TELEVISION' => 0x1F4FA, // Smiley 342 + 'RADIO' => 0x1F4FB, // Smiley 343 + 'SPEAKER_WITH_THREE_SOUND_WAVES' => 0x1F50A, // Smiley 344 + 'SPEAKER_WITH_ONE_SOUND_WAVE' => 0x1F509, // Smiley 345 + 'SPEAKER' => 0x1F508, // Smiley 346 + 'SPEAKER_WITH_CANCELLATION_STROKE' => 0x1F507, // Smiley 347 + 'BELL' => 0x1F514, // Smiley 348 + 'BELL_WITH_CANCELLATION_STROKE' => 0x1F515, // Smiley 349 + 'PUBLIC_ADDRESS_LOUDSPEAKER' => 0x1F4E2, // Smiley 350 + 'CHEERING_MEGAPHONE' => 0x1F4E3, // Smiley 351 + 'HOURGLASS_WITH_FLOWING_SAND' => 0x23F3, // Smiley 352 + 'HOURGLASS' => 0x231B, // Smiley 353 + 'ALARM_CLOCK' => 0x23F0, // Smiley 354 + 'WATCH' => 0x231A, // Smiley 355 + 'OPEN_LOCK' => 0x1F513, // Smiley 356 + 'LOCK' => 0x1F512, // Smiley 357 + 'LOCK_WITH_INK_PEN' => 0x1F50F, // Smiley 358 + 'CLOSED_LOCK_WITH_KEY' => 0x1F510, // Smiley 359 + 'KEY' => 0x1F511, // Smiley 360 + 'RIGHT_POINTING_MAGNIFYING_GLASS' => 0x1F50E, // Smiley 361 + 'ELECTRIC_LIGHT_BULB' => 0x1F4A1, // Smiley 362 + 'ELECTRIC_TORCH' => 0x1F526, // Smiley 363 + 'HIGH_BRIGHTNESS_SYMBOL' => 0x1F506, // Smiley 364 + 'LOW_BRIGHTNESS_SYMBOL' => 0x1F505, // Smiley 365 + 'ELECTRIC_PLUG' => 0x1F50C, // Smiley 366 + 'BATTERY' => 0x1F50B, // Smiley 367 + 'LEFT_POINTING_MAGNIFYING_GLASS' => 0x1F50D, // Smiley 368 + 'BATHTUB' => 0x1F6C1, // Smiley 369 + 'BATH' => 0x1F6C0, // Smiley 370 + 'SHOWER' => 0x1F6BF, // Smiley 371 + 'TOILET' => 0x1F6BD, // Smiley 372 + 'WRENCH' => 0x1F527, // Smiley 373 + 'NUT_AND_BOLT' => 0x1F529, // Smiley 374 + 'HAMMER' => 0x1F528, // Smiley 375 + 'DOOR' => 0x1F6AA, // Smiley 376 + 'SMOKING_SYMBOL' => 0x1F6AC, // Smiley 377 + 'BOMB' => 0x1F4A3, // Smiley 378 + 'PISTOL' => 0x1F52B, // Smiley 379 + 'HOCHO' => 0x1F52A, // Smiley 380 + 'PILL' => 0x1F48A, // Smiley 381 + 'SYRINGE' => 0x1F489, // Smiley 382 + 'MONEY_BAG' => 0x1F4B0, // Smiley 383 + 'BANKNOTE_WITH_YEN_SIGN' => 0x1F4B4, // Smiley 384 + 'BANKNOTE_WITH_DOLLAR_SIGN' => 0x1F4B5, // Smiley 385 + 'BANKNOTE_WITH_POUND_SIGN' => 0x1F4B7, // Smiley 386 + 'BANKNOTE_WITH_EURO_SIGN' => 0x1F4B6, // Smiley 387 + 'CREDIT_CARD' => 0x1F4B3, // Smiley 388 + 'MONEY_WITH_WINGS' => 0x1F4B8, // Smiley 389 + 'MOBILE_PHONE_WITH_RIGHTWARDS_ARROW' => 0x1F4F2, // Smiley 390 + 'E_MAIL_SYMBOL' => 0x1F4E7, // Smiley 391 + 'INBOX_TRAY' => 0x1F4E5, // Smiley 392 + 'OUTBOX_TRAY' => 0x1F4E4, // Smiley 393 + 'ENVELOPE' => 0x2709, // Smiley 394 + 'ENVELOPE_WITH_DOWNWARDS_ARROW_ABOVE' => 0x1F4E9, // Smiley 395 + 'INCOMING_ENVELOPE' => 0x1F4E8, // Smiley 396 + 'POSTAL_HORN' => 0x1F4EF, // Smiley 397 + 'CLOSED_MAILBOX_WITH_RAISED_FLAG' => 0x1F4EB, // Smiley 398 + 'CLOSED_MAILBOX_WITH_LOWERED_FLAG' => 0x1F4EA, // Smiley 399 + 'OPEN_MAILBOX_WITH_RAISED_FLAG' => 0x1F4EC, // Smiley 400 + 'OPEN_MAILBOX_WITH_LOWERED_FLAG' => 0x1F4ED, // Smiley 401 + 'POSTBOX' => 0x1F4EE, // Smiley 402 + 'PACKAGE' => 0x1F4E6, // Smiley 403 + 'MEMO' => 0x1F4DD, // Smiley 404 + 'PAGE_FACING_UP' => 0x1F4C4, // Smiley 405 + 'PAGE_WITH_CURL' => 0x1F4C3, // Smiley 406 + 'BOOKMARK_TABS' => 0x1F4D1, // Smiley 407 + 'BAR_CHART' => 0x1F4CA, // Smiley 408 + 'CHART_WITH_UPWARDS_TREND' => 0x1F4C8, // Smiley 409 + 'CHART_WITH_DOWNWARD_TREND' => 0x1F4C9, // Smiley 410 + 'SCROLL' => 0x1F4DC, // Smiley 411 + 'CLIPBOARD' => 0x1F4CB, // Smiley 412 + 'CALENDAR' => 0x1F4C5, // Smiley 413 + 'TEAR_OFF_CALENDAR' => 0x1F4C6, // Smiley 414 + 'CARD_INDEX' => 0x1F4C7, // Smiley 415 + 'FILE_FOLDER' => 0x1F4C1, // Smiley 416 + 'OPEN_FILE_FOLDER' => 0x1F4C2, // Smiley 417 + 'BLACK_SCISSORS' => 0x2702, // Smiley 418 + 'PUSHPIN' => 0x1F4CC, // Smiley 419 + 'PAPERCLIP' => 0x1F4CE, // Smiley 420 + 'BLACK_NIB' => 0x2712, // Smiley 421 + 'PENCIL' => 0x270F, // Smiley 422 + 'STRAIGHT_RULER' => 0x1F4CF, // Smiley 423 + 'TRIANGULAR_RULER' => 0x1F4D0, // Smiley 424 + 'CLOSED_BOOK' => 0x1F4D5, // Smiley 425 + 'GREEN_BOOK' => 0x1F4D7, // Smiley 426 + 'BLUE_BOOK' => 0x1F4D8, // Smiley 427 + 'ORANGE_BOOK' => 0x1F4D9, // Smiley 428 + 'NOTEBOOK' => 0x1F4D3, // Smiley 429 + 'NOTEBOOK_WITH_DECORATIVE_COVER' => 0x1F4D4, // Smiley 430 + 'LEDGER' => 0x1F4D2, // Smiley 431 + 'BOOKS' => 0x1F4DA, // Smiley 432 + 'OPEN_BOOK' => 0x1F4D6, // Smiley 433 + 'BOOKMARK' => 0x1F516, // Smiley 434 + 'NAME_BADGE' => 0x1F4DB, // Smiley 435 + 'MICROSCOPE' => 0x1F52C, // Smiley 436 + 'TELESCOPE' => 0x1F52D, // Smiley 437 + 'NEWSPAPER' => 0x1F4F0, // Smiley 438 + 'ARTIST_PALETTE' => 0x1F3A8, // Smiley 439 + 'CLAPPER_BOARD' => 0x1F3AC, // Smiley 440 + 'MICROPHONE' => 0x1F3A4, // Smiley 441 + 'HEADPHONE' => 0x1F3A7, // Smiley 442 + 'MUSICAL_SCORE' => 0x1F3BC, // Smiley 443 + 'MUSICAL_NOTE' => 0x1F3B5, // Smiley 444 + 'MULTIPLE_MUSICAL_NOTES' => 0x1F3B6, // Smiley 445 + 'MUSICAL_KEYBOARD' => 0x1F3B9, // Smiley 446 + 'VIOLIN' => 0x1F3BB, // Smiley 447 + 'TRUMPET' => 0x1F3BA, // Smiley 448 + 'SAXOPHONE' => 0x1F3B7, // Smiley 449 + 'GUITAR' => 0x1F3B8, // Smiley 450 + 'ALIEN_MONSTER' => 0x1F47E, // Smiley 451 + 'VIDEO_GAME' => 0x1F3AE, // Smiley 452 + 'PLAYING_CARD_BLACK_JOKER' => 0x1F0CF, // Smiley 453 + 'FLOWER_PLAYING_CARDS' => 0x1F3B4, // Smiley 454 + 'MAHJONG_TILE_RED_DRAGON' => 0x1F004, // Smiley 455 + 'GAME_DIE' => 0x1F3B2, // Smiley 456 + 'DIRECT_HIT' => 0x1F3AF, // Smiley 457 + 'AMERICAN_FOOTBALL' => 0x1F3C8, // Smiley 458 + 'BASKETBALL_AND_HOOP' => 0x1F3C0, // Smiley 459 + 'SOCCER_BALL' => 0x26BD, // Smiley 460 + 'BASEBALL' => 0x26BE, // Smiley 461 + 'GREEN_BOOK' => 0x1F4D7, // Smiley 462 + 'TENNIS_RACQUET_AND_BALL' => 0x1F3BE, // Smiley 463 + 'BILLIARDS' => 0x1F3B1, // Smiley 464 + 'RUGBY_FOOTBALL' => 0x1F3C9, // Smiley 465 + 'BOWLING' => 0x1F3B3, // Smiley 466 + 'FLAG_IN_HOLE' => 0x26F3, // Smiley 467 + 'MOUNTAIN_BYCICLIST' => 0x1F6B5, // Smiley 468 + 'BYCICLIST' => 0x1F6B4, // Smiley 469 + 'CHECKERED_FLAG' => 0x1F3C1, // Smiley 470 + 'HORSE_RACING' => 0x1F3C7, // Smiley 471 + 'TROPHY' => 0x1F3C6, // Smiley 472 + 'SKI_AND_SKI_BOOT' => 0x1F3BF, // Smiley 473 + 'SNOWBOARDER' => 0x1F3C2, // Smiley 474 + 'SWIMMER' => 0x1F3CA, // Smiley 475 + 'SURFER' => 0x1F3C4, // Smiley 476 + 'FISHING_POLE_AND_FISH' => 0x1F3A3, // Smiley 477 + 'HOT_BEVERAGE' => 0x2615, // Smiley 478 + 'TEACUP_WITHOUT_HANDLE' => 0x1F375, // Smiley 479 + 'SAKE_BOTTLE_AND_CUP' => 0x1F376, // Smiley 480 + 'BABY_BOTTLE' => 0x1F37C, // Smiley 481 + 'BEER_MUG' => 0x1F37A, // Smiley 482 + 'CLINKING_BEER_MUGS' => 0x1F37B, // Smiley 483 + 'TROPICAL_DRINK' => 0x1F379, // Smiley 484 + 'WINE_GLASS' => 0x1F377, // Smiley 485 + 'FORK_AND_KNIFE' => 0x1F374, // Smiley 486 + 'SLICE_OF_PIZZA' => 0x1F355, // Smiley 487 + 'HAMBURGER' => 0x1F354, // Smiley 488 + 'FRENCH_FRIES' => 0x1F35F, // Smiley 489 + 'POULTRY_LEG' => 0x1F357, // Smiley 490 + 'MEAT_ON_BONE' => 0x1F356, // Smiley 491 + 'SPAGHETTI' => 0x1F35D, // Smiley 492 + 'CURRY_AND_RICE' => 0x1F35B, // Smiley 493 + 'FRIED_SHRIMP' => 0x1F364, // Smiley 494 + 'BENTO_BOX' => 0x1F371, // Smiley 495 + 'SUSHI' => 0x1F363, // Smiley 496 + 'FISH_CAKE_WITH_SWIRL_DESIGN' => 0x1F365, // Smiley 497 + 'RICE_BALL' => 0x1F359, // Smiley 498 + 'RICE_CRACKER' => 0x1F358, // Smiley 499 + 'COOKED_RICE' => 0x1F35A, // Smiley 500 + 'STEAMING_BOWL' => 0x1F35C, // Smiley 501 + 'POT_OF_FOOD' => 0x1F372, // Smiley 502 + 'ODEN' => 0x1F362, // Smiley 503 + 'DANGO' => 0x1F361, // Smiley 504 + 'COOKING' => 0x1F373, // Smiley 505 + 'BREAD' => 0x1F35E, // Smiley 506 + 'DOUGHNUT' => 0x1F369, // Smiley 507 + 'CUSTARD' => 0x1F36E, // Smiley 508 + 'SOFT_ICE_CREAM' => 0x1F366, // Smiley 509 + 'ICE_CREAM' => 0x1F368, // Smiley 510 + 'SHAVED_ICE' => 0x1F367, // Smiley 511 + 'BIRTHDAY_CAKE' => 0x1F382, // Smiley 512 + 'SHORTCAKE' => 0x1F370, // Smiley 513 + 'COOKIE' => 0x1F36A, // Smiley 514 + 'CHOCOLATE_BAR' => 0x1F36B, // Smiley 515 + 'CANDY' => 0x1F36C, // Smiley 516 + 'LOLLIPOP' => 0x1F36D, // Smiley 517 + 'HONEY_POT' => 0x1F36F, // Smiley 518 + 'RED_APPLE' => 0x1F34E, // Smiley 519 + 'GREEN_APPLE' => 0x1F34F, // Smiley 520 + 'TANGERINE' => 0x1F34A, // Smiley 521 + 'LEMON' => 0x1F34B, // Smiley 522 + 'CHERRIES' => 0x1F352, // Smiley 523 + 'GRAPES' => 0x1F347, // Smiley 524 + 'WATERMELON' => 0x1F349, // Smiley 525 + 'STRAWBERRY' => 0x1F353, // Smiley 526 + 'PEACH' => 0x1F351, // Smiley 527 + 'MELON' => 0x1F348, // Smiley 528 + 'BANANA' => 0x1F34C, // Smiley 529 + 'PEAR' => 0x1F350, // Smiley 530 + 'PINEAPPLE' => 0x1F34D, // Smiley 531 + 'ROASTED_SWEET_POTATO' => 0x1F360, // Smiley 532 + 'AUBERGINE' => 0x1F346, // Smiley 533 + 'TOMATO' => 0x1F345, // Smiley 534 + 'EAR_OF_MAIZE' => 0x1F33D, // Smiley 535 + 'HOUSE_BUILDING' => 0x1F3E0, // Smiley 536 + 'HOUSE_WITH_GARDEN' => 0x1F3E1, // Smiley 537 + 'SCHOOL' => 0x1F3EB, // Smiley 538 + 'OFFICE_BUILDING' => 0x1F3E2, // Smiley 539 + 'JAPANESE_POST_OFFICE' => 0x1F3E3, // Smiley 540 + 'HOSPITAL' => 0x1F3E5, // Smiley 541 + 'BANK' => 0x1F3E6, // Smiley 542 + 'CONVINIENCE_STORE' => 0x1F3EA, // Smiley 543 + 'LOVE_HOTEL' => 0x1F3E9, // Smiley 544 + 'HOTEL' => 0x1F3E8, // Smiley 545 + 'WEDDING' => 0x1F492, // Smiley 546 + 'CHURCH' => 0x26EA, // Smiley 547 + 'DEPARTMENT_STORE' => 0x1F3EC, // Smiley 548 + 'EUROPEAN_POST_OFFICE' => 0x1F3E4, // Smiley 549 + 'SUNSET_OVER_BUILDINGS' => 0x1F307, // Smiley 550 + 'CITYSCAPE_AT_DUSK' => 0x1F306, // Smiley 551 + 'JAPANESE_CASTLE' => 0x1F3EF, // Smiley 552 + 'EUROPEAN_CASTLE' => 0x1F3F0, // Smiley 553 + 'TENT' => 0x26FA, // Smiley 554 + 'FACTORY' => 0x1F3ED, // Smiley 555 + 'TOKYO_TOWER' => 0x1F5FC, // Smiley 556 + 'SILHOUETTE_OF_JAPAN' => 0x1F5FE, // Smiley 557 + 'MOUNT_FUJI' => 0x1F5FB, // Smiley 558 + 'SUNRISE_OVER_MOUNTAINS' => 0x1F304, // Smiley 559 + 'SUNRISE' => 0x1F305, // Smiley 560 + 'NIGHT_WITH_STARS' => 0x1F303, // Smiley 561 + 'STATUE_OF_LIBERTY' => 0x1F5FD, // Smiley 562 + 'BRIDGE_AT_NIGHT' => 0x1F309, // Smiley 563 + 'CAROUSEL_HORSE' => 0x1F3A0, // Smiley 564 + 'FERRIS_WHEEL' => 0x1F3A1, // Smiley 565 + 'FOUNTAIN' => 0x26F2, // Smiley 566 + 'ROLLER_COASTER' => 0x1F3A2, // Smiley 567 + 'SHIP' => 0x1F6A2, // Smiley 568 + 'SAILBOAT' => 0x26F5, // Smiley 569 + 'SPEEDBOAT' => 0x1F6A4, // Smiley 570 + 'ROWBOAT' => 0x1F6A3, // Smiley 571 + 'ANCHOR' => 0x2693, // Smiley 572 + 'ROCKET' => 0x1F680, // Smiley 573 + 'AIRPLANE' => 0x2708, // Smiley 574 + 'SEAT' => 0x1F4BA, // Smiley 575 + 'HELICOPTER' => 0x1F681, // Smiley 576 + 'STEAM_LOCOMOTIVE' => 0x1F682, // Smiley 577 + 'TRAM' => 0x1F68A, // Smiley 578 + 'STATION' => 0x1F689, // Smiley 579 + 'MOUNTAIN_RAILWAY' => 0x1F69E, // Smiley 580 + 'TRAIN' => 0x1F686, // Smiley 581 + 'HIGH_SPEED_TRAIN' => 0x1F684, // Smiley 582 + 'HIGH_SPEED_TRAIN_WITH_BULLET_NOSE' => 0x1F685, // Smiley 583 + 'LIGHT_RAIL' => 0x1F688, // Smiley 584 + 'METRO' => 0x1F687, // Smiley 585 + 'MONO_RAIL' => 0x1F69D, // Smiley 586 + 'TRAM_CAR' => 0x1F68B, // Smiley 587 + 'RAILWAY_CAR' => 0x1F683, // Smiley 588 + 'TROLLEYBUS' => 0x1F68E, // Smiley 589 + 'BUS' => 0x1F68C, // Smiley 590 + 'ONCOMING_BUS' => 0x1F68D, // Smiley 591 + 'RECREATION_VEHICLE' => 0x1F699, // Smiley 592 + 'ONCOMING_AUTOMOBILE' => 0x1F698, // Smiley 593 + 'AUTOMOBILE' => 0x1F697, // Smiley 594 + 'TAXI' => 0x1F695, // Smiley 595 + 'ONCOMING_TAXI' => 0x1F696, // Smiley 596 + 'ARTICULATED_LORRY' => 0x1F69B, // Smiley 597 + 'DELIVERY_TRUCK' => 0x1F69A, // Smiley 598 + 'POLICE_CARS_REVOLVING_LIGHT' => 0x1F6A8, // Smiley 599 + 'POLICE_CAR' => 0x1F693, // Smiley 600 + 'ONCOMING_POLICE_CAR' => 0x1F694, // Smiley 601 + 'FIRE_ENGINE' => 0x1F692, // Smiley 602 + 'AMBULANCE' => 0x1F691, // Smiley 603 + 'MINBUS' => 0x1F690, // Smiley 604 + 'BICYCLE' => 0x1F6B2, // Smiley 605 + 'AERIAL_TRAMWAY' => 0x1F6A1, // Smiley 606 + 'SUSPENSION_RAILWAY' => 0x1F69F, // Smiley 607 + 'MOUNTAIN_CABLEWAY' => 0x1F6A0, // Smiley 608 + 'TRACTOR' => 0x1F69C, // Smiley 609 + 'BARBER_POLE' => 0x1F488, // Smiley 610 + 'BUS_STOP' => 0x1F68F, // Smiley 611 + 'TICKET' => 0x1F3AB, // Smiley 612 + 'VERTICAL_TRAFFIC_LIGHT' => 0x1F6A6, // Smiley 613 + 'HORIZONTAL_TRAFFIC_LIGHT' => 0x1F6A5, // Smiley 614 + 'WARNING_SIGN' => 0x26A0, // Smiley 615 + 'CONSTRUCTION_SIGN' => 0x1F6A7, // Smiley 616 + 'JAPANESE_SYMBOL_FOR_BEGINNER' => 0x1F530, // Smiley 617 + 'FUEL_PUMP' => 0x26FD, // Smiley 618 + 'IZAKAYA_LANTERN' => 0x1F3EE, // Smiley 619 + 'SLOT_MACHINE' => 0x1F3B0, // Smiley 620 + 'HOT_SPRINGS' => 0x2668, // Smiley 621 + 'MOYAI' => 0x1F5FF, // Smiley 622 + 'CIRCUS_TENT' => 0x1F3AA, // Smiley 623 + 'PERFORMING_ARTS' => 0x1F3AD, // Smiley 624 + 'ROUND_PUSHPIN' => 0x1F4CD, // Smiley 625 + 'TRIANGULAR_FLAG_ON_POST' => 0x1F6A9, // Smiley 626 + 'REGIONAL_INDICATOR_SYMBOL_LETTERS_JP' => [0xD83C, 0xDDEF, 0xD83C, 0xDDF5], // Smiley 627 + 'REGIONAL_INDICATOR_SYMBOL_LETTERS_KR' => [0xD83C, 0xDDF0, 0xD83C, 0xDDF7], // Smiley 628 + 'REGIONAL_INDICATOR_SYMBOL_LETTERS_DE' => [0xD83C, 0xDDE9, 0xD83C, 0xDDEA], // Smiley 629 + 'REGIONAL_INDICATOR_SYMBOL_LETTERS_CN' => [0xD83C, 0xDDE8, 0xD83C, 0xDDF3], // Smiley 630 + 'REGIONAL_INDICATOR_SYMBOL_LETTERS_US' => [0xD83C, 0xDDFA, 0xD83C, 0xDDF8], // Smiley 631 + 'REGIONAL_INDICATOR_SYMBOL_LETTERS_FR' => [0xD83C, 0xDDEB, 0xD83C, 0xDDF7], // Smiley 632 + 'REGIONAL_INDICATOR_SYMBOL_LETTERS_ES' => [0xD83C, 0xDDEA, 0xD83C, 0xDDF8], // Smiley 633 + 'REGIONAL_INDICATOR_SYMBOL_LETTERS_IT' => [0xD83C, 0xDDEE, 0xD83C, 0xDDF9], // Smiley 634 + 'REGIONAL_INDICATOR_SYMBOL_LETTERS_RU' => [0xD83C, 0xDDF7, 0xD83C, 0xDDFA], // Smiley 635 + 'REGIONAL_INDICATOR_SYMBOL_LETTERS_GB' => [0xD83C, 0xDDEC, 0xD83C, 0xDDE7], // Smiley 636 + 'KEYCAP_1' => [0x0031, 0x20E3], // Smiley 637 + 'KEYCAP_2' => [0x0032, 0x20E3], // Smiley 638 + 'KEYCAP_3' => [0x0033, 0x20E3], // Smiley 639 + 'KEYCAP_4' => [0x0034, 0x20E3], // Smiley 640 + 'KEYCAP_5' => [0x0035, 0x20E3], // Smiley 641 + 'KEYCAP_6' => [0x0036, 0x20E3], // Smiley 642 + 'KEYCAP_7' => [0x0037, 0x20E3], // Smiley 643 + 'KEYCAP_8' => [0x0038, 0x20E3], // Smiley 644 + 'KEYCAP_9' => [0x0039, 0x20E3], // Smiley 645 + 'KEYCAP_0' => [0x0030, 0x20E3], // Smiley 646 + 'KEYCAP_10' => 0x1F51F, // Smiley 647 + 'INPUT_SYMBOL_FOR_NUMBERS' => 0x1F522, // Smiley 648 + 'HASH_KEY' => [0x0023, 0x20E3], // Smiley 649 + 'INPUT_SYMBOL_FOR_SYMBOLS' => 0x1F523, // Smiley 650 + 'UPWARDS_BLACK_ARROW' => 0x2B06, // Smiley 651 + 'DOWNWARDS_BLACK_ARROW' => 0x2B07, // Smiley 652 + 'LEFTWARDS_BLACK_ARROW' => 0x2B05, // Smiley 653 + 'BLACK_RIGHTWARDS_ARROW' => 0x27A1, // Smiley 654 + 'INPUT_SYMBOL_FOR_LATIN_CAPITAL_LETTERS' => 0x1F520, // Smiley 655 + 'INPUT_SYMBOL_FOR_LATIN_SMALL_LETTERS' => 0x1F521, // Smiley 656 + 'INPUT_SYMBOL_FOR_LATIN_LETTERS' => 0x1F524, // Smiley 657 + 'NORTH_EAST_ARROW' => 0x2197, // Smiley 658 + 'NORTH_WEST_ARROW' => 0x2196, // Smiley 659 + 'SOUTH_EAST_ARROW' => 0x2198, // Smiley 660 + 'SOUTH_WEST_ARROW' => 0x2199, // Smiley 661 + 'LEFT_RIGHT_ARROW' => 0x2194, // Smiley 662 + 'UP_DOWN_ARROW' => 0x2195, // Smiley 663 + 'ANTICLOCKWISE_DOWNWARDS_AND_UPWARDS_OPEN_CIRCLE_ARROWS' => 0x1F504, // Smiley 664 + 'BLACK_LEFT_POINTING_TRIANGLE' => 0x25C0, // Smiley 665 + 'BLACK_RIGHT_POINTING_TRIANGLE' => 0x25B6, // Smiley 666 + 'UP_POINTING_SMALL_RED_TRIANGLE' => 0x1F53C, // Smiley 667 + 'DOWN_POINTING_SMALL_RED_TRIANGLE' => 0x1F53D, // Smiley 668 + 'LEFTWARDS_ARROW_WITH_HOOK' => 0x21A9, // Smiley 669 + 'RIGHTWARDS_ARROW_WITH_HOOK' => 0x21AA, // Smiley 670 + 'INFORMATION_SOURCE' => 0x2139, // Smiley 671 + 'BLACK_LEFT_POINTING_DOUBLE_TRIANGLE' => 0x23EA, // Smiley 672 + 'BLACK_RIGHT_POINTING_DOUBLE_TRIANGLE' => 0x23E9, // Smiley 673 + 'BLACK_UP_POINTING_DOUBLE_TRIANGLE' => 0x23EB, // Smiley 674 + 'BLACK_DOWN_POINTING_DOUBLE_TRIANGLE' => 0x23EC, // Smiley 675 + 'ARROW_POINTING_RIGHTWARDS_THEN_CURVING_DOWNWARDS' => 0x2935, // Smiley 676 + 'ARROW_POINTING_RIGHTWARDS_THEN_CURVING_UPWARDS' => 0x2934, // Smiley 677 + 'SQUARED_OK' => 0x1F197, // Smiley 678 + 'TWISTED_RIGHTWARDS_ARROWS' => 0x1F500, // Smiley 679 + 'CLOCKWISE_RIGHTWARDS_AND_LEFTWARDS_OPEN_CIRCLE_ARROWS' => 0x1F501, // Smiley 680 + 'CLOCKWISE_RIGHTWARDS_AND_LEFTWARDS_ARTOWS_WITH_CIRCLED_ONE_OVERLAY'=> 0x1F502, // Smiley 681 + 'SQUARED_NEW' => 0x1F195, // Smiley 682 + 'SQUARED_UP_WITH_EXCLAMATION_MARK' => 0x1F199, // Smiley 683 + 'SQUARED_COOL' => 0x1F192, // Smiley 684 + 'SQUARED_FREE' => 0x1F193, // Smiley 685 + 'SQUARED_NG' => 0x1F196, // Smiley 686 + 'ANTENNA_WITH_BARS' => 0x1F4F6, // Smiley 687 + 'CINEMA' => 0x1F3A6, // Smiley 688 + 'SQUARED_KATAKANA_KOKO' => 0x1F201, // Smiley 689 + 'SQUARED_CJK_UNIFIED_IDEOGRAPH_6307' => 0x1F22F, // Smiley 690 + 'SQUARED_CJK_UNIFIED_IDEOGRAPH_7A7A' => 0x1F233, // Smiley 691 + 'SQUARED_CJK_UNIFIED_IDEOGRAPH_6E80' => 0x1F235, // Smiley 692 + 'SQUARED_CJK_UNIFIED_IDEOGRAPH_5408' => 0x1F234, // Smiley 693 + 'SQUARED_CJK_UNIFIED_IDEOGRAPH_7981' => 0x1F232, // Smiley 694 + 'CIRCLED_IDEOGRAPH_ADVANTAGE' => 0x1F250, // Smiley 695 + 'SQUARED_CJK_UNIFIED_IDEOGRAPH_5272' => 0x1F239, // Smiley 696 + 'SQUARED_CJK_UNIFIED_IDEOGRAPH_55B6' => 0x1F23A, // Smiley 697 + 'SQUARED_CJK_UNIFIED_IDEOGRAPH_6709' => 0x1F236, // Smiley 698 + 'SQUARED_CJK_UNIFIED_IDEOGRAPH_7121' => 0x1F21A, // Smiley 699 + 'RESTROOM' => 0x1F6BB, // Smiley 700 + 'MENS_SYMBOL' => 0x1F6B9, // Smiley 701 + 'WOMENS_SYMBOL' => 0x1F6BA, // Smiley 702 + 'BABY_SYMBOL' => 0x1F6BC, // Smiley 703 + 'WATER_CLOSET' => 0x1F6BE, // Smiley 704 + 'POTABLE_WATER_SYMBOL' => 0x1F6B0, // Smiley 705 + 'PUT_LITTER_IN_ITS_PLACE_SYMBOL' => 0x1F6AE, // Smiley 706 + 'NEGATIVE_SQUARED_LATIN_CAPITAL_LETTER_P' => 0x1F17F, // Smiley 707 + 'WHEELCHAIR_SYMBOL' => 0x267F, // Smiley 708 + 'NO_SMOKING_SYMBOL' => 0x1F6AD, // Smiley 709 + 'SQUARED_CJK_UNIFIED_IDEOGRAPH_6708' => 0x1F237, // Smiley 710 + 'SQUARED_CJK_UNIFIED_IDEOGRAPH_6533' => 0x1F238, // Smiley 711 + 'SQUARED_KATAKANA_SA' => 0x1F202, // Smiley 712 + 'CIRCLED_LATIN_CAPITAL_LETTER_M' => 0x24C2, // Smiley 713 + 'PASSPORT_CONTROL' => 0x1F6C2, // Smiley 714 + 'BAGGAGE_CLAIM' => 0x1F6C4, // Smiley 715 + 'LEFT_LUGGAGE' => 0x1F6C5, // Smiley 716 + 'CUSTOMS' => 0x1F6C3, // Smiley 717 + 'CIRCLED_IDEOGRAPH_ACCEPT' => 0x1F251, // Smiley 718 + 'CIRCLED_IDEOGRAPH_SECRET' => 0x3299, // Smiley 719 + 'CIRCLED_IDEOGRAPH_CONGRATULATIONS' => 0x3297, // Smiley 720 + 'SQUARED_CL' => 0x1F191, // Smiley 721 + 'SQUARED_SOS' => 0x1F198, // Smiley 722 + 'SQUARED_ID' => 0x1F194, // Smiley 723 + 'NO_ENTRY_SIGN' => 0x1F6AB, // Smiley 724 + 'NO_ONE_UNDER_EIGHTEEN_SYMBOL' => 0x1F51E, // Smiley 725 + 'NO_MOBILE_PHONES' => 0x1F4F5, // Smiley 726 + 'DO_NOT_LITTER_SYMBOL' => 0x1F6AF, // Smiley 727 + 'NON_POTABLE_WATER_SYMBOL' => 0x1F6B1, // Smiley 728 + 'NO_BICYCLES' => 0x1F6B3, // Smiley 729 + 'NO_PEDESTRIANS' => 0x1F6B7, // Smiley 730 + 'CHILDREN_CROSSING' => 0x1F6B8, // Smiley 731 + 'NO_ENTRY' => 0x26D4, // Smiley 732 + 'EIGHT_SPOKED_ASTERISK' => 0x2733, // Smiley 733 + 'SPARKLE' => 0x2747, // Smiley 734 + 'NEGATIVE_SQUARED_CROSS_MARK' => 0x274E, // Smiley 735 + 'WHITE_HEAVY_CHECK_MARK' => 0x2705, // Smiley 736 + 'EIGHT_POINTED_BLACK_STAR' => 0x2734, // Smiley 737 + 'HEART_DECORATION' => 0x1F49F, // Smiley 738 + 'SQUARED_VS' => 0x1F19A, // Smiley 739 + 'VIBRATION_MODE' => 0x1F4F3, // Smiley 740 + 'MOBILE_PHONE_OFF' => 0x1F4F4, // Smiley 741 + 'NEGATIVE_SQUARED_LATIN_CAPITAL_LETTER_A' => 0x1F170, // Smiley 742 + 'NEGATIVE_SQUARED_LATIN_CAPITAL_LETTER_B' => 0x1F171, // Smiley 743 + 'NEGATIVE_SQUARED_AB' => 0x1F18E, // Smiley 744 + 'NEGATIVE_SQUARED_LATIN_CAPITAL_LETTER_O' => 0x1F17E, // Smiley 745 + 'DIAMOND_SHAPE_WITH_A_DOT_INSIDE' => 0x1F4A0, // Smiley 746 + 'DOUBLE_CURLY_LOOP' => 0x27BF, // Smiley 747 + 'BLACK_UNIVERSAL_RECYCLING_SYMBOL' => 0x267B, // Smiley 748 + 'ARIES' => 0x2648, // Smiley 749 + 'TAURUS' => 0x2649, // Smiley 750 + 'GEMINI' => 0x264A, // Smiley 751 + 'CANCER' => 0x264B, // Smiley 752 + 'LEO' => 0x264C, // Smiley 753 + 'VIRGO' => 0x264D, // Smiley 754 + 'LIBRA' => 0x264E, // Smiley 755 + 'SCORPIUS' => 0x264F, // Smiley 756 + 'SAGITTARIUS' => 0x2650, // Smiley 757 + 'CAPRICORN' => 0x2651, // Smiley 758 + 'AQUARIUS' => 0x2652, // Smiley 759 + 'PISCES' => 0x2653, // Smiley 760 + 'OPHIUCHUS' => 0x26CE, // Smiley 761 + 'SIX_POINTED_STAR_WITH_MIDDLE_DOT' => 0x1F52F, // Smiley 762 + 'AUTOMATED_TELLER_MACHINE' => 0x1F3E7, // Smiley 763 + 'CHART_WITH_UPWARDS_TREND_AND_YEN_SIGN' => 0x1F4B9, // Smiley 764 + 'HEAVY_DOLLAR_SIGN' => 0x1F4B2, // Smiley 765 + 'CURRENCY_EXCHANGE' => 0x1F4B1, // Smiley 766 + 'COPYRIGHT_SIGN' => 0x00A9, // Smiley 767 + 'REGISTERED_SIGN' => 0x00AE, // Smiley 768 + 'TRADEMARK_SIGN' => 0x2122, // Smiley 769 + 'CROSS_MARK' => 0x274C, // Smiley 770 + 'DOUBLE_EXCLAMATION_MARK' => 0x203C, // Smiley 771 + 'EXCLAMATION_QUESTION_MARK' => 0x2049, // Smiley 772 + 'HEAVY_EXCLAMATION_MARK_SYMBOL' => 0x2757, // Smiley 773 + 'BLACK_QUESTION_MARK_ORNAMENT' => 0x2753, // Smiley 774 + 'WHITE_EXCLAMATION_MARK_ORNAMENT' => 0x2755, // Smiley 775 + 'WHITE_QUESTION_MARK_ORNAMENT' => 0x2754, // Smiley 776 + 'HEAVY_LARGE_CIRCLE' => 0x2B55, // Smiley 777 + 'TOP_WITH_UPWARDS_ARROW_ABOVE' => 0x1F51D, // Smiley 778 + 'END_WITH_LEFTWARDS_ARROW_ABOVE' => 0x1F51A, // Smiley 779 + 'BACK_WITH_LEFTWARDS_ARROW_ABOVE' => 0x1F519, // Smiley 780 + 'ON_WITH_EXCLAMATION_MARK_WITH_LEFT_RIGHT_ARROW_ABOVE' => 0x1F51B, // Smiley 781 + 'SOON_WITH_RIGHTWARDS_ARROW_ABOVE' => 0x1F51C, // Smiley 782 + 'CLOCKWISE_DOWNWARDS_AND_UPWARDS_OPEN_CIRCLE_ARROWS' => 0x1F503, // Smiley 783 + 'CLOCK_FACE_TWELVE_OCLOCK' => 0x1F55B, // Smiley 784 + 'CLOCK_FACE_TWELVE_THIRTY' => 0x1F567, // Smiley 785 + 'CLOCK_FACE_ONE_OCLOCK' => 0x1F550, // Smiley 786 + 'CLOCK_FACE_ONE_THIRTY' => 0x1F55C, // Smiley 787 + 'CLOCK_FACE_TWO_OCLOCK' => 0x1F551, // Smiley 788 + 'CLOCK_FACE_TWO_THIRTY' => 0x1F55D, // Smiley 789 + 'CLOCK_FACE_THREE_OCLOCK' => 0x1F552, // Smiley 790 + 'CLOCK_FACE_THREE_THIRTY' => 0x1F55E, // Smiley 791 + 'CLOCK_FACE_FOUR_OCLOCK' => 0x1F553, // Smiley 792 + 'CLOCK_FACE_FOUR_THIRTY' => 0x1F55F, // Smiley 793 + 'CLOCK_FACE_FIVE_OCLOCK' => 0x1F554, // Smiley 794 + 'CLOCK_FACE_FIVE_THIRTY' => 0x1F560, // Smiley 795 + 'CLOCK_FACE_SIX_OCLOCK' => 0x1F555, // Smiley 796 + 'CLOCK_FACE_SEVEN_OCLOCK' => 0x1F556, // Smiley 797 + 'CLOCK_FACE_EIGHT_OCLOCK' => 0x1F557, // Smiley 798 + 'CLOCK_FACE_NINE_OCLOCK' => 0x1F558, // Smiley 799 + 'CLOCK_FACE_TEN_OCLOCK' => 0x1F559, // Smiley 800 + 'CLOCK_FACE_ELEVEN_OCLOCK' => 0x1F55A, // Smiley 801 + 'CLOCK_FACE_SIX_THIRTY' => 0x1F561, // Smiley 802 + 'CLOCK_FACE_SEVEN_THIRTY' => 0x1F562, // Smiley 803 + 'CLOCK_FACE_EIGHT_THIRTY' => 0x1F563, // Smiley 804 + 'CLOCK_FACE_NINE_THIRTY' => 0x1F564, // Smiley 805 + 'CLOCK_FACE_TEN_THIRTY' => 0x1F565, // Smiley 806 + 'CLOCK_FACE_ELEVEN_THIRTY' => 0x1F566, // Smiley 807 + 'HEAVY_MULTIPLICATION_SIGN' => 0x2716, // Smiley 808 + 'HEAVY_PLUS_SIGN' => 0x2795, // Smiley 809 + 'HEAVY_MINUS_SIGN' => 0x2796, // Smiley 810 + 'HEAVY_DIVISION_SIGN' => 0x2797, // Smiley 811 + 'BLACK_SPADE_SUIT' => 0x2660, // Smiley 812 + 'BLACK_HEART_SUIT' => 0x2665, // Smiley 813 + 'BLACK_CLUB_SUIT' => 0x2663, // Smiley 814 + 'BLACK_DIAMOND_SUITE' => 0x2666, // Smiley 815 + 'WHITE_FLOWER' => 0x1F4AE, // Smiley 816 + 'HUNDRED_POINTS_SYMBOL' => 0x1F4AF, // Smiley 817 + 'HEAVY_CHECK_MARK' => 0x2714, // Smiley 818 + 'BALLOT_BOX_WITH_CHECK' => 0x2611, // Smiley 819 + 'RADIO_BUTTON' => 0x1F518, // Smiley 820 + 'LINK_SYMBOL' => 0x1F517, // Smiley 821 + 'CURLY_LOOP' => 0x27B0, // Smiley 822 + 'WAVY_DASH' => 0x3030, // Smiley 823 + 'PART_ALTERNATION_MARK' => 0x303D, // Smiley 824 + 'TRIDENT_EMBLEM' => 0x1F531, // Smiley 825 + 'BLACK_MEDIUM_SQUARE' => 0x25FC, // Smiley 826 + 'WHITE_MEDIUM_SQUARE' => 0x25FB, // Smiley 827 + 'BLACK_MEDIUM_SMALL_SQUARE' => 0x25FE, // Smiley 828 + 'WHITE_MEDIUM_SMALL_SQUARE' => 0x25FD, // Smiley 829 + 'BLACK_SMALL_SQUARE' => 0x25AA, // Smiley 830 + 'WHILTE_SMALL_SQUARE' => 0x25AB, // Smiley 831 + 'UP_POINTING_RED_TRIANGLE' => 0x1F53A, // Smiley 832 + 'BLACK_SQUARE_BUTTON' => 0x1F532, // Smiley 833 + 'WHILTE_SQUARE_BUTTON' => 0x1F533, // Smiley 834 + 'MEDIUM_BLACK_CIRCLE' => 0x26AB, // Smiley 835 + 'MEDIUM_WHITE_CIRCLE' => 0x26AA, // Smiley 836 + 'LARGE_RED_CIRCLE' => 0x1F534, // Smiley 837 + 'LARGE_BLUE_CIRCLE' => 0x1F535, // Smiley 838 + 'DOWN_POINTING_RED_TRIANGLE' => 0x1F53B, // Smiley 839 + 'WHITE_LARGE_SQUARE' => 0x2B1C, // Smiley 840 + 'BLACK_LARGE_SQUARE' => 0x2B1B, // Smiley 841 + 'LARGE_ORANGE_DIAMOND' => 0x1F536, // Smiley 842 + 'LARGE_BLUE_DIAMOND' => 0x1F537, // Smiley 843 + 'SMALL_ORANGE_DIAMOND' => 0x1F538, // Smiley 844 + 'SMALL_BLUE_DIAMOND' => 0x1F539, // Smiley 845 + ); + private $listKeys = array(); + + public function __construct() { + $this->listKeys = array_keys($this->listSmileys); + } + + public function __get($name) { + if (mb_strlen($name) > 7 && substr($name, 0, 7) === 'SMILEY_' && is_numeric(substr($name, 7))) { + $id = (int)substr($name, 7) - 1; + echo 'id '.$id; + if ($id >= 0 && $id < count($this->listSmileys)) + return $this->__get($this->listKeys[$id]); + throw new SmileyNotFoundException; + } + + if (!isset($this->listSmileys[$name])) + throw new SmileyNotFoundException; + + if (is_array($this->listSmileys[$name])) + return implode(array_map(array($this, 'ord_unicode'), $this->listSmileys[$name])); + + return $this->ord_unicode($this->listSmileys[$name]); + } + + // Source: http://stackoverflow.com/a/7153133/4990350 + private function ord_unicode($num) { + if ($num <= 0x7F) + return chr($num); + if ($num <= 0x7FF) + return chr(($num>>6)+192).chr(($num&63)+128); + if ($num <= 0xFFFF) + return chr(($num>>12)+224).chr((($num>>6)&63)+128).chr(($num&63)+128); + if ($num <= 0x1FFFFF) + return chr(($num>>18)+240).chr((($num>>12)&63)+128).chr((($num>>6)&63)+128).chr(($num&63)+128); + return ''; + } +} From d2776328c9d657c522d2796f46427d9e47911ffa Mon Sep 17 00:00:00 2001 From: Quentin Ligier Date: Tue, 14 Jul 2015 18:40:06 +0200 Subject: [PATCH 404/436] Undoing changes --- README.md | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 50 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 1fe10af6..a93afda2 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,51 @@ -# Chat API +# Chat API [![Latest Stable Version](https://poser.pugx.org/whatsapp/chat-api/v/stable)](https://packagist.org/packages/whatsapp/chat-api) [![Total Downloads](https://poser.pugx.org/whatsapp/chat-api/downloads)](https://packagist.org/packages/whatsapp/chat-api) [![License](https://poser.pugx.org/whatsapp/chat-api/license)](https://packagist.org/packages/whatsapp/chat-api) -Fork of [WHAnonymous/Chat-API](https://github.com/WHAnonymous/Chat-API) +Interface to WhatsApp Messenger + +**Read the [wiki](https://github.com/WHAnonymous/Chat-API/wiki)** and previous issues before opening a new one! Maybe your issue is already answered. + +For new WhatsApp updates check **[WhatsApp incoming updates log](https://github.com/WHAnonymous/Chat-API/wiki/WhatsApp-incoming-updates)** + +**Do you like this project? Support it by donating BTC** to 1HcEX9foem5atreEg1gbQ6xVeosN5WEcjs ![btc](http://www.montrealbitcoin.com/img/favicon.ico) + +---------- +### Installation + +```sh +composer require whatsapp/chat-api +``` + +### Special thanks + +- [CODeRUS](https://github.com/CODeRUS) +- [tgalal](https://github.com/tgalal) +- [SikiFn](https://github.com/SikiFn) +- [0xTryCatch](https://github.com/0xTryCatch) +- [Shirioko](https://github.com/shirioko) + +Also Ahmed Moh'd (fb.com/ahmed.mhd) and Ali Hubail (@hubail) for making this project possible. + +And everyone that contributes to it. + +---------- + +### What is WhatsApp? +According to [the company](http://www.whatsapp.com/): + +> โ€œWhatsApp Messenger is a cross-platform mobile messenger that replaces SMS and works through the existing internet data plan of your device. WhatsApp is available for iPhone, BlackBerry, Android, Windows Phone, Nokia Symbian60 & S40 phones. Because WhatsApp Messenger uses the same internet data plan that you use for email and web browsing, there is no cost to message and stay in touch with your friends.โ€ + +Jan. 2015: 30 billion messages per day, ~700 million users. + +# License + +MIT + +# Terms and conditions + +- You will NOT use this API for marketing purposes (spam, massive sending...). +- We do NOT give support to anyone that wants this API to send massive messages or similar. +- We reserve the right to block any user of this repository that does not meet these conditions. + +## Legal + +This code is in no way affiliated with, authorized, maintained, sponsored or endorsed by WhatsApp or any of its affiliates or subsidiaries. This is an independent and unofficial API. Use at your own risk. From 3a2942cdcec69bbeeb3fcea3c6f82918f4ef84dd Mon Sep 17 00:00:00 2001 From: mgp25 Date: Sun, 19 Jul 2015 17:36:55 +0200 Subject: [PATCH 405/436] Fixes #642 --- src/whatsprot.class.php | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index 123648fd..0f081469 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -64,6 +64,7 @@ class WhatsProt protected $messageStore; protected $nodeId = array(); protected $loginTime; + protected $timeout; public $reader; // An instance of the BinaryTreeNodeReader class. /** @@ -461,6 +462,15 @@ public function isConnected() return ($this->socket !== null); } + /** + * Reconnect + */ + public function reconnect() + { + $this->connect(); + $this->loginWithPassword($this->password); + } + /** * Disconnect from the WhatsApp network. */ @@ -558,8 +568,9 @@ public function pollMessage($autoReceipt = true, $type = "read") $r = array($this->socket); $w = array(); $e = array(); + $s = socket_select($r, $w, $e, Constants::TIMEOUT_SEC, Constants::TIMEOUT_USEC); - if (socket_select($r, $w, $e, Constants::TIMEOUT_SEC, Constants::TIMEOUT_USEC)) { + if ($s) { // Something to read if ($stanza = $this->readStanza()) { $this->processInboundData($stanza, $autoReceipt, $type); @@ -567,6 +578,22 @@ public function pollMessage($autoReceipt = true, $type = "read") } } + if ($s == 0) + { + if (!isset($this->timeout)) + $this->timeout = time(); + + if ((time() - $this->timeout) > 300) + { + $this->timeout = null; + $this->disconnect(); + throw new ConnectionException('Connectivity error'); + } + } + else { + $this->timeout = null; + } + return false; } From 96febf5e3bd8c44e8287b5bbc70575f852ed0e0a Mon Sep 17 00:00:00 2001 From: mgp25 Date: Sun, 19 Jul 2015 18:01:35 +0200 Subject: [PATCH 406/436] Update version composer --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index ae76ae84..55c5f713 100644 --- a/composer.json +++ b/composer.json @@ -1,6 +1,6 @@ { "name": "whatsapp/chat-api", - "version": "2.5", + "version": "2.5.1", "description": "The PHP WhatsApp library", "license": "MIT", "keywords": [ From f0e5c5ddd9409e784fb15bf770e54d3da1818465 Mon Sep 17 00:00:00 2001 From: mgp25 Date: Tue, 21 Jul 2015 11:12:13 +0200 Subject: [PATCH 407/436] Fixes #870 --- src/whatsprot.class.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index 0f081469..429c30d7 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -574,8 +574,12 @@ public function pollMessage($autoReceipt = true, $type = "read") // Something to read if ($stanza = $this->readStanza()) { $this->processInboundData($stanza, $autoReceipt, $type); + $this->timeout = null; return true; } + else { + $s = 0; + } } if ($s == 0) @@ -590,9 +594,6 @@ public function pollMessage($autoReceipt = true, $type = "read") throw new ConnectionException('Connectivity error'); } } - else { - $this->timeout = null; - } return false; } From 79c32a3493ec244baf9de5f7ee7ab5ac56ebe6c1 Mon Sep 17 00:00:00 2001 From: SikiFn Date: Wed, 22 Jul 2015 15:32:33 +0300 Subject: [PATCH 408/436] Get mime type without charset Using: file -bi FILENAME.jpg will output the following: image/text; charset=utf-8 which will cause problems to the function getExtensionFromMime() and files wouldn't be sent. However, "file -b --mime-type FILENAME.jpg" will return the mimetype only. --- src/func.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/func.php b/src/func.php index 6c43edcf..9fff1597 100755 --- a/src/func.php +++ b/src/func.php @@ -205,7 +205,7 @@ function get_mime($file) if (!strncasecmp(PHP_OS, 'WIN', 3) == 0 && !stristr(ini_get("disable_functions"), "shell_exec")) { $file = escapeshellarg($file); - $mime = shell_exec("file -bi " . $file); + $mime = shell_exec("file -b --mime-type " . $file); return $mime; } From 2f43bbe769021a7817f31a3a41dc8ba2375de5f7 Mon Sep 17 00:00:00 2001 From: mgp25 Date: Wed, 22 Jul 2015 15:06:37 +0200 Subject: [PATCH 409/436] New release --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 55c5f713..c61196df 100644 --- a/composer.json +++ b/composer.json @@ -1,6 +1,6 @@ { "name": "whatsapp/chat-api", - "version": "2.5.1", + "version": "2.5.2", "description": "The PHP WhatsApp library", "license": "MIT", "keywords": [ From 59344fcb167d67b92532d0348664278a6b5023f2 Mon Sep 17 00:00:00 2001 From: SikiFn Date: Thu, 23 Jul 2015 11:35:42 +0300 Subject: [PATCH 410/436] Trim mimetype from command line getExtensionFromMime will not recognize the mimetype returned from command line due to hidden whitespace characters. Trimming it will do the trick. --- src/func.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/func.php b/src/func.php index 9fff1597..0d41b788 100755 --- a/src/func.php +++ b/src/func.php @@ -206,7 +206,7 @@ function get_mime($file) if (!strncasecmp(PHP_OS, 'WIN', 3) == 0 && !stristr(ini_get("disable_functions"), "shell_exec")) { $file = escapeshellarg($file); $mime = shell_exec("file -b --mime-type " . $file); - return $mime; + return trim($mime); } return false; From 7a25c06952e34d7b6c957163e09e287c16cd8a31 Mon Sep 17 00:00:00 2001 From: mgp25 Date: Wed, 29 Jul 2015 01:43:40 +0200 Subject: [PATCH 411/436] script for resetting account --- examples/resetAccount.php | 44 +++++++++++++++++++++++++++++++++++++++ src/whatsprot.class.php | 1 + 2 files changed, 45 insertions(+) create mode 100644 examples/resetAccount.php diff --git a/examples/resetAccount.php b/examples/resetAccount.php new file mode 100644 index 00000000..8ecf6f06 --- /dev/null +++ b/examples/resetAccount.php @@ -0,0 +1,44 @@ +loginWithPassword($pw); +} +catch (Exception $e) +{ + echo "Failed to login, make sure your account is not blocked (use blockChecker.php) or check if your password is right\n\n"; + exit(0); +} + +$w->sendRemoveAccount(); + +$i = 0; +for ($i; $i < 5; $i++) +{ + $w->pollMessage(); +} + +$w->disconnect(); + +unlink("../src/wadata/id.$username.dat"); +unlink("../src/wadata/nextChallenge.$username.dat"); + +echo "\n\n OK! Now use registerTool.php \n\n"; diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index 429c30d7..5a6fab62 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -1215,6 +1215,7 @@ public function sendRemoveAccount($lg = null, $lc = null, $feedback = null) ), array($removeNode), null); $this->sendNode($node); + $this->waitForServer($msgId); } /** From 6b5574460164b2439f425a63e46fa9a1c6962ef5 Mon Sep 17 00:00:00 2001 From: mgp25 Date: Thu, 30 Jul 2015 11:46:40 +0200 Subject: [PATCH 412/436] Update resetAccount.php --- examples/resetAccount.php | 1 + 1 file changed, 1 insertion(+) diff --git a/examples/resetAccount.php b/examples/resetAccount.php index 8ecf6f06..8ba128af 100644 --- a/examples/resetAccount.php +++ b/examples/resetAccount.php @@ -18,6 +18,7 @@ echo "\n\nYour accounts password: "; $pw = trim(fgets(STDIN)); +$w->connect(); try { $w->loginWithPassword($pw); From 5a5e7a0891715fa27a6ba29144c679fd65bff141 Mon Sep 17 00:00:00 2001 From: WHAnonymous Date: Sat, 8 Aug 2015 08:00:46 +0000 Subject: [PATCH 413/436] Update token 2.12.89 --- src/token.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/token.php b/src/token.php index 7192e88c..ca834168 100755 --- a/src/token.php +++ b/src/token.php @@ -20,7 +20,7 @@ function generateRequestToken($country, $phone) // return base64_encode($output); $const = 'PdA2DJyKoUrwLw1Bg6EIhzh502dF9noR9uFCllGk'; - $releaseTime = '1435097139726'; + $releaseTime = '1435688502926'; $token = md5($const . $releaseTime . $phone); return $token; From dcaa8ecc6ece38516573b25bf57a6a41c078cb49 Mon Sep 17 00:00:00 2001 From: WHAnonymous Date: Sat, 8 Aug 2015 08:01:44 +0000 Subject: [PATCH 414/436] Update WA ver and UA --- src/Constants.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Constants.php b/src/Constants.php index 34fe80ce..61d6d55e 100644 --- a/src/Constants.php +++ b/src/Constants.php @@ -19,8 +19,8 @@ class Constants const WHATSAPP_REQUEST_HOST = 'v.whatsapp.net/v2/code'; // The request code host. const WHATSAPP_SERVER = 's.whatsapp.net'; // The hostname used to login/send messages. const WHATSAPP_DEVICE = 'S40'; // The device name. - const WHATSAPP_VER = '2.12.88'; // The WhatsApp version. - const WHATSAPP_USER_AGENT = 'WhatsApp/2.12.88 S40Version/14.26 Device/Nokia302'; // User agent used in request/registration code. + const WHATSAPP_VER = '2.12.89'; // The WhatsApp version. + const WHATSAPP_USER_AGENT = 'WhatsApp/2.12.89 S40Version/14.26 Device/Nokia302'; // User agent used in request/registration code. const WHATSAPP_VER_CHECKER = 'https://coderus.openrepos.net/whitesoft/whatsapp_scratch'; // Check WhatsApp version } From d79981acf1c454be9662a0159205a21787452a02 Mon Sep 17 00:00:00 2001 From: WHAnonymous Date: Thu, 13 Aug 2015 18:27:16 +0000 Subject: [PATCH 415/436] Update registerTool.php --- examples/registerTool.php | 41 ++++++++++++++++++++++++++++----------- 1 file changed, 30 insertions(+), 11 deletions(-) diff --git a/examples/registerTool.php b/examples/registerTool.php index bbd9f742..ad0f5091 100644 --- a/examples/registerTool.php +++ b/examples/registerTool.php @@ -11,27 +11,46 @@ echo "\n\nUsername (country code + number without + or 00): "; $username = trim(fgets(STDIN)); +if (!preg_match('!^\d+$!', $username)) +{ + echo "Wrong number. Do NOT use '+' or '00' before your number\n"; + exit(0); +} +$identityExists = file_exists("../src/wadata/id.$username.dat"); // Create a instance of WhastPort. $w = new WhatsProt($username, '', $debug); -echo "\n\nType sms or voice: "; -$option = fgets(STDIN); +if (!$identityExists) +{ + echo "\n\nType sms or voice: "; + $option = fgets(STDIN); -try { + try { $w->codeRequest(trim($option)); -} catch(Exception $e) { + } catch(Exception $e) { echo $e->getMessage(); exit(0); -} + } -echo "\n\nEnter the received code: "; -$code = str_replace("-", "", fgets(STDIN)); + echo "\n\nEnter the received code: "; + $code = str_replace("-", "", fgets(STDIN)); -try { + try { $result = $w->codeRegister(trim($code)); - echo "\nYour password is: ".$result->pw."\n"; -} catch(Exception $e) { - echo $e->getMessage(); + echo "\nYour username is: ".$result->login."\n"; + echo "Your password is: ".$result->pw."\n"; + } catch(Exception $e) { + echo $e->getMessage() . "\n"; + exit(0); + } +} else { + try { + $result = $w->checkCredentials(); + } catch (Exception $e) { + echo $e->getMessage() . "\n"; exit(0); + } + echo "\nYour username is: ".$result->login."\n"; + echo "Your password is: ".$result->pw."\n"; } From faba4bf1cff727d24364abfe90fd115b0a12356f Mon Sep 17 00:00:00 2001 From: WHAnonymous Date: Thu, 13 Aug 2015 18:33:15 +0000 Subject: [PATCH 416/436] Update registerTool.php --- examples/registerTool.php | 2 -- 1 file changed, 2 deletions(-) diff --git a/examples/registerTool.php b/examples/registerTool.php index ad0f5091..f9adc2c7 100644 --- a/examples/registerTool.php +++ b/examples/registerTool.php @@ -51,6 +51,4 @@ echo $e->getMessage() . "\n"; exit(0); } - echo "\nYour username is: ".$result->login."\n"; - echo "Your password is: ".$result->pw."\n"; } From 1d11d0d3ffe115483afe7af124368c59b0103fd8 Mon Sep 17 00:00:00 2001 From: 0xTryCatch <0xtrycatch@gmail.com> Date: Thu, 20 Aug 2015 15:07:07 +0200 Subject: [PATCH 417/436] New message id format --- src/whatsprot.class.php | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index 5a6fab62..4ef0db61 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -50,7 +50,7 @@ class WhatsProt protected $loginStatus; // Holds the login status. protected $mediaFileInfo = array(); // Media File Information protected $mediaQueue = array(); // Queue for media message nodes - protected $messageCounter = 1; // Message counter for auto-id. + protected $messageCounter = 0; // Message counter for auto-id. protected $iqCounter = 1; protected $messageQueue = array(); // Queue for received messages. protected $name; // The user name. @@ -63,7 +63,7 @@ class WhatsProt protected $writer; // An instance of the BinaryTreeNodeWriter class. protected $messageStore; protected $nodeId = array(); - protected $loginTime; + protected $messageId; protected $timeout; public $reader; // An instance of the BinaryTreeNodeReader class. @@ -2099,10 +2099,7 @@ protected function createFeaturesNode() */ protected function createMsgId() { - $msgid = $this->messageCounter; - $this->messageCounter++; - - return $this->loginTime . "-" . $msgid; + return $this->messageId . dechex($this->messageCounter++); } /** @@ -2278,7 +2275,7 @@ protected function doLogin() $this->phoneNumber )); $this->sendAvailableForChat(); - $this->loginTime = time(); + $this->messageId = substr(base64_encode(mcrypt_create_iv(64, MCRYPT_DEV_URANDOM)), 0, 12); return true; } From 391963186c6c5e2d44256f1e12bee6b861e083b7 Mon Sep 17 00:00:00 2001 From: WHAnonymous Date: Thu, 20 Aug 2015 22:50:53 +0000 Subject: [PATCH 418/436] WUpdate to QA --- src/Constants.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Constants.php b/src/Constants.php index 61d6d55e..28745cec 100644 --- a/src/Constants.php +++ b/src/Constants.php @@ -19,8 +19,8 @@ class Constants const WHATSAPP_REQUEST_HOST = 'v.whatsapp.net/v2/code'; // The request code host. const WHATSAPP_SERVER = 's.whatsapp.net'; // The hostname used to login/send messages. const WHATSAPP_DEVICE = 'S40'; // The device name. - const WHATSAPP_VER = '2.12.89'; // The WhatsApp version. - const WHATSAPP_USER_AGENT = 'WhatsApp/2.12.89 S40Version/14.26 Device/Nokia302'; // User agent used in request/registration code. + const WHATSAPP_VER = '2.12.96'; // The WhatsApp version. + const WHATSAPP_USER_AGENT = 'WhatsApp/2.12.96 S40Version/14.26 Device/Nokia302'; // User agent used in request/registration code. const WHATSAPP_VER_CHECKER = 'https://coderus.openrepos.net/whitesoft/whatsapp_scratch'; // Check WhatsApp version } From 8b602a16693d2c285c28d3a260d5cc95ce6a664b Mon Sep 17 00:00:00 2001 From: WHAnonymous Date: Thu, 20 Aug 2015 22:52:08 +0000 Subject: [PATCH 419/436] Update token to 2.12.96 WA ver --- src/token.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/token.php b/src/token.php index ca834168..969b2ac9 100755 --- a/src/token.php +++ b/src/token.php @@ -20,7 +20,7 @@ function generateRequestToken($country, $phone) // return base64_encode($output); $const = 'PdA2DJyKoUrwLw1Bg6EIhzh502dF9noR9uFCllGk'; - $releaseTime = '1435688502926'; + $releaseTime = '1439921717185'; $token = md5($const . $releaseTime . $phone); return $token; From 48ecf4f61636ab075301f39413cc2617d063b4dc Mon Sep 17 00:00:00 2001 From: WHAnonymous Date: Thu, 20 Aug 2015 23:17:02 +0000 Subject: [PATCH 420/436] New release --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index c61196df..9c60785c 100644 --- a/composer.json +++ b/composer.json @@ -1,6 +1,6 @@ { "name": "whatsapp/chat-api", - "version": "2.5.2", + "version": "2.5.3", "description": "The PHP WhatsApp library", "license": "MIT", "keywords": [ From 47181a5284e3929ab2569d80ff70698d57d9fe62 Mon Sep 17 00:00:00 2001 From: Joel Ahlstedt Date: Sun, 23 Aug 2015 11:22:55 +0300 Subject: [PATCH 421/436] Update registerTool.php Add line break (on code request error; too_recent, etc.) and other --- examples/registerTool.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/registerTool.php b/examples/registerTool.php index f9adc2c7..e0be6770 100644 --- a/examples/registerTool.php +++ b/examples/registerTool.php @@ -9,8 +9,8 @@ echo "# #\n"; echo "####################\n"; -echo "\n\nUsername (country code + number without + or 00): "; -$username = trim(fgets(STDIN)); +echo "\n\nUsername (country code + number, do not use + or 00): "; +$username = str_replace("+", "", trim(fgets(STDIN))); if (!preg_match('!^\d+$!', $username)) { echo "Wrong number. Do NOT use '+' or '00' before your number\n"; @@ -29,7 +29,7 @@ try { $w->codeRequest(trim($option)); } catch(Exception $e) { - echo $e->getMessage(); + echo $e->getMessage() . "\n"; exit(0); } From 42cbde7aa41c18fb227801a6e04161f303f58ebf Mon Sep 17 00:00:00 2001 From: Joel Date: Mon, 24 Aug 2015 15:48:46 +0300 Subject: [PATCH 422/436] Update smileys.class.php Add new middle finger emoji and vulcan salute emoji (only available on Android and Whatsapp Web) --- src/smileys.class.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/smileys.class.php b/src/smileys.class.php index c5953ef6..65b4bb99 100644 --- a/src/smileys.class.php +++ b/src/smileys.class.php @@ -863,6 +863,8 @@ class Smileys { 'LARGE_BLUE_DIAMOND' => 0x1F537, // Smiley 843 'SMALL_ORANGE_DIAMOND' => 0x1F538, // Smiley 844 'SMALL_BLUE_DIAMOND' => 0x1F539, // Smiley 845 + 'MIDDLEFINGER' => 0x1F595, // Smiley xxx + 'VULCAN_SALUTE' => 0x1F596, // Smiley xxx ); private $listKeys = array(); From 7334703e306b089c37250164a8f2de4df2d84c3e Mon Sep 17 00:00:00 2001 From: Carson Full Date: Mon, 24 Aug 2015 13:43:05 -0500 Subject: [PATCH 423/436] Requiring mcrypt extension from 1d11d0d change --- composer.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 9c60785c..5acc8c93 100644 --- a/composer.json +++ b/composer.json @@ -29,9 +29,10 @@ "php": ">=5.3", "ext-curl": "*", "ext-gd" : "*", - "ext-sockets" : "*", + "ext-mcrypt": "*", "ext-openssl" : "*", "ext-pdo" : "*", + "ext-sockets" : "*", "ext-sqlite3" : "*" } } From e34385f81252af5033e56ec95daf4b8f5c4c9957 Mon Sep 17 00:00:00 2001 From: Carson Full Date: Mon, 24 Aug 2015 13:45:22 -0500 Subject: [PATCH 424/436] Removing version as it's not needed or recommended. git tags are enough --- composer.json | 1 - 1 file changed, 1 deletion(-) diff --git a/composer.json b/composer.json index 5acc8c93..5bf39337 100644 --- a/composer.json +++ b/composer.json @@ -1,6 +1,5 @@ { "name": "whatsapp/chat-api", - "version": "2.5.3", "description": "The PHP WhatsApp library", "license": "MIT", "keywords": [ From 582494add602a5863e1cad0bd388012332ef4559 Mon Sep 17 00:00:00 2001 From: WHAnonymous Date: Tue, 1 Sep 2015 22:12:35 +0000 Subject: [PATCH 425/436] send voice message using sendMessageAudio --- src/whatsprot.class.php | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index 4ef0db61..e8bad4ee 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -65,6 +65,7 @@ class WhatsProt protected $nodeId = array(); protected $messageId; protected $timeout; + protected $voice; public $reader; // An instance of the BinaryTreeNodeReader class. /** @@ -1560,10 +1561,13 @@ public function sendMessageRead($to, $id) * @param bool $storeURLmedia Keep copy of file * @param int $fsize * @param string $fhash * + * @param bool $voice * @return string|null Message ID if successfully, null if not. */ - public function sendMessageAudio($to, $filepath, $storeURLmedia = false, $fsize = 0, $fhash = "") + public function sendMessageAudio($to, $filepath, $storeURLmedia = false, $fsize = 0, $fhash = "", $voice = false) { + $this->voice = $voice; + if ($fsize == 0 || $fhash == "") { $allowedExtensions = array('3gp', 'caf', 'wav', 'mp3', 'wma', 'ogg', 'aif', 'aac', 'm4a'); $size = 10 * 1024 * 1024; // Easy way to set maximum file size for this media type. @@ -3607,6 +3611,11 @@ protected function processUploadResponse($node) if ($this->mediaQueue[$id]['caption'] != '') { $mediaAttribs["caption"] = $this->mediaQueue[$id]['caption']; } + if ($this->voice == true) + { + $mediaAttribs["origin"] = 'live'; + $this->voice = false; + } $filepath = $this->mediaQueue[$id]['filePath']; $to = $this->mediaQueue[$id]['to']; From 054f2d7841b65080029c293b7a61ba8b59abd686 Mon Sep 17 00:00:00 2001 From: WHAnonymous Date: Fri, 4 Sep 2015 20:44:52 +0000 Subject: [PATCH 426/436] sendGroupsParticipantsRemove updates Now you can only remove one user per request --- src/whatsprot.class.php | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index e8bad4ee..510dfe36 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -1430,15 +1430,12 @@ public function sendGroupsParticipantsAdd($groupId, $participants) * Remove participant(s) from a group. * * @param string $groupId The group ID. - * @param mixed $participants An array with the participants numbers to remove + * @param string $participant The number of the participant you want to remove */ - public function sendGroupsParticipantsRemove($groupId, $participants) + public function sendGroupsParticipantsRemove($groupId, $participant) { $msgId = $this->createMsgId(); - if (!is_array($participants)) { - $participants = array($participants); - } - $this->sendGroupsChangeParticipants($groupId, $participants, 'remove', $msgId); + $this->sendGroupsChangeParticipants($groupId, (array) $participant, 'remove', $msgId); } /** From c7c14b85f890e5c5fd505f4f110a0fb3e50415e2 Mon Sep 17 00:00:00 2001 From: WHAnonymous Date: Sat, 5 Sep 2015 08:55:58 +0000 Subject: [PATCH 427/436] Update functions that interact with group participants --- src/whatsprot.class.php | 49 ++++++++++++++++------------------------- 1 file changed, 19 insertions(+), 30 deletions(-) diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index 510dfe36..b9851fbf 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -1415,19 +1415,16 @@ public function sendGroupsLeave($gjids) * Add participant(s) to a group. * * @param string $groupId The group ID. - * @param mixed $participants An array with the participants numbers to add + * @param string $participants An array with the participants numbers to add */ - public function sendGroupsParticipantsAdd($groupId, $participants) + public function sendGroupsParticipantsAdd($groupId, $participant) { $msgId = $this->createMsgId(); - if (!is_array($participants)) { - $participants = array($participants); - } - $this->sendGroupsChangeParticipants($groupId, $participants, 'add', $msgId); + $this->sendGroupsChangeParticipants($groupId, $participant, 'add', $msgId); } /** - * Remove participant(s) from a group. + * Remove participant from a group. * * @param string $groupId The group ID. * @param string $participant The number of the participant you want to remove @@ -1435,37 +1432,31 @@ public function sendGroupsParticipantsAdd($groupId, $participants) public function sendGroupsParticipantsRemove($groupId, $participant) { $msgId = $this->createMsgId(); - $this->sendGroupsChangeParticipants($groupId, (array) $participant, 'remove', $msgId); + $this->sendGroupsChangeParticipants($groupId, $participant, 'remove', $msgId); } /** - * Promote participant(s) of a group; Make a participant an admin of a group. + * Promote participant of a group; Make a participant an admin of a group. * * @param string $gId The group ID. - * @param mixed $participants An array with the participants numbers to promote + * @param string $participant The number of the participant you want to promote */ - public function sendPromoteParticipants($gId, $participants) + public function sendPromoteParticipants($gId, $participant) { $msgId = $this->createMsgId(); - if (!is_array($participants)) { - $participants = array($participants); - } - $this->sendGroupsChangeParticipants($gId, $participants, "promote", $msgId); + $this->sendGroupsChangeParticipants($gId, $participant, "promote", $msgId); } /** - * Demote participant(s) of a group; remove participant of being admin of a group. + * Demote participant of a group; remove participant of being admin of a group. * * @param string $gId The group ID. - * @param array $participants An array with the participants numbers to demote + * @param string $participant The number of the participant you want to demote */ - public function sendDemoteParticipants($gId, $participants) + public function sendDemoteParticipants($gId, $participant) { $msgId = $this->createMsgId(); - if (!is_array($participants)) { - $participants = array($participants); - } - $this->sendGroupsChangeParticipants($gId, $participants, "demote", $msgId); + $this->sendGroupsChangeParticipants($gId, $participant, "demote", $msgId); } /** @@ -3838,19 +3829,17 @@ protected function sendGetGroupsFiltered($type) * Change participants of a group. * * @param string $groupId The group ID. - * @param array $participants An array with the participants. - * @param string $tag The tag action. 'add' or 'remove' + * @param string $participant The participant. + * @param string $tag The tag action. 'add', 'remove', 'promote' or 'demote' * @param $id */ - protected function sendGroupsChangeParticipants($groupId, $participants, $tag, $id) + protected function sendGroupsChangeParticipants($groupId, $participant, $tag, $id) { - $_participants = array(); - foreach ($participants as $participant) { - $_participants[] = new ProtocolNode("participant", array("jid" => $this->getJID($participant)), null, ""); - } + + $participants = new ProtocolNode("participant", array("jid" => $this->getJID($participant)), null, ""); $childHash = array(); - $child = new ProtocolNode($tag, $childHash, $_participants, ""); + $child = new ProtocolNode($tag, $childHash, $participants, ""); $node = new ProtocolNode("iq", array( From a56e559d0636d2121f841950b4afddd5ad6f9c3d Mon Sep 17 00:00:00 2001 From: WHAnonymous Date: Mon, 7 Sep 2015 10:52:31 +0000 Subject: [PATCH 428/436] Fixes #986 checkCredentials updated --- src/whatsprot.class.php | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index b9851fbf..547fbf99 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -152,10 +152,6 @@ public function checkCredentials() $countryCode = ($phone['ISO3166'] != '') ? $phone['ISO3166'] : 'US'; $langCode = ($phone['ISO639'] != '') ? $phone['ISO639'] : 'en'; - if ($phone['cc'] == '77' || $phone['cc'] == '79') { - $phone['cc'] = '7'; - } - // Build the url. $host = 'https://' . Constants::WHATSAPP_CHECK_HOST; $query = array( From 51c36e4acae248732ff3017fe5fe9492c3c4eda5 Mon Sep 17 00:00:00 2001 From: WHAnonymous Date: Wed, 9 Sep 2015 12:21:45 +0000 Subject: [PATCH 429/436] Fixes #990 --- src/whatsprot.class.php | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index 547fbf99..161e937f 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -152,6 +152,10 @@ public function checkCredentials() $countryCode = ($phone['ISO3166'] != '') ? $phone['ISO3166'] : 'US'; $langCode = ($phone['ISO639'] != '') ? $phone['ISO639'] : 'en'; + if ($phone['cc'] == '77' || $phone['cc'] == '79') { + $phone['cc'] = '7'; + } + // Build the url. $host = 'https://' . Constants::WHATSAPP_CHECK_HOST; $query = array( @@ -2874,20 +2878,20 @@ protected function processInboundDataNode(ProtocolNode $node, $autoReceipt = tru && strncmp($node->getAttribute('from'), $this->phoneNumber, strlen($this->phoneNumber)) != 0 && strpos($node->getAttribute('from'), "-") !== false && $node->getAttribute('type') != null) { - $groupId = Constants::parseJID($node->getAttribute('from')); + $groupId = $this->parseJID($node->getAttribute('from')); if ($node->getAttribute('add') != null) { $this->eventManager()->fire("onGroupsParticipantsAdd", array( $this->phoneNumber, $groupId, - Constants::parseJID($node->getAttribute('add')) + $this->parseJID($node->getAttribute('add')) )); } elseif ($node->getAttribute('remove') != null) { $this->eventManager()->fire("onGroupsParticipantsRemove", array( $this->phoneNumber, $groupId, - Constants::parseJID($node->getAttribute('remove')) + $this->parseJID($node->getAttribute('remove')) )); } } @@ -4016,7 +4020,7 @@ protected function sendSetPicture($jid, $filepath) * * @return string */ - public static function parseJID($jid) + private function parseJID($jid) { $parts = explode('@', $jid); $parts = reset($parts); From d7e0a49b318afcca6e46595b01a276eaecd70f51 Mon Sep 17 00:00:00 2001 From: WHAnonymous Date: Wed, 9 Sep 2015 12:23:34 +0000 Subject: [PATCH 430/436] Update (bad git) --- src/whatsprot.class.php | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index 161e937f..455d3a92 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -152,10 +152,6 @@ public function checkCredentials() $countryCode = ($phone['ISO3166'] != '') ? $phone['ISO3166'] : 'US'; $langCode = ($phone['ISO639'] != '') ? $phone['ISO639'] : 'en'; - if ($phone['cc'] == '77' || $phone['cc'] == '79') { - $phone['cc'] = '7'; - } - // Build the url. $host = 'https://' . Constants::WHATSAPP_CHECK_HOST; $query = array( From 5fa986c725157486b096e4ccdd6d41d65301829a Mon Sep 17 00:00:00 2001 From: mgp25 Date: Fri, 11 Sep 2015 10:42:29 +0200 Subject: [PATCH 431/436] Not required anymore Check issue #938 for more information --- src/whatsprot.class.php | 23 ----------------------- 1 file changed, 23 deletions(-) diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index 455d3a92..6a17f791 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -1043,29 +1043,6 @@ public function sendGetProfilePhotoIds($numbers) return true; } - /** - * Request to retrieve the last online time of specific user. - * - * @param string $to Number or JID of user - */ - public function sendGetRequestLastSeen($to) - { - $msgId = $this->nodeId['getlastseen'] = $this->createIqId(); - - $queryNode = new ProtocolNode("query", null, null, null); - - $messageNode = new ProtocolNode("iq", - array( - "to" => $this->getJID($to), - "type" => "get", - "id" => $msgId, - "xmlns" => "jabber:iq:last" - ), array($queryNode), ""); - - $this->sendNode($messageNode); - $this->waitForServer($msgId); - } - /** * Send a request to get the current server properties. */ From 538263cb7193c866403abf757cbf02ad21ba161c Mon Sep 17 00:00:00 2001 From: mgp25 Date: Sun, 13 Sep 2015 13:24:55 +0200 Subject: [PATCH 432/436] Update ver. to 2.13.4 Nokia data --- src/Constants.php | 4 ++-- src/token.php | 32 +++++++++++++++++--------------- 2 files changed, 19 insertions(+), 17 deletions(-) diff --git a/src/Constants.php b/src/Constants.php index 28745cec..f5438559 100644 --- a/src/Constants.php +++ b/src/Constants.php @@ -19,8 +19,8 @@ class Constants const WHATSAPP_REQUEST_HOST = 'v.whatsapp.net/v2/code'; // The request code host. const WHATSAPP_SERVER = 's.whatsapp.net'; // The hostname used to login/send messages. const WHATSAPP_DEVICE = 'S40'; // The device name. - const WHATSAPP_VER = '2.12.96'; // The WhatsApp version. - const WHATSAPP_USER_AGENT = 'WhatsApp/2.12.96 S40Version/14.26 Device/Nokia302'; // User agent used in request/registration code. + const WHATSAPP_VER = '2.13.4'; // The WhatsApp version. + const WHATSAPP_USER_AGENT = 'WhatsApp/2.13.4 S40Version/14.26 Device/Nokia302'; // User agent used in request/registration code. const WHATSAPP_VER_CHECKER = 'https://coderus.openrepos.net/whitesoft/whatsapp_scratch'; // Check WhatsApp version } diff --git a/src/token.php b/src/token.php index 969b2ac9..2406483a 100755 --- a/src/token.php +++ b/src/token.php @@ -3,25 +3,27 @@ function generateRequestToken($country, $phone) { - // $signature = "MIIDMjCCAvCgAwIBAgIETCU2pDALBgcqhkjOOAQDBQAwfDELMAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFDASBgNVBAcTC1NhbnRhIENsYXJhMRYwFAYDVQQKEw1XaGF0c0FwcCBJbmMuMRQwEgYDVQQLEwtFbmdpbmVlcmluZzEUMBIGA1UEAxMLQnJpYW4gQWN0b24wHhcNMTAwNjI1MjMwNzE2WhcNNDQwMjE1MjMwNzE2WjB8MQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEUMBIGA1UEBxMLU2FudGEgQ2xhcmExFjAUBgNVBAoTDVdoYXRzQXBwIEluYy4xFDASBgNVBAsTC0VuZ2luZWVyaW5nMRQwEgYDVQQDEwtCcmlhbiBBY3RvbjCCAbgwggEsBgcqhkjOOAQBMIIBHwKBgQD9f1OBHXUSKVLfSpwu7OTn9hG3UjzvRADDHj+AtlEmaUVdQCJR+1k9jVj6v8X1ujD2y5tVbNeBO4AdNG/yZmC3a5lQpaSfn+gEexAiwk+7qdf+t8Yb+DtX58aophUPBPuD9tPFHsMCNVQTWhaRMvZ1864rYdcq7/IiAxmd0UgBxwIVAJdgUI8VIwvMspK5gqLrhAvwWBz1AoGBAPfhoIXWmz3ey7yrXDa4V7l5lK+7+jrqgvlXTAs9B4JnUVlXjrrUWU/mcQcQgYC0SRZxI+hMKBYTt88JMozIpuE8FnqLVHyNKOCjrh4rs6Z1kW6jfwv6ITVi8ftiegEkO8yk8b6oUZCJqIPf4VrlnwaSi2ZegHtVJWQBTDv+z0kqA4GFAAKBgQDRGYtLgWh7zyRtQainJfCpiaUbzjJuhMgo4fVWZIvXHaSHBU1t5w//S0lDK2hiqkj8KpMWGywVov9eZxZy37V26dEqr/c2m5qZ0E+ynSu7sqUD7kGx/zeIcGT0H+KAVgkGNQCo5Uc0koLRWYHNtYoIvt5R3X6YZylbPftF/8ayWTALBgcqhkjOOAQDBQADLwAwLAIUAKYCp0d6z4QQdyN74JDfQ2WCyi8CFDUM4CaNB+ceVXdKtOrNTQcc0e+t"; - // $classesMd5 = "R7MxKWjKZns6728qXwgRRQ=="; // 2.11.489 + /* + $signature = "MIIDMjCCAvCgAwIBAgIETCU2pDALBgcqhkjOOAQDBQAwfDELMAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFDASBgNVBAcTC1NhbnRhIENsYXJhMRYwFAYDVQQKEw1XaGF0c0FwcCBJbmMuMRQwEgYDVQQLEwtFbmdpbmVlcmluZzEUMBIGA1UEAxMLQnJpYW4gQWN0b24wHhcNMTAwNjI1MjMwNzE2WhcNNDQwMjE1MjMwNzE2WjB8MQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEUMBIGA1UEBxMLU2FudGEgQ2xhcmExFjAUBgNVBAoTDVdoYXRzQXBwIEluYy4xFDASBgNVBAsTC0VuZ2luZWVyaW5nMRQwEgYDVQQDEwtCcmlhbiBBY3RvbjCCAbgwggEsBgcqhkjOOAQBMIIBHwKBgQD9f1OBHXUSKVLfSpwu7OTn9hG3UjzvRADDHj+AtlEmaUVdQCJR+1k9jVj6v8X1ujD2y5tVbNeBO4AdNG/yZmC3a5lQpaSfn+gEexAiwk+7qdf+t8Yb+DtX58aophUPBPuD9tPFHsMCNVQTWhaRMvZ1864rYdcq7/IiAxmd0UgBxwIVAJdgUI8VIwvMspK5gqLrhAvwWBz1AoGBAPfhoIXWmz3ey7yrXDa4V7l5lK+7+jrqgvlXTAs9B4JnUVlXjrrUWU/mcQcQgYC0SRZxI+hMKBYTt88JMozIpuE8FnqLVHyNKOCjrh4rs6Z1kW6jfwv6ITVi8ftiegEkO8yk8b6oUZCJqIPf4VrlnwaSi2ZegHtVJWQBTDv+z0kqA4GFAAKBgQDRGYtLgWh7zyRtQainJfCpiaUbzjJuhMgo4fVWZIvXHaSHBU1t5w//S0lDK2hiqkj8KpMWGywVov9eZxZy37V26dEqr/c2m5qZ0E+ynSu7sqUD7kGx/zeIcGT0H+KAVgkGNQCo5Uc0koLRWYHNtYoIvt5R3X6YZylbPftF/8ayWTALBgcqhkjOOAQDBQADLwAwLAIUAKYCp0d6z4QQdyN74JDfQ2WCyi8CFDUM4CaNB+ceVXdKtOrNTQcc0e+t"; + $classesMd5 = "vBDjXjeeoc4D0w/12fWnPg=="; // 2.12.278 - // $key2 = base64_decode("/UIGKU1FVQa+ATM2A0za7G2KI9S/CwPYjgAbc67v7ep42eO/WeTLx1lb1cHwxpsEgF4+PmYpLd2YpGUdX/A2JQitsHzDwgcdBpUf7psX1BU="); - // $data = base64_decode($signature) . base64_decode($classesMd5) . $phone; + $key2 = base64_decode("/UIGKU1FVQa+ATM2A0za7G2KI9S/CwPYjgAbc67v7ep42eO/WeTLx1lb1cHwxpsEgF4+PmYpLd2YpGUdX/A2JQitsHzDwgcdBpUf7psX1BU="); + $data = base64_decode($signature) . base64_decode($classesMd5) . $phone; - // $opad = str_repeat(chr(0x5C), 64); - // $ipad = str_repeat(chr(0x36), 64); - // for ($i = 0; $i < 64; $i++) { - // $opad[$i] = $opad[$i] ^ $key2[$i]; - // $ipad[$i] = $ipad[$i] ^ $key2[$i]; - // } + $opad = str_repeat(chr(0x5C), 64); + $ipad = str_repeat(chr(0x36), 64); + for ($i = 0; $i < 64; $i++) { + $opad[$i] = $opad[$i] ^ $key2[$i]; + $ipad[$i] = $ipad[$i] ^ $key2[$i]; + } - // $output = hash("sha1", $opad . hash("sha1", $ipad . $data, true), true); + $output = hash("sha1", $opad . hash("sha1", $ipad . $data, true), true); - // return base64_encode($output); - $const = 'PdA2DJyKoUrwLw1Bg6EIhzh502dF9noR9uFCllGk'; - $releaseTime = '1439921717185'; - $token = md5($const . $releaseTime . $phone); + return base64_encode($output); + */ + $const = 'PdA2DJyKoUrwLw1Bg6EIhzh502dF9noR9uFCllGk'; + $releaseTime = '1441745119487'; + $token = md5($const . $releaseTime . $phone); return $token; } From 9161ba46d58966f40f6d37cfec98617f7ed1be78 Mon Sep 17 00:00:00 2001 From: Giovanni Terlingen Date: Wed, 16 Sep 2015 16:24:53 +0200 Subject: [PATCH 433/436] Fixed MCC codes --- src/countries.csv | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/countries.csv b/src/countries.csv index fee9acf6..a9e318bb 100755 --- a/src/countries.csv +++ b/src/countries.csv @@ -6,7 +6,7 @@ "Andorra",376,213,"AD","ca","003" "Angola",244,631,"AO","pt","002" "Anguilla",1264,"365","AI","en","840" -"Antarctica (Australian bases)",6721,232,"AQ","en","001" +"Antarctica (Australian bases)",6721,901,"AQ","en","001" "Antigua and Barbuda",1268,"344","AG","en","050" "Argentina",54,722,"AR","es","010" "Armenia",374,283,"AM","hy","010" @@ -248,7 +248,7 @@ "Vietnam",84,452,"VN","vi","001" "U.S. Virgin Islands",1340,"332","VI","en","001" "Wallis and Futuna",681,543,"WF","fr","001" -"West Bank",970,0,"PS","ar","001" +"West Bank",970,425,"PS","ar","001" "Yemen",967,421,"YE","ar","001" "Zambia",260,645,"ZM","en","001" "Zimbabwe",263,648,"ZW","en","001" From fc84aa441b79bd5a515f1d99a676235f4b6b8704 Mon Sep 17 00:00:00 2001 From: ottowayne Date: Fri, 18 Sep 2015 17:44:23 +0200 Subject: [PATCH 434/436] Fix sendGroupsChangeParticipants --- src/whatsprot.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/whatsprot.class.php b/src/whatsprot.class.php index 6a17f791..65e3ca5f 100755 --- a/src/whatsprot.class.php +++ b/src/whatsprot.class.php @@ -3812,7 +3812,7 @@ protected function sendGroupsChangeParticipants($groupId, $participant, $tag, $i $participants = new ProtocolNode("participant", array("jid" => $this->getJID($participant)), null, ""); $childHash = array(); - $child = new ProtocolNode($tag, $childHash, $participants, ""); + $child = new ProtocolNode($tag, $childHash, array($participants), ""); $node = new ProtocolNode("iq", array( From ddab7f1896a8cfdf71d576dbfeeda3f3e4bcd2d2 Mon Sep 17 00:00:00 2001 From: ottowayne Date: Fri, 18 Sep 2015 19:52:34 +0200 Subject: [PATCH 435/436] ProtocolNode - typehint children as array --- src/protocol.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/protocol.class.php b/src/protocol.class.php index 3ed24ad6..f6f66d04 100755 --- a/src/protocol.class.php +++ b/src/protocol.class.php @@ -78,7 +78,7 @@ public function getChildren() return $this->children; } - public function __construct($tag, $attributeHash, $children, $data) + public function __construct($tag, $attributeHash, array $children, $data) { $this->tag = $tag; $this->attributeHash = $attributeHash; From bdde6dd6a2cba9646eaaba473753a311c5f7c918 Mon Sep 17 00:00:00 2001 From: mgp25 Date: Sat, 19 Sep 2015 13:00:46 +0200 Subject: [PATCH 436/436] sendGroupsChangeParticipants fix --- src/protocol.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/protocol.class.php b/src/protocol.class.php index f6f66d04..3ed24ad6 100755 --- a/src/protocol.class.php +++ b/src/protocol.class.php @@ -78,7 +78,7 @@ public function getChildren() return $this->children; } - public function __construct($tag, $attributeHash, array $children, $data) + public function __construct($tag, $attributeHash, $children, $data) { $this->tag = $tag; $this->attributeHash = $attributeHash;