This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| function floatceil($number, $precision=2) { | |
| $significance = 1/pow(10,$precision); | |
| return number_format(ceil($number/$significance)*$significance, $precision, '.', ''); | |
| } | |
| /* | |
| Examples: | |
| floatceil(1, 2) -> 1.00 | |
| floatceil(1.035, 2) -> 1.04 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| define('TELEGRAM_BOT', 'YOUR_BOT'); // Username of the bot (Generated on @BotFather) | |
| define('TELEGRAM_TOKEN', 'YOUR:TOKEN'); // Token of the bot (Generated by @BotFather) | |
| //Data validation function | |
| function checkTelegramAuthorization($auth_data) { | |
| $check_hash = $auth_data['hash']; | |
| unset($auth_data['hash']); | |
| $data_check_arr = []; | |
| foreach ($auth_data as $key => $value) { |