├── mainconfig.php ├── web_example.php ├── composer.json ├── .github └── FUNDING.yml ├── LICENSE ├── database.sql ├── api_example.php ├── README.md └── src └── ApiGames.php /mainconfig.php: -------------------------------------------------------------------------------- 1 | GROWTOPIA('Mrshadnic'); 10 | // echo $api->FREEFIRE(''); 11 | -------------------------------------------------------------------------------- /composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "aditamagf/check-ign", 3 | "description": "Un-official API to Check Username Game By Account ID", 4 | "type": "library", 5 | "license": "MIT", 6 | "autoload": { 7 | "psr-4": { 8 | "Aditdev\\": "src/" 9 | } 10 | }, 11 | "authors": [ 12 | { 13 | "name": "aditamagf", 14 | "email": "business@aditdev.id" 15 | } 16 | ], 17 | "minimum-stability": "dev", 18 | "require": {} 19 | } -------------------------------------------------------------------------------- /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | # These are supported funding model platforms 2 | 3 | github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2] 4 | patreon: # Replace with a single Patreon username 5 | open_collective: # Replace with a single Open Collective username 6 | ko_fi: aditamagf # Replace with a single Ko-fi username 7 | tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel 8 | community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry 9 | liberapay: # Replace with a single Liberapay username 10 | issuehunt: # Replace with a single IssueHunt username 11 | otechie: # Replace with a single Otechie username 12 | lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry 13 | custom: https://trakteer.id/aditamagf/tip # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] 14 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2023 Aditama Gilang Farel 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /database.sql: -------------------------------------------------------------------------------- 1 | -- phpMyAdmin SQL Dump 2 | -- version 5.2.0 3 | -- https://www.phpmyadmin.net/ 4 | -- 5 | -- Host: localhost 6 | -- Generation Time: Sep 23, 2023 at 03:20 PM 7 | -- Server version: 10.7.3-MariaDB-log 8 | -- PHP Version: 8.0.26 9 | 10 | SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; 11 | START TRANSACTION; 12 | SET time_zone = "+00:00"; 13 | 14 | 15 | /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; 16 | /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; 17 | /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; 18 | /*!40101 SET NAMES utf8mb4 */; 19 | 20 | -- 21 | -- Database: `aditdevid` 22 | -- 23 | 24 | -- -------------------------------------------------------- 25 | 26 | -- 27 | -- Table structure for table `accounts` 28 | -- 29 | 30 | CREATE TABLE `accounts` ( 31 | `id` int(11) NOT NULL, 32 | `code` varchar(50) NOT NULL, 33 | `user_id` varchar(100) NOT NULL, 34 | `other_id` varchar(100) NOT NULL, 35 | `nickname` varchar(300) NOT NULL, 36 | `expired_at` varchar(100) NOT NULL 37 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; 38 | 39 | -- 40 | -- Indexes for dumped tables 41 | -- 42 | 43 | -- 44 | -- Indexes for table `accounts` 45 | -- 46 | ALTER TABLE `accounts` 47 | ADD PRIMARY KEY (`id`), 48 | ADD KEY `code` (`code`), 49 | ADD KEY `user_id` (`user_id`), 50 | ADD KEY `other_id` (`other_id`); 51 | 52 | -- 53 | -- AUTO_INCREMENT for dumped tables 54 | -- 55 | 56 | -- 57 | -- AUTO_INCREMENT for table `accounts` 58 | -- 59 | ALTER TABLE `accounts` 60 | MODIFY `id` int(11) NOT NULL AUTO_INCREMENT; 61 | COMMIT; 62 | 63 | /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; 64 | /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; 65 | /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; 66 | -------------------------------------------------------------------------------- /api_example.php: -------------------------------------------------------------------------------- 1 | trim($_POST['game']), 8 | 'user_id' => trim($_POST['user_id']), 9 | 'other_id' => trim($_POST['other_id']) 10 | ); 11 | $is_check = false; 12 | $is_new = false; 13 | $checkAccount = mysqli_query($db, "SELECT * FROM accounts WHERE code = '" . $input_post['game'] . "' AND user_id = '" . $input_post['user_id'] . "' AND other_id = '" . $input_post['other_id'] . "'"); 14 | if (mysqli_num_rows($checkAccount) == 1) { 15 | $dataAccount = mysqli_fetch_assoc($checkAccount); 16 | if ($dataAccount['expired_at'] > time()) { 17 | $result = array('response' => true, 'data' => ['status' => 200, 'nickname' => $dataAccount['nickname']]); 18 | } else { 19 | $is_check = true; 20 | } 21 | } else { 22 | $is_check = true; 23 | $is_new = true; 24 | } 25 | if ($is_check) { 26 | require 'src/Games.php'; 27 | $apiGames = new ApiGames; 28 | if (!method_exists($apiGames, $input_post['game'])) { 29 | $result = array('response' => false, 'data' => array('msg' => 'Game not found (' . $input_post['game'] . ')')); 30 | } else { 31 | $result = json_decode($apiGames->{$input_post['game']}($input_post['user_id'], $input_post['other_id']), true); 32 | if ($result['status'] == 200) { 33 | if ($is_new) { 34 | mysqli_query($db, "INSERT INTO accounts (code, user_id, other_id, nickname, expired_at) VALUES ('" . $input_post['game'] . "', '" . $input_post['user_id'] . "', '" . $input_post['other_id'] . "', '" . $result['nickname'] . "', '" . strtotime('+7 day') . "')"); 35 | } else { 36 | mysqli_query($db, "UPDATE accounts SET nickname = '" . $result['nickname'] . "', expired_at = '" . strtotime('+7 day') . "' WHERE id = '" . $dataAccount['id'] . "'"); 37 | } 38 | $result = array('response' => true, 'data' => $result); 39 | } else { 40 | $result = array('response' => false, 'data' => $result); 41 | } 42 | } 43 | } 44 | exit(print(json_encode($result, JSON_PRETTY_PRINT))); 45 | } else { 46 | exit(print(json_encode(array('response' => false, 'data' => array('msg' => 'Invalid Request')), JSON_PRETTY_PRINT))); 47 | } 48 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ## PHP Library for Checking a Game Nickname Based on an Account ID 2 | 3 | [![CHECK IGN](https://img.shields.io/badge/CHECK%20IGN-September%2024%2C%202023-36ade1.svg)](https://github.com/aditamagf/check-ign) 4 | [![Packagist](https://img.shields.io/packagist/v/aditamagf/check-ign)](https://packagist.org/packages/aditamagf/check-ign) 5 | [![Total Downloads](https://img.shields.io/packagist/dt/aditamagf/check-ign)](https://packagist.org/packages/aditamagf/check-ign) 6 | [![CodeFactor](https://www.codefactor.io/repository/github/aditamagf/check-ign/badge)](https://www.codefactor.io/repository/github/aditamagf/check-ign) 7 | [![GitHub Issues](https://img.shields.io/github/issues/aditamagf/check-ign.svg)](https://github.com/aditamagf/check-ign/issues) 8 | [![GitHub Forks](https://img.shields.io/github/forks/aditamagf/check-ign.svg)](https://github.com/aditamagf/check-ign/network) 9 | [![GitHub Stars](https://img.shields.io/github/stars/aditamagf/check-ign.svg)](https://github.com/aditamagf/check-ign/stargazers) 10 | [![License](https://img.shields.io/github/license/aditamagf/check-ign.svg)](https://github.com/aditamagf/check-ign/blob/main/LICENSE) 11 | [![Hits](https://hits.seeyoufarm.com/api/count/incr/badge.svg?url=https%3A%2F%2Fgithub.com%2Faditamagf%2Fcheck-ign&count_bg=%232BCCE3&title_bg=%23555555&icon=&icon_color=%23E7E7E7&title=views&edge_flat=false)](https://github.com/aditamagf/check-ign) 12 | 13 | ## :coffee: Buy Me a Coffee 14 | 15 | - [https://ko-fi.com/aditamagf](https://ko-fi.com/aditamagf) 16 | - [https://trakteer.id/aditamagf/tip](https://trakteer.id/aditamagf/tip) 17 | 18 | ## Installation 19 | 20 | ``` 21 | composer require aditamagf/check-ign 22 | ``` 23 | 24 | ## Usage 25 | 26 | ```php 27 | require('src/Games.php'); 28 | 29 | use Aditdev\ApiGames; 30 | 31 | $api = new ApiGames; 32 | 33 | echo $api->MOBILE_LEGENDS('', ''); 34 | echo $api->FREEFIRE(''); 35 | ``` 36 | 37 | ## List of Games 38 | 39 | | Game | Code | 40 | | ------------------------------------- | --------------------- | 41 | | 8 Ball Pool | EIGHT_BALL_POOL | 42 | | Aether Gazer | AETHER_GAZER | 43 | | Arena of Valor | AOV | 44 | | Asphalt 9: Legends | GAMELOFT_A9 | 45 | | AU2 Mobile | AU_TWO_MOBILE | 46 | | Auto Chess | AUTO_CHESS | 47 | | Azur Lane | AZUR_LANE | 48 | | Badlanders | BAD_LANDERS | 49 | | BarbarQ | ELECSOUL | 50 | | Basketrio | BASKETRIO | 51 | | Call of Duty Mobile | CALL_OF_DUTY | 52 | | Captain Tsubasa: Dream Team | CAPTAIN_TSUBASA | 53 | | Crisis Action | CA_HEROGAMES | 54 | | Dragon City | DRAGON_CITY | 55 | | Dragon Raja | ZULONG_DRAGON_RAJA | 56 | | EOS RED | EOS_RED | 57 | | Farlight 84 | FARLIGHT84 | 58 | | Football Master 2 | FOOTBALL_MASTER | 59 | | Free Fire | FREEFIRE | 60 | | Genshin Impact | GENSHIN_IMPACT | 61 | | GROWTOPIA | GROWTOPIA | 62 | | Hago | HAGO | 63 | | Identity V | IDENTITY_V | 64 | | Laplace M | ZLONGAME | 65 | | League of Legends: Wild Rift | WILD_RIFT | 66 | | LifeAfter | NETEASE_LIFEAFTER | 67 | | Love and Deepspace | LOVE_AND_DEEPSPACE | 68 | | MARVEL Duel | MARVEL_DUEL | 69 | | Mobile Legends: Bang Bang | MOBILE_LEGENDS | 70 | | Mobile Legends: Adventure | ADVENTURE | 71 | | MU Origin 2 | OURPALM | 72 | | ONE PUNCH MAN: The Strongest | ONE_PUNCH_MAN | 73 | | Onmyoji Arena | ONMYOJI_ARENA | 74 | | Pixel Gun 3D | PIXEL_GUN_3D | 75 | | Point Blank | POINT_BLANK | 76 | | Ragnarok M: Eternal Love Big Cat Coin | GRAVITY_RAGNAROK_M | 77 | | Ragnarok X: Next Generation | RAGNAROK_X | 78 | | Sausage Man | SAUSAGE_MAN | 79 | | Speed Drifters | SPEEDDRIFTERS | 80 | | Super Mecha Champions | SUPER_MECHA_CHAMPIONS | 81 | | Super SUS | SUPER_SUS | 82 | | VALORANT | VALORANT | 83 | | War Planet Online | WAR_PLANET_ONLINE | 84 | | Watcher of Realms | WATCHER_OF_REALMS | 85 | | ZEPETO | NAVER_Z_CORPORATION | 86 | 87 | ## License 88 | 89 | This open-source software is distributed under the MIT License. See LICENSE.md 90 | 91 | ## Contributing 92 | 93 | All kinds of contributions are welcome - code, tests, documentation, bug reports, new features, etc... 94 | 95 | - Send feedbacks. 96 | - Submit bug reports. 97 | - Write/Edit the documents. 98 | - Fix bugs or add new features. 99 | -------------------------------------------------------------------------------- /src/ApiGames.php: -------------------------------------------------------------------------------- 1 | 429, 'msg' => 'Too many attempts, plz wait 5 seconds']); 69 | } else { 70 | if ($response['success'] && empty($response['errorMsg'])) { 71 | return json_encode(['status' => 200, 'nickname' => urldecode($response['confirmationFields']['username'])]); 72 | } else { 73 | return json_encode(['status' => 400, 'msg' => 'Invalid ID']); 74 | } 75 | } 76 | } 77 | 78 | public function AETHER_GAZER($id, $otherid = '') 79 | { 80 | $postdata = self::buildBodys(62, 765900.0, 0, $id, '', '547-AETHER_GAZER', 11840, 'id_ID', 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJkeW5hbWljU2t1SW5mbyI6IntcInNrdUlkXCI6XCJjb20ueW9zdGFyLmFldGhlcmdhemVyLnNoaWZ0aW5nZmxvd2VyNVwiLFwiZXZlbnRQYWNrYWdlXCI6XCIwXCIsXCJkZW5vbUltYWdlVXJsXCI6XCJodHRwczovL2NkbjEuY29kYXNob3AuY29tL2ltYWdlcy81NDdfM2QyMTBiNzUtNTJkYi00YjUxLTgzMGYtZDYxMTFiNjFkNDQ5X0FFVEhFUiBHQVpFUl9pbWFnZS9Db2RhX0FHX1NLVWltYWdlcy8yOTkwLnBuZ1wiLFwiZGVub21OYW1lXCI6XCIyOTkwIFNoaWZ0aW5nIEZsb3dlcnNcIixcImRlbm9tQ2F0ZWdvcnlOYW1lXCI6XCJTaGlmdGluZyBGbG93ZXJzXCIsXCJ0YWdzXCI6W10sXCJjb3VudHJ5Mk5hbWVcIjpcIklEXCIsXCJsdnRJZFwiOjExODQwfSJ9.qyp6OeAstvp7_0tRS4vWuvcko6D4quDUGTTRMWrbrHM', 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJkeW5hbWljU2t1SW5mbyI6IntcInBjSWRcIjoyMjAsXCJwcmljZVwiOjc2NTkwMC4wLFwiY3VycmVuY3lcIjpcIklEUlwiLFwiYXBpUHJpY2VcIjo3NjU5MDAuMCxcImFwaVByaWNlQ3VycmVuY3lcIjpcIklEUlwiLFwicHJpY2VCZWZvcmVUYXhcIjo2OTAwMDAuMCxcInRheEFtb3VudFwiOjc1OTAwLjAsXCJza3VJZFwiOlwiY29tLnlvc3Rhci5hZXRoZXJnYXplci5zaGlmdGluZ2Zsb3dlcjVcIixcImx2dElkXCI6MTE4NDB9In0.8WW45qBicqad7rTGEFzMOEWUmkxEwIm76-nd0yVBTYc'); 81 | $response = json_decode(self::Request(self::API_CODASHOP, $postdata, 'codashop'), true); 82 | if (isset($response['RESULT_CODE']) && $response['RESULT_CODE'] == '10001') { 83 | return json_encode(['status' => 429, 'msg' => 'Too many attempts, plz wait 5 seconds']); 84 | } else { 85 | if ($response['success'] && empty($response['errorMsg'])) { 86 | return json_encode(['status' => 200, 'nickname' => urldecode($response['confirmationFields']['username'])]); 87 | } else { 88 | return json_encode(['status' => 400, 'msg' => 'Invalid ID']); 89 | } 90 | } 91 | } 92 | 93 | public function AOV($id, $otherid = '') 94 | { 95 | $postdata = self::buildBodys(8003, 300000.0000, 0, $id, '', 'AOV', '', 'id_ID', '', ''); 96 | $response = json_decode(self::Request(self::API_CODASHOP, $postdata, 'codashop'), true); 97 | if (isset($response['RESULT_CODE']) && $response['RESULT_CODE'] == '10001') { 98 | return json_encode(['status' => 429, 'msg' => 'Too many attempts, plz wait 5 seconds']); 99 | } else { 100 | if ($response['success'] && empty($response['errorMsg'])) { 101 | return json_encode(['status' => 200, 'nickname' => urldecode($response['confirmationFields']['roles'][0]['role'])]); 102 | } else { 103 | return json_encode(['status' => 400, 'msg' => 'Invalid ID']); 104 | } 105 | } 106 | } 107 | 108 | public function GAMELOFT_A9($id, $otherid = '') 109 | { 110 | $postdata = self::buildBodys(114548, 479700.0000, 0, $id, $otherid, 'GAMELOFT_A9', '', 'id_ID', '', ''); 111 | $response = json_decode(self::Request(self::API_CODASHOP, $postdata, 'codashop'), true); 112 | if (isset($response['RESULT_CODE']) && $response['RESULT_CODE'] == '10001') { 113 | return json_encode(['status' => 429, 'msg' => 'Too many attempts, plz wait 5 seconds']); 114 | } else { 115 | if ($response['success'] && empty($response['errorMsg'])) { 116 | return json_encode(['status' => 200, 'nickname' => urldecode($response['confirmationFields']['username'])]); 117 | } else { 118 | return json_encode(['status' => 400, 'msg' => 'Invalid ID']); 119 | } 120 | } 121 | } 122 | 123 | public function AU_TWO_MOBILE($id, $otherid = '') 124 | { 125 | $response = json_decode(self::Request(self::API_DANCINGIDOL . $id, '', 'dancingidol'), true); 126 | if (isset($response['data']['rolename']) && !empty($response['data']['rolename'])) { 127 | return json_encode(['status' => 200, 'nickname' => $response['data']['rolename']]); 128 | } else { 129 | return json_encode(['status' => 400, 'msg' => 'Invalid ID']); 130 | } 131 | } 132 | 133 | public function AUTO_CHESS($id, $otherid = '') 134 | { 135 | $postdata = self::buildBodys(203896, 250000.0000, 0, $id, '', 'AUTO_CHESS', '', 'id_ID', '', ''); 136 | $response = json_decode(self::Request(self::API_CODASHOP, $postdata, 'codashop'), true); 137 | if (isset($response['RESULT_CODE']) && $response['RESULT_CODE'] == '10001') { 138 | return json_encode(['status' => 429, 'msg' => 'Too many attempts, plz wait 5 seconds']); 139 | } else { 140 | if ($response['success'] && empty($response['errorMsg'])) { 141 | return json_encode(['status' => 200, 'nickname' => urldecode($response['confirmationFields']['username'])]); 142 | } else { 143 | return json_encode(['status' => 400, 'msg' => 'Invalid ID']); 144 | } 145 | } 146 | } 147 | 148 | public function AZUR_LANE($id, $otherid = '') 149 | { 150 | $postdata = self::buildBodys(99716, 590000.0000, 0, $id, $otherid, 'AZUR_LANE', '', 'id_ID', '', ''); 151 | $response = json_decode(self::Request(self::API_CODASHOP, $postdata, 'codashop'), true); 152 | if (isset($response['RESULT_CODE']) && $response['RESULT_CODE'] == '10001') { 153 | return json_encode(['status' => 429, 'msg' => 'Too many attempts, plz wait 5 seconds']); 154 | } else { 155 | if ($response['success'] && empty($response['errorMsg'])) { 156 | return json_encode(['status' => 200, 'nickname' => urldecode($response['confirmationFields']['username'])]); 157 | } else { 158 | return json_encode(['status' => 400, 'msg' => 'Invalid ID or Server']); 159 | } 160 | } 161 | } 162 | 163 | public function BAD_LANDERS($id, $otherid = '') 164 | { 165 | $postdata = self::buildBodys(124099, 705000.0000, 0, $id, $otherid, 'BAD_LANDERS', '', 'id_ID', '', ''); 166 | $response = json_decode(self::Request(self::API_CODASHOP, $postdata, 'codashop'), true); 167 | if (isset($response['RESULT_CODE']) && $response['RESULT_CODE'] == '10001') { 168 | return json_encode(['status' => 429, 'msg' => 'Too many attempts, plz wait 5 seconds']); 169 | } else { 170 | if ($response['success'] && empty($response['errorMsg'])) { 171 | return json_encode(['status' => 200, 'nickname' => urldecode($response['confirmationFields']['username'])]); 172 | } else { 173 | return json_encode(['status' => 400, 'msg' => 'Invalid ID or Server']); 174 | } 175 | } 176 | } 177 | 178 | public function ELECSOUL($id, $otherid = '') 179 | { 180 | $postdata = self::buildBodys(5171, 660000.0000, 0, $id, '1', 'ELECSOUL', '', 'id_ID', '', ''); 181 | $response = json_decode(self::Request(self::API_CODASHOP, $postdata, 'codashop'), true); 182 | if (isset($response['RESULT_CODE']) && $response['RESULT_CODE'] == '10001') { 183 | return json_encode(['status' => 429, 'msg' => 'Too many attempts, plz wait 5 seconds']); 184 | } else { 185 | if ($response['success'] && empty($response['errorMsg'])) { 186 | return json_encode(['status' => 200, 'nickname' => urldecode($response['result'])]); 187 | } else { 188 | return json_encode(['status' => 400, 'msg' => 'Invalid ID or Server']); 189 | } 190 | } 191 | } 192 | 193 | public function BASKETRIO($id, $otherid = '') 194 | { 195 | $postdata = self::buildBodys(147203, 832500.0000, 0, $id, $otherid, 'BASKETRIO', '', 'id_ID', '', ''); 196 | $response = json_decode(self::Request(self::API_CODASHOP, $postdata, 'codashop'), true); 197 | if (isset($response['RESULT_CODE']) && $response['RESULT_CODE'] == '10001') { 198 | return json_encode(['status' => 429, 'msg' => 'Too many attempts, plz wait 5 seconds']); 199 | } else { 200 | if ($response['success'] && empty($response['errorMsg'])) { 201 | return json_encode(['status' => 200, 'nickname' => urldecode($response['confirmationFields']['username'])]); 202 | } else { 203 | return json_encode(['status' => 400, 'msg' => 'Invalid ID or Server']); 204 | } 205 | } 206 | } 207 | 208 | public function CALL_OF_DUTY($id, $otherid = '') 209 | { 210 | $postdata = self::buildBodys(46251, 2000000.0000, 0, $id, '', 'CALL_OF_DUTY', '', 'id_ID', '', ''); 211 | $response = json_decode(self::Request(self::API_CODASHOP, $postdata, 'codashop'), true); 212 | if (isset($response['RESULT_CODE']) && $response['RESULT_CODE'] == '10001') { 213 | return json_encode(['status' => 429, 'msg' => 'Too many attempts, plz wait 5 seconds']); 214 | } else { 215 | if ($response['success'] && empty($response['errorMsg'])) { 216 | return json_encode(['status' => 200, 'nickname' => urldecode($response['confirmationFields']['roles'][0]['role'])]); 217 | } else { 218 | return json_encode(['status' => 400, 'msg' => 'Invalid ID']); 219 | } 220 | } 221 | } 222 | 223 | public function CAPTAIN_TSUBASA($id, $otherid = '') 224 | { 225 | $postdata = self::buildBodys(352113, 1099000.0000, 0, $id, '', 'CAPTAIN_TSUBASA', '', 'id_ID', '', ''); 226 | $response = json_decode(self::Request(self::API_CODASHOP, $postdata, 'codashop'), true); 227 | if (isset($response['RESULT_CODE']) && $response['RESULT_CODE'] == '10001') { 228 | return json_encode(['status' => 429, 'msg' => 'Too many attempts, plz wait 5 seconds']); 229 | } else { 230 | if ($response['success'] && empty($response['errorMsg'])) { 231 | return json_encode(['status' => 200, 'nickname' => urldecode($response['confirmationFields']['username'])]); 232 | } else { 233 | return json_encode(['status' => 400, 'msg' => 'Invalid ID']); 234 | } 235 | } 236 | } 237 | 238 | public function CA_HEROGAMES($id, $otherid = '') 239 | { 240 | $postdata = self::buildBodys(3745, 300000.0000, 0, $id, $otherid, 'HEROGAMES', '', 'id_ID', '', ''); 241 | $response = json_decode(self::Request(self::API_CODASHOP, $postdata, 'codashop'), true); 242 | if (isset($response['RESULT_CODE']) && $response['RESULT_CODE'] == '10001') { 243 | return json_encode(['status' => 429, 'msg' => 'Too many attempts, plz wait 5 seconds']); 244 | } else { 245 | if ($response['success'] && empty($response['errorMsg'])) { 246 | return json_encode(['status' => 200, 'nickname' => urldecode($response['confirmationFields']['username'])]); 247 | } else { 248 | return json_encode(['status' => 400, 'msg' => 'Invalid ID or Server']); 249 | } 250 | } 251 | } 252 | 253 | public function DRAGON_CITY($id, $otherid = '') 254 | { 255 | $postdata = self::buildBodys(254278, 479000.0000, 0, $id, '', 'DRAGON_CITY', '', 'id_ID', '', ''); 256 | $response = json_decode(self::Request(self::API_CODASHOP, $postdata, 'codashop'), true); 257 | if (isset($response['RESULT_CODE']) && $response['RESULT_CODE'] == '10001') { 258 | return json_encode(['status' => 429, 'msg' => 'Too many attempts, plz wait 5 seconds']); 259 | } else { 260 | if ($response['success'] && empty($response['errorMsg'])) { 261 | return json_encode(['status' => 200, 'nickname' => urldecode($response['confirmationFields']['username'])]); 262 | } else { 263 | return json_encode(['status' => 400, 'msg' => 'Invalid ID']); 264 | } 265 | } 266 | } 267 | 268 | public function ZULONG_DRAGON_RAJA($id, $otherid = '') 269 | { 270 | $postdata = self::buildBodys(75648, 1000000.0000, 0, $id, '', 'ZULONG_DRAGON_RAJA', '', 'id_ID', '', ''); 271 | $response = json_decode(self::Request(self::API_CODASHOP, $postdata, 'codashop'), true); 272 | if (isset($response['RESULT_CODE']) && $response['RESULT_CODE'] == '10001') { 273 | return json_encode(['status' => 429, 'msg' => 'Too many attempts, plz wait 5 seconds']); 274 | } else { 275 | if ($response['success'] && empty($response['errorMsg'])) { 276 | return json_encode(['status' => 200, 'nickname' => urldecode($response['confirmationFields']['username'])]); 277 | } else { 278 | return json_encode(['status' => 400, 'msg' => 'Invalid ID']); 279 | } 280 | } 281 | } 282 | 283 | public function EOS_RED($id, $otherid = '') 284 | { 285 | $postdata = self::buildBodys(182235, 852139.0000, 0, $id, $otherid, 'EOS_RED', '', 'id_ID', '', ''); 286 | $response = json_decode(self::Request(self::API_CODASHOP, $postdata, 'codashop'), true); 287 | if (isset($response['RESULT_CODE']) && $response['RESULT_CODE'] == '10001') { 288 | return json_encode(['status' => 429, 'msg' => 'Too many attempts, plz wait 5 seconds']); 289 | } else { 290 | if ($response['success'] && empty($response['errorMsg'])) { 291 | return json_encode(['status' => 200, 'nickname' => urldecode($response['confirmationFields']['username'])]); 292 | } else { 293 | return json_encode(['status' => 400, 'msg' => 'Invalid ID or Server']); 294 | } 295 | } 296 | } 297 | 298 | public function FARLIGHT84($id, $otherid = '') 299 | { 300 | $postdata = self::buildBodys(229, 559900.0, 0, $id, '', 'FARLIGHT84', 4138, 'id_ID', 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJkeW5hbWljU2t1SW5mbyI6IntcInNrdUlkXCI6XCJjb20ubWlyYWNsZWdhbWVzLnNvbGFybGFuZC5sb3Rjb2luXzQwMDBcIixcImV2ZW50UGFja2FnZVwiOlwiMFwiLFwiZGVub21JbWFnZVVybFwiOlwiaHR0cHM6Ly9jZG4xLmNvZGFzaG9wLmNvbS9pbWFnZXMvNzQzXzkwMTk2YjZlLTlkODYtNGM4Ni1hZmJiLTY4NTg0M2QyNzM5Y19GYXJsaWdodCA4NF9pbWFnZS80NzAwX0ZhcmxpZ2h0X0RpYW1vbmRzLnBuZ1wiLFwiZGVub21OYW1lXCI6XCI0NzAwIERpYW1vbmRzXCIsXCJkZW5vbUNhdGVnb3J5TmFtZVwiOlwiVW5jYXRlZ29yaXplZFwiLFwidGFnc1wiOltdLFwiY291bnRyeTJOYW1lXCI6XCJJRFwiLFwibHZ0SWRcIjo0MTM4fSJ9.i442v0Nxnnq09y0r5V9N-xJ6w4x5bd9jhqExylX_u7s', 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJkeW5hbWljU2t1SW5mbyI6IntcInBjSWRcIjoyMjAsXCJwcmljZVwiOjU1OTkwMC4wLFwiY3VycmVuY3lcIjpcIklEUlwiLFwiYXBpUHJpY2VcIjo1NTk5MDAuMCxcImFwaVByaWNlQ3VycmVuY3lcIjpcIklEUlwiLFwicHJpY2VCZWZvcmVUYXhcIjo1MDQ0MTQuMCxcInRheEFtb3VudFwiOjU1NDg2LjAsXCJza3VJZFwiOlwiY29tLm1pcmFjbGVnYW1lcy5zb2xhcmxhbmQubG90Y29pbl80MDAwXCIsXCJsdnRJZFwiOjQxMzh9In0.RXIVBNGby3DdMmpjoqAjDWfyLserZaZ0Ajshqp2ioLM'); 301 | $response = json_decode(self::Request(self::API_CODASHOP, $postdata, 'codashop'), true); 302 | if (isset($response['RESULT_CODE']) && $response['RESULT_CODE'] == '10001') { 303 | return json_encode(['status' => 429, 'msg' => 'Too many attempts, plz wait 5 seconds']); 304 | } else { 305 | if ($response['success'] && empty($response['errorMsg'])) { 306 | return json_encode(['status' => 200, 'nickname' => urldecode($response['confirmationFields']['username'])]); 307 | } else { 308 | return json_encode(['status' => 400, 'msg' => 'Invalid ID or Server']); 309 | } 310 | } 311 | } 312 | 313 | public function FOOTBALL_MASTER($id, $otherid = '') 314 | { 315 | $postdata = self::buildBodys(185403, 1000000.0000, 0, $id, '', 'FOOTBALL_MASTER', '', 'id_ID', '', ''); 316 | $response = json_decode(self::Request(self::API_CODASHOP, $postdata, 'codashop'), true); 317 | if (isset($response['RESULT_CODE']) && $response['RESULT_CODE'] == '10001') { 318 | return json_encode(['status' => 429, 'msg' => 'Too many attempts, plz wait 5 seconds']); 319 | } else { 320 | if ($response['success'] && empty($response['errorMsg'])) { 321 | return json_encode(['status' => 200, 'nickname' => urldecode($response['confirmationFields']['username'])]); 322 | } else { 323 | return json_encode(['status' => 400, 'msg' => 'Invalid ID']); 324 | } 325 | } 326 | } 327 | 328 | public function FREEFIRE($id, $otherid = '') 329 | { 330 | $postdata = self::buildBodys(28153, 1000000.0000, 0, $id, '', 'FREEFIRE', '', 'id_ID', '', ''); 331 | $response = json_decode(self::Request(self::API_CODASHOP, $postdata, 'codashop'), true); 332 | if (isset($response['RESULT_CODE']) && $response['RESULT_CODE'] == '10001') { 333 | return json_encode(['status' => 429, 'msg' => 'Too many attempts, plz wait 5 seconds']); 334 | } else { 335 | if ($response['success'] && empty($response['errorMsg'])) { 336 | return json_encode(['status' => 200, 'nickname' => urldecode($response['confirmationFields']['roles'][0]['role'])]); 337 | } else { 338 | return json_encode(['status' => 400, 'msg' => 'Invalid ID']); 339 | } 340 | } 341 | } 342 | 343 | public function GENSHIN_IMPACT($id, $otherid = '') 344 | { 345 | $postdata = self::buildBodys(116118, 815000.0000, 0, $id, $otherid, 'GENSHIN_IMPACT', '', 'id_ID', '', ''); 346 | $response = json_decode(self::Request(self::API_CODASHOP, $postdata, 'codashop'), true); 347 | if (isset($response['RESULT_CODE']) && $response['RESULT_CODE'] == '10001') { 348 | return json_encode(['status' => 429, 'msg' => 'Too many attempts, plz wait 5 seconds']); 349 | } else { 350 | if ($response['success'] && empty($response['errorMsg'])) { 351 | return json_encode(['status' => 200, 'nickname' => urldecode($response['confirmationFields']['username'])]); 352 | } else { 353 | return json_encode(['status' => 400, 'msg' => 'Invalid ID or Server']); 354 | } 355 | } 356 | } 357 | 358 | public function GROWTOPIA($id, $otherid = '') 359 | { 360 | $postdata = self::buildBodys(398701, 800000.0000, 0, $id, '', 'GROWTOPIA', '', 'id_ID', '', ''); 361 | $response = json_decode(self::Request(self::API_CODASHOP, $postdata, 'codashop'), true); 362 | if (isset($response['RESULT_CODE']) && $response['RESULT_CODE'] == '10001') { 363 | return json_encode(['status' => 429, 'msg' => 'Too many attempts, plz wait 5 seconds']); 364 | } else { 365 | if ($response['success'] && empty($response['errorMsg'])) { 366 | return json_encode(['status' => 200, 'nickname' => urldecode($response['confirmationFields']['username'])]); 367 | } else { 368 | return json_encode(['status' => 400, 'msg' => 'Invalid ID or Server']); 369 | } 370 | } 371 | } 372 | 373 | public function HAGO($id, $otherid = '') 374 | { 375 | $postdata = self::buildBodys(16153, 544500.0000, 0, $id, $otherid, 'HAGO', '', 'id_ID', '', ''); 376 | $response = json_decode(self::Request(self::API_CODASHOP, $postdata, 'codashop'), true); 377 | if (isset($response['RESULT_CODE']) && $response['RESULT_CODE'] == '10001') { 378 | return json_encode(['status' => 429, 'msg' => 'Too many attempts, plz wait 5 seconds']); 379 | } else { 380 | if ($response['success'] && empty($response['errorMsg'])) { 381 | return json_encode(['status' => 200, 'nickname' => urldecode($response['confirmationFields']['username'])]); 382 | } else { 383 | return json_encode(['status' => 400, 'msg' => 'Invalid ID or Server']); 384 | } 385 | } 386 | } 387 | 388 | public function IDENTITY_V($id, $otherid = '') 389 | { 390 | $postdata = self::buildBodys(59703, 725000.0000, 0, $id, $otherid, 'IDENTITY_V', '', 'id_ID', '', ''); 391 | $response = json_decode(self::Request(self::API_CODASHOP, $postdata, 'codashop'), true); 392 | if (isset($response['RESULT_CODE']) && $response['RESULT_CODE'] == '10001') { 393 | return json_encode(['status' => 429, 'msg' => 'Too many attempts, plz wait 5 seconds']); 394 | } else { 395 | if ($response['success'] && empty($response['errorMsg'])) { 396 | return json_encode(['status' => 200, 'nickname' => urldecode($response['confirmationFields']['username'])]); 397 | } else { 398 | return json_encode(['status' => 400, 'msg' => 'Invalid ID or Server']); 399 | } 400 | } 401 | } 402 | 403 | public function ZLONGAME($id, $otherid = '') 404 | { 405 | $postdata = self::buildBodys(25528, 739000.0000, 0, $id, '', 'ZLONGAME', '', 'id_ID', '', ''); 406 | $response = json_decode(self::Request(self::API_CODASHOP, $postdata, 'codashop'), true); 407 | if (isset($response['RESULT_CODE']) && $response['RESULT_CODE'] == '10001') { 408 | return json_encode(['status' => 429, 'msg' => 'Too many attempts, plz wait 5 seconds']); 409 | } else { 410 | if ($response['success'] && empty($response['errorMsg'])) { 411 | return json_encode(['status' => 200, 'nickname' => urldecode($response['confirmationFields']['username'])]); 412 | } else { 413 | return json_encode(['status' => 400, 'msg' => 'Invalid ID']); 414 | } 415 | } 416 | } 417 | 418 | public function WILD_RIFT($id, $otherid = '') 419 | { 420 | $postdata = self::buildBodys(372111, 360000.0000, 0, $id, '', 'WILD_RIFT', '', 'id_ID', '', ''); 421 | $response = json_decode(self::Request(self::API_CODASHOP, $postdata, 'codashop'), true); 422 | if (isset($response['RESULT_CODE']) && $response['RESULT_CODE'] == '10001') { 423 | return json_encode(['status' => 429, 'msg' => 'Too many attempts, plz wait 5 seconds']); 424 | } else { 425 | if ($response['success'] && empty($response['errorMsg'])) { 426 | return json_encode(['status' => 200, 'nickname' => urldecode($response['confirmationFields']['username'])]); 427 | } else { 428 | return json_encode(['status' => 400, 'msg' => 'Invalid ID']); 429 | } 430 | } 431 | } 432 | 433 | public function NETEASE_LIFEAFTER($id, $otherid = '') 434 | { 435 | $postdata = self::buildBodys(45798, 1098977.0000, 0, $id, $otherid, 'NETEASE_LIFEAFTER', '', 'id_ID', '', ''); 436 | $response = json_decode(self::Request(self::API_CODASHOP, $postdata, 'codashop'), true); 437 | if (isset($response['RESULT_CODE']) && $response['RESULT_CODE'] == '10001') { 438 | return json_encode(['status' => 429, 'msg' => 'Too many attempts, plz wait 5 seconds']); 439 | } else { 440 | if ($response['success'] && empty($response['errorMsg'])) { 441 | return json_encode(['status' => 200, 'nickname' => urldecode($response['confirmationFields']['username'])]); 442 | } else { 443 | return json_encode(['status' => 400, 'msg' => 'Invalid ID or Server']); 444 | } 445 | } 446 | } 447 | 448 | public function LOVE_AND_DEEPSPACE($id, $otherid = '') 449 | { 450 | $postdata = self::buildBodys(125, 799000.0, 0, $id, '', 'INFOLD_GAMES-LOVE_AND_DEEPSPACE', 11684, 'id_ID', 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJkeW5hbWljU2t1SW5mbyI6IntcInNrdUlkXCI6XCI2XzEwMDVcIixcImV2ZW50UGFja2FnZVwiOlwiMFwiLFwiZGVub21JbWFnZVVybFwiOlwiaHR0cHM6Ly9jZG4xLmNvZGFzaG9wLmNvbS9pbWFnZXMvOTE2XzQ0Y2MyNmU3LWU3NDctNDk4NS04MzQ1LWZmODFjMGUwM2QxN19MT1ZFIEFORCBERUVQU1BBQ0VfaW1hZ2UvMzI4MCBDcnlzdGFscy5wbmdcIixcImRlbm9tTmFtZVwiOlwiMzI4MCBDcnlzdGFscys3MjAgRGlhbW9uZHNcIixcImRlbm9tQ2F0ZWdvcnlOYW1lXCI6XCJDcnlzdGFsXCIsXCJ0YWdzXCI6W10sXCJjb3VudHJ5Mk5hbWVcIjpcIklEXCIsXCJsdnRJZFwiOjExNjg0LFwiZGVmYXVsdFByaWNlXCI6Nzk5MDAwLjAsXCJkZWZhdWx0Q3VycmVuY3lcIjpcIklEUlwiLFwiYWRkaXRpb25hbEluZm9cIjp7XCJEeW5hbWljU2t1UHJvbW9EZXRhaWxcIjpcIm51bGxcIixcIkxveWFsdHlDdXJyZW5jeURldGFpbFwiOlwie1xcXCJwcmljaW5nU2NoZW1lXFxcIjpcXFwicGFpZF9jdXJyZW5jeVxcXCIsXFxcImxveWFsdHlFYXJuZWRBbW91bnRcXFwiOjAuMCxcXFwibG95YWx0eUJ1cm5lZEFtb3VudFxcXCI6MC4wfVwifX0ifQ.9qYXDANw-mvEGUDZwJWYHow4xe1aMy27ATQ3HwRMpqc', 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJkeW5hbWljU2t1SW5mbyI6IntcInBjSWRcIjoyMjAsXCJwcmljZVwiOjc5OTAwMC4wLFwiY3VycmVuY3lcIjpcIklEUlwiLFwiYXBpUHJpY2VcIjo3OTkwMDAuMCxcImFwaVByaWNlQ3VycmVuY3lcIjpcIklEUlwiLFwiZGlzY291bnRQcmljZVwiOjc5OTAwMC4wLFwicHJpY2VCZWZvcmVUYXhcIjo3MTk4MjAuMCxcInRheEFtb3VudFwiOjc5MTgwLjAsXCJza3VJZFwiOlwiNl8xMDA1XCIsXCJsdnRJZFwiOjExNjg0fSJ9.egPFavIM4u6tfG5wjYyCwXWY8IQZkLF4UbnqdOzHpGc', 423); 451 | $response = json_decode(self::Request(self::API_CODASHOP, $postdata, 'codashop'), true); 452 | if (isset($response['RESULT_CODE']) && $response['RESULT_CODE'] == '10001') { 453 | return json_encode(['status' => 429, 'msg' => 'Too many attempts, plz wait 5 seconds']); 454 | } else { 455 | if ($response['success'] && empty($response['errorMsg'])) { 456 | return json_encode(['status' => 200, 'nickname' => urldecode($response['confirmationFields']['username'])]); 457 | } else { 458 | return json_encode(['status' => 400, 'msg' => 'Invalid ID or Server']); 459 | } 460 | } 461 | } 462 | 463 | public function MARVEL_DUEL($id, $otherid = '') 464 | { 465 | $postdata = self::buildBodys(155959, 739000.0000, 0, $id, '', 'MARVEL_DUEL', '', 'id_ID', '', ''); 466 | $response = json_decode(self::Request(self::API_CODASHOP, $postdata, 'codashop'), true); 467 | if (isset($response['RESULT_CODE']) && $response['RESULT_CODE'] == '10001') { 468 | return json_encode(['status' => 429, 'msg' => 'Too many attempts, plz wait 5 seconds']); 469 | } else { 470 | if ($response['success'] && empty($response['errorMsg'])) { 471 | return json_encode(['status' => 200, 'nickname' => urldecode($response['confirmationFields']['username'])]); 472 | } else { 473 | return json_encode(['status' => 400, 'msg' => 'Invalid ID']); 474 | } 475 | } 476 | } 477 | 478 | public function MOBILE_LEGENDS($id, $otherid = '') 479 | { 480 | $postdata = self::buildBodys(27684, 527250.0000, 0, $id, $otherid, 'MOBILE_LEGENDS', '', 'id_ID', '', ''); 481 | $response = json_decode(self::Request(self::API_CODASHOP, $postdata, 'codashop'), true); 482 | if (isset($response['RESULT_CODE']) && $response['RESULT_CODE'] == '10001') { 483 | return json_encode(['status' => 429, 'msg' => 'Too many attempts, plz wait 5 seconds']); 484 | } else { 485 | if ($response['success'] && empty($response['errorMsg'])) { 486 | return json_encode(['status' => 200, 'nickname' => urldecode($response['confirmationFields']['username'])]); 487 | } else { 488 | return json_encode(['status' => 400, 'msg' => 'Invalid ID or Server']); 489 | } 490 | } 491 | } 492 | 493 | public function ADVENTURE($id, $otherid = '') 494 | { 495 | $postdata = self::buildBodys(36359, 739000.0000, 0, $id, $otherid, 'ADVENTURE', '', 'id_ID', '', '', 47); 496 | $response = json_decode(self::Request(self::API_CODASHOP, $postdata, 'codashop'), true); 497 | if (isset($response['RESULT_CODE']) && $response['RESULT_CODE'] == '10001') { 498 | return json_encode(['status' => 429, 'msg' => 'Too many attempts, plz wait 5 seconds']); 499 | } else { 500 | if ($response['success'] && empty($response['errorMsg'])) { 501 | return json_encode(['status' => 200, 'nickname' => urldecode($response['confirmationFields']['username'])]); 502 | } else { 503 | return json_encode(['status' => 400, 'msg' => 'Invalid ID or Server']); 504 | } 505 | } 506 | } 507 | 508 | public function OURPALM($id, $otherid = '') 509 | { 510 | $postdata = self::buildBodys(16273, 550000.0000, 0, $id, preg_replace('/\D/', '', $otherid), 'OURPALM', '', 'id_ID', '', ''); 511 | $response = json_decode(self::Request(self::API_CODASHOP, $postdata, 'codashop'), true); 512 | if (isset($response['RESULT_CODE']) && $response['RESULT_CODE'] == '10001') { 513 | return json_encode(['status' => 429, 'msg' => 'Too many attempts, plz wait 5 seconds']); 514 | } else { 515 | if ($response['success'] && empty($response['errorMsg'])) { 516 | return json_encode(['status' => 200, 'nickname' => urldecode($response['confirmationFields']['username'])]); 517 | } else { 518 | return json_encode(['status' => 400, 'msg' => 'Invalid ID or Server']); 519 | } 520 | } 521 | } 522 | 523 | public function ONE_PUNCH_MAN($id, $otherid = '') 524 | { 525 | $postdata = self::buildBodys(77832, 5500000.0000, 0, $id, $otherid, 'ONE_PUNCH_MAN', '', 'id_ID', '', ''); 526 | $response = json_decode(self::Request(self::API_CODASHOP, $postdata, 'codashop'), true); 527 | if (isset($response['RESULT_CODE']) && $response['RESULT_CODE'] == '10001') { 528 | return json_encode(['status' => 429, 'msg' => 'Too many attempts, plz wait 5 seconds']); 529 | } else { 530 | if ($response['success'] && empty($response['errorMsg'])) { 531 | return json_encode(['status' => 200, 'nickname' => urldecode($response['confirmationFields']['username'])]); 532 | } else { 533 | return json_encode(['status' => 400, 'msg' => 'Invalid ID or Server']); 534 | } 535 | } 536 | } 537 | 538 | public function ONMYOJI_ARENA($id, $otherid = '') 539 | { 540 | $postdata = self::buildBodys(46466, 706000.0000, 0, $id, '', 'ONMYOJI_ARENA', '', 'id_ID', '', ''); 541 | $response = json_decode(self::Request(self::API_CODASHOP, $postdata, 'codashop'), true); 542 | if (isset($response['RESULT_CODE']) && $response['RESULT_CODE'] == '10001') { 543 | return json_encode(['status' => 429, 'msg' => 'Too many attempts, plz wait 5 seconds']); 544 | } else { 545 | if ($response['success'] && empty($response['errorMsg'])) { 546 | return json_encode(['status' => 200, 'nickname' => urldecode($response['confirmationFields']['username'])]); 547 | } else { 548 | return json_encode(['status' => 400, 'msg' => 'Invalid ID']); 549 | } 550 | } 551 | } 552 | 553 | public function PIXEL_GUN_3D($id, $otherid = '') 554 | { 555 | $postdata = self::buildBodys(410, 788767.0, 0, $id, '', 'PIXEL_GUN_3D', 11461, 'id_ID', 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJkeW5hbWljU2t1SW5mbyI6IntcInNrdUlkXCI6XCIyMDE1OjIyMDBcIixcImV2ZW50UGFja2FnZVwiOlwiMFwiLFwiZGVub21JbWFnZVVybFwiOlwiXCIsXCJkZW5vbU5hbWVcIjpcIjIyMDAgR2Vtc1wiLFwiZGVub21DYXRlZ29yeU5hbWVcIjpcIkdlbXNcIixcInRhZ3NcIjpbXSxcImNvdW50cnkyTmFtZVwiOlwiSURcIixcImx2dElkXCI6MTE0NjEsXCJkZWZhdWx0UHJpY2VcIjo3ODg3NjYuMCxcImRlZmF1bHRDdXJyZW5jeVwiOlwiSURSXCIsXCJhZGRpdGlvbmFsSW5mb1wiOntcIkR5bmFtaWNTa3VQcm9tb0RldGFpbFwiOlwibnVsbFwiLFwiTG95YWx0eUN1cnJlbmN5RGV0YWlsXCI6XCJ7XFxcInByaWNpbmdTY2hlbWVcXFwiOlxcXCJwYWlkX2N1cnJlbmN5XFxcIixcXFwibG95YWx0eUVhcm5lZEFtb3VudFxcXCI6MC4wLFxcXCJsb3lhbHR5QnVybmVkQW1vdW50XFxcIjowLjB9XCJ9fSJ9.Ejfuo0gIJHP2drx6Q6Ax0L8U8la7iyyoeGRwz5kYCdM', 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJkeW5hbWljU2t1SW5mbyI6IntcInBjSWRcIjo5MDYsXCJwcmljZVwiOjc4ODc2Ny4wLFwiY3VycmVuY3lcIjpcIklEUlwiLFwiYXBpUHJpY2VcIjo3ODg3NjYuMCxcImFwaVByaWNlQ3VycmVuY3lcIjpcIklEUlwiLFwiZGlzY291bnRQcmljZVwiOjc4ODc2Ny4wLFwicHJpY2VCZWZvcmVUYXhcIjo3MTA2MDEuMCxcInRheEFtb3VudFwiOjc4MTY2LjAsXCJza3VJZFwiOlwiMjAxNToyMjAwXCIsXCJsdnRJZFwiOjExNDYxfSJ9.evXYDJkpDK2BCTSF3TxajPyQske4BpEkzAD6CSW-Vig', 355); 556 | $response = json_decode(self::Request(self::API_CODASHOP, $postdata, 'codashop'), true); 557 | if (isset($response['RESULT_CODE']) && $response['RESULT_CODE'] == '10001') { 558 | return json_encode(['status' => 429, 'msg' => 'Too many attempts, plz wait 5 seconds']); 559 | } else { 560 | if ($response['success'] && empty($response['errorMsg'])) { 561 | return json_encode(['status' => 200, 'nickname' => urldecode($response['confirmationFields']['username'])]); 562 | } else { 563 | return json_encode(['status' => 400, 'msg' => 'Invalid ID']); 564 | } 565 | } 566 | } 567 | 568 | public function POINT_BLANK($id, $otherid = '') 569 | { 570 | $postdata = self::buildBodys(54790, 550000.0000, 0, $id, '', 'POINT_BLANK', '', 'id_ID', '', ''); 571 | $response = json_decode(self::Request(self::API_CODASHOP, $postdata, 'codashop'), true); 572 | if (isset($response['RESULT_CODE']) && $response['RESULT_CODE'] == '10001') { 573 | return json_encode(['status' => 429, 'msg' => 'Too many attempts, plz wait 5 seconds']); 574 | } else { 575 | if ($response['success'] && empty($response['errorMsg'])) { 576 | return json_encode(['status' => 200, 'nickname' => urldecode($response['confirmationFields']['username'])]); 577 | } else { 578 | return json_encode(['status' => 400, 'msg' => 'Invalid ID']); 579 | } 580 | } 581 | } 582 | 583 | public function GRAVITY_RAGNAROK_M($id, $otherid = '') 584 | { 585 | $postdata = self::buildBodys(414041, 1519050.0000, 0, $id, $otherid, 'GRAVITY_RAGNAROK_M', '', 'id_ID', '', ''); 586 | $response = json_decode(self::Request(self::API_CODASHOP, $postdata, 'codashop'), true); 587 | if (isset($response['RESULT_CODE']) && $response['RESULT_CODE'] == '10001') { 588 | return json_encode(['status' => 429, 'msg' => 'Too many attempts, plz wait 5 seconds']); 589 | } else { 590 | if ($response['success'] && empty($response['errorMsg'])) { 591 | return json_encode(['status' => 200, 'nickname' => urldecode($response['confirmationFields']['username'])]); 592 | } else { 593 | return json_encode(['status' => 400, 'msg' => 'Invalid ID or Server']); 594 | } 595 | } 596 | } 597 | 598 | public function RAGNAROK_X($id, $otherid = '') 599 | { 600 | $postdata = self::buildBodys(195837, 1000000.0000, 0, $id, $otherid, 'RAGNAROK_X', '', 'id_ID', '', ''); 601 | $response = json_decode(self::Request(self::API_CODASHOP, $postdata, 'codashop'), true); 602 | if (isset($response['RESULT_CODE']) && $response['RESULT_CODE'] == '10001') { 603 | return json_encode(['status' => 429, 'msg' => 'Too many attempts, plz wait 5 seconds']); 604 | } else { 605 | if ($response['success'] && empty($response['errorMsg'])) { 606 | return json_encode(['status' => 200, 'nickname' => urldecode($response['confirmationFields']['username'])]); 607 | } else { 608 | return json_encode(['status' => 400, 'msg' => 'Invalid ID or Server']); 609 | } 610 | } 611 | } 612 | 613 | public function SAUSAGE_MAN($id, $otherid = '') 614 | { 615 | $postdata = self::buildBodys(256634, 1599000.0000, 0, $id, 'global-release', 'SAUSAGE_MAN', '', 'id_ID', '', ''); 616 | $response = json_decode(self::Request(self::API_CODASHOP, $postdata, 'codashop'), true); 617 | if (isset($response['RESULT_CODE']) && $response['RESULT_CODE'] == '10001') { 618 | return json_encode(['status' => 429, 'msg' => 'Too many attempts, plz wait 5 seconds']); 619 | } else { 620 | if ($response['success'] && empty($response['errorMsg'])) { 621 | return json_encode(['status' => 200, 'nickname' => urldecode($response['confirmationFields']['username'])]); 622 | } else { 623 | return json_encode(['status' => 400, 'msg' => 'Invalid ID']); 624 | } 625 | } 626 | } 627 | 628 | public function SPEEDDRIFTERS($id, $otherid = '') 629 | { 630 | $postdata = self::buildBodys(12861, 1000000.0000, 0, $id, '', 'SPEEDDRIFTERS', '', 'id_ID', '', ''); 631 | $response = json_decode(self::Request(self::API_CODASHOP, $postdata, 'codashop'), true); 632 | if (isset($response['RESULT_CODE']) && $response['RESULT_CODE'] == '10001') { 633 | return json_encode(['status' => 429, 'msg' => 'Too many attempts, plz wait 5 seconds']); 634 | } else { 635 | if ($response['success'] && empty($response['errorMsg'])) { 636 | return json_encode(['status' => 200, 'nickname' => urldecode($response['confirmationFields']['roles'][0]['role'])]); 637 | } else { 638 | return json_encode(['status' => 400, 'msg' => 'Invalid ID']); 639 | } 640 | } 641 | } 642 | 643 | public function SUPER_MECHA_CHAMPIONS($id, $otherid = '') 644 | { 645 | $postdata = self::buildBodys(37815, 706000.0000, 0, $id, '', 'SUPER_MECHA_CHAMPIONS', '', 'id_ID', '', ''); 646 | $response = json_decode(self::Request(self::API_CODASHOP, $postdata, 'codashop'), true); 647 | if (isset($response['RESULT_CODE']) && $response['RESULT_CODE'] == '10001') { 648 | return json_encode(['status' => 429, 'msg' => 'Too many attempts, plz wait 5 seconds']); 649 | } else { 650 | if ($response['success'] && empty($response['errorMsg'])) { 651 | return json_encode(['status' => 200, 'nickname' => urldecode($response['confirmationFields']['username'])]); 652 | } else { 653 | return json_encode(['status' => 400, 'msg' => 'Invalid ID']); 654 | } 655 | } 656 | } 657 | 658 | public function SUPER_SUS($id, $otherid = '') 659 | { 660 | $postdata = self::buildBodys(266162, 681000.0000, 0, $id, '', 'SUPER_SUS', '', 'id_ID', '', ''); 661 | $response = json_decode(self::Request(self::API_CODASHOP, $postdata, 'codashop'), true); 662 | if (isset($response['RESULT_CODE']) && $response['RESULT_CODE'] == '10001') { 663 | return json_encode(['status' => 429, 'msg' => 'Too many attempts, plz wait 5 seconds']); 664 | } else { 665 | if ($response['success'] && empty($response['errorMsg'])) { 666 | return json_encode(['status' => 200, 'nickname' => urldecode($response['confirmationFields']['username'])]); 667 | } else { 668 | return json_encode(['status' => 400, 'msg' => 'Invalid ID']); 669 | } 670 | } 671 | } 672 | 673 | public function VALORANT($id, $otherid = '') 674 | { 675 | $postdata = self::buildBodys(950605, 739000.0000, 0, $id, '', 'VALORANT', '', 'id_ID', '', ''); 676 | $response = json_decode(self::Request(self::API_CODASHOP, $postdata, 'codashop'), true); 677 | if (isset($response['RESULT_CODE']) && $response['RESULT_CODE'] == '10001') { 678 | return json_encode(['status' => 429, 'msg' => 'Too many attempts, plz wait 5 seconds']); 679 | } else { 680 | if ($response['success'] && empty($response['errorMsg'])) { 681 | return json_encode(['status' => 200, 'nickname' => urldecode($response['confirmationFields']['username'])]); 682 | } else { 683 | return json_encode(['status' => 400, 'msg' => 'Invalid ID']); 684 | } 685 | } 686 | } 687 | 688 | public function WAR_PLANET_ONLINE($id, $otherid = '') 689 | { 690 | $postdata = self::buildBodys(424705, 535000.0000, 0, $id, '', 'WAR_PLANET_ONLINE', '', 'id_ID', '', ''); 691 | $response = json_decode(self::Request(self::API_CODASHOP, $postdata, 'codashop'), true); 692 | if (isset($response['RESULT_CODE']) && $response['RESULT_CODE'] == '10001') { 693 | return json_encode(['status' => 429, 'msg' => 'Too many attempts, plz wait 5 seconds']); 694 | } else { 695 | if ($response['success'] && empty($response['errorMsg'])) { 696 | return json_encode(['status' => 200, 'nickname' => urldecode($response['confirmationFields']['username'])]); 697 | } else { 698 | return json_encode(['status' => 400, 'msg' => 'Invalid ID']); 699 | } 700 | } 701 | } 702 | 703 | public function WATCHER_OF_REALMS($id, $otherid = '') 704 | { 705 | $postdata = self::buildBodys(963012, 819000.0000, 0, $id, $otherid, 'WATCHER_OF_REALMS', '', 'id_ID', '', ''); 706 | $response = json_decode(self::Request(self::API_CODASHOP, $postdata, 'codashop'), true); 707 | if (isset($response['RESULT_CODE']) && $response['RESULT_CODE'] == '10001') { 708 | return json_encode(['status' => 429, 'msg' => 'Too many attempts, plz wait 5 seconds']); 709 | } else { 710 | if ($response['success'] && empty($response['errorMsg'])) { 711 | return json_encode(['status' => 200, 'nickname' => urldecode($response['confirmationFields']['username'])]); 712 | } else { 713 | return json_encode(['status' => 400, 'msg' => 'Invalid ID']); 714 | } 715 | } 716 | } 717 | 718 | public function NAVER_Z_CORPORATION($id, $otherid = '') 719 | { 720 | $postdata = self::buildBodys(937273, 1082050.0000, 0, $id, '', 'NAVER_Z_CORPORATION', '', 'id_ID', '', ''); 721 | $response = json_decode(self::Request(self::API_CODASHOP, $postdata, 'codashop'), true); 722 | if (isset($response['RESULT_CODE']) && $response['RESULT_CODE'] == '10001') { 723 | return json_encode(['status' => 429, 'msg' => 'Too many attempts, plz wait 5 seconds']); 724 | } else { 725 | if ($response['success'] && empty($response['errorMsg'])) { 726 | return json_encode(['status' => 200, 'nickname' => urldecode($response['confirmationFields']['username'])]); 727 | } else { 728 | return json_encode(['status' => 400, 'msg' => 'Invalid ID']); 729 | } 730 | } 731 | } 732 | 733 | protected function buildBodys($vppId, $vppPrice, $vppvarPrice, $userId, $zoneId, $voucherTypeName, $lvtId, $shopLang, $dynamicSkuToken = '', $pricePointDynamicSkuToken = '', $voucherTypeId = '') 734 | { 735 | $postdata = [ 736 | 'voucherPricePoint.id' => $vppId, 737 | 'voucherPricePoint.price' => $vppPrice, 738 | 'voucherPricePoint.variablePrice' => $vppvarPrice, 739 | 'user.userId' => $userId, 740 | 'user.zoneId' => $zoneId, 741 | 'voucherTypeName' => $voucherTypeName, 742 | 'lvtId' => $lvtId, 743 | 'shopLang' => $shopLang, 744 | 'dynamicSkuToken' => $dynamicSkuToken, 745 | 'pricePointDynamicSkuToken' => $pricePointDynamicSkuToken, 746 | 'voucherTypeId' => $voucherTypeId 747 | ]; 748 | 749 | return $postdata; 750 | } 751 | 752 | protected function buildHeaders($provider) 753 | { 754 | $headers = []; 755 | if ($provider == 'codashop') { 756 | $headers = array( 757 | 'Content-Type: application/json', 758 | 'Origin: https://www.codashop.com', 759 | 'Referer: https://www.codashop.com/', 760 | 'User-Agent: Mozilla/5.0 (Linux; Android 6.0; Nexus 5 Build/MRA58N) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/102.0.5005.63 Mobile Safari/537.36', 761 | ); 762 | } elseif ($provider == 'duniagames') { 763 | $headers = array( 764 | 'Content-Type: application/json', 765 | 'Host: api.duniagames.co.id', 766 | 'Origin: https://duniagames.co.id', 767 | 'Referer: https://duniagames.co.id/', 768 | 'User-Agent: Mozilla/5.0 (Linux; Android 6.0; Nexus 5 Build/MRA58N) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/102.0.5005.63 Mobile Safari/537.36' 769 | ); 770 | } elseif ($provider == 'bosbosgames') { 771 | $headers = array( 772 | 'Content-Type: application/x-www-form-urlencoded; charset=UTF-8', 773 | 'Cookie: _ga=GA1.2.298876061.1652097083; _gid=GA1.2.1859066530.1654426776; aliyungf_tc=7f81248f2e832e4a3ea67cf14a5791629061b6016866ffb0391a681cb00325ef', 774 | 'Host: www.bosbosgames.com', 775 | 'Origin: https://www.bosbosgames.com', 776 | 'Referer: https://www.bosbosgames.com/web/webInfull.do', 777 | 'User-Agent: Mozilla/5.0 (Linux; Android 6.0; Nexus 5 Build/MRA58N) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/102.0.5005.63 Mobile Safari/537.36', 778 | 'X-Requested-With: XMLHttpRequest' 779 | ); 780 | } elseif ($provider == 'xdg') { 781 | $headers = array( 782 | 'Content-Type: application/x-www-form-urlencoded; charset=UTF-8', 783 | 'User-Agent: Mozilla/5.0 (Linux; Android 6.0; Nexus 5 Build/MRA58N) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/101.0.4951.54 Mobile Safari/537.36', 784 | 'X-Requested-With: XMLHttpRequest' 785 | ); 786 | } elseif ($provider == 'dancingidol') { 787 | $headers = array( 788 | 'Host: dancingidol.uniuhk.com', 789 | 'Referer: http://dancingidol.uniuhk.com/payment' 790 | ); 791 | } 792 | return $headers; 793 | } 794 | 795 | protected function Request($url, $post, $provider, $json = true) 796 | { 797 | $ch = curl_init(); 798 | curl_setopt_array($ch, array( 799 | CURLOPT_URL => $url, 800 | CURLOPT_RETURNTRANSFER => true, 801 | )); 802 | if (!empty($post)) { 803 | curl_setopt($ch, CURLOPT_POST, true); 804 | curl_setopt($ch, CURLOPT_POSTFIELDS, ($json) ? json_encode($post) : http_build_query($post)); 805 | } 806 | curl_setopt($ch, CURLOPT_HTTPHEADER, self::buildHeaders($provider)); 807 | $result = curl_exec($ch); 808 | curl_close($ch); 809 | return $result; 810 | } 811 | } 812 | --------------------------------------------------------------------------------