Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $GET_player = 'nick';
- $GET_hash = 'token';
- $SecretCode = '123456789'; //хеш, код, секретное слово или что-то в этом роде
- $money = 5000; //денег сколько дать
- if ( !isset($_POST[$GET_player]) || !isset($_POST[$GET_hash]) ) die('not params');
- $player = trim($_POST[$GET_player]);
- $hash = $_POST[$GET_hash];
- //$realhash = md5($SecretCode . $player); //алгоритм хеширования
- $realhash = md5($player . $SecretCode);
- if ($hash != $realhash) {
- die('Access denied!');
- }
- //дать денег
- define ( 'ROOT_LK_DIR', dirname ( __FILE__ ) . '/..' );
- include(ROOT_LK_DIR . '/config.php');
- include(ROOT_LK_DIR . '/class/language.class.php');
- include(ROOT_LK_DIR . '/class/_user.class.php');
- include(ROOT_LK_DIR . '/class/lk.class.php');
- $lk = new lk( $config_lk, true );
- $lk->init($lk->init_user_byname( $player ));
- $lk->give_money($money);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement