Guest User

Untitled

a guest
Dec 3rd, 2018
134
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.93 KB | None | 0 0
  1. <form action="index.php" method="post">
  2. <b>Username: </b><input type="text" placeholder="Username" name="username"/><br><br>
  3. <b>Password: </b><input type="text" placeholder="Password" name="password"/><br><br>
  4. <b>Coins: </b><input style="width: 100px" type="text" placeholder="Coins" name="coins"/><br><br>
  5. <input type="submit" name="submit">
  6. </form><br><br>
  7.  
  8. <?php
  9. if ($_POST['submit']) {
  10. require_once 'Pickle.php';
  11. $p = new Pickle;
  12. $p->silent=true;
  13. $p->connect(trim($_POST['username']), trim($_POST['password']),'Friaca');
  14. if($p->error!==-1) die('error: '.$p->error);
  15. $p->joinGame(912);
  16. $time = round($_POST['coins']/30+2);
  17. echo 'Please wait for ',$time,' seconds while ',$_POST['coins'],' coins are added to your account.<br>';
  18. sleep($time);
  19. $p->getCoins($_POST['coins']);
  20. echo $_POST['coins'],' coins have been added to your account. You now have ',$p->objPlayer->getCoins()+$_POST['coins'],' coins. Enjoy!';
  21. $p->disconnect();
  22. }
  23. ?>
Add Comment
Please, Sign In to add comment