diff --git a/db.php b/db.php index 6063d7d..8868b4f 100644 --- a/db.php +++ b/db.php @@ -14,6 +14,7 @@ class DataBase const DEFAULT_SIZE = 3; const MAX_SIZE = 9; const CLOUD_CODE_LENGTH = 6; + const CLOUD_CODE_MAXTRY = 10; private $db; private $cloud; @@ -217,10 +218,10 @@ class DataBase $duration = self::DEFAULT_DURATION; } - for ($i = 0; $i < 10; $i++) { + for ($i = 0; $i < self::CLOUD_CODE_MAXTRY; $i++) { $code = bin2hex(random_bytes(self::CLOUD_CODE_LENGTH)); + $code = '2ae606bfb6d2'; if (!$this->loadCloudByCode($code)) { - echo 'LOAD CLOUD'; break; } }