Rainbot - ChatBot


SUBMITTED BY: Guest

DATE: March 4, 2015, 3:31 p.m.

FORMAT: PHP

SIZE: 2.0 kB

HITS: 660

  1. Rainbot ChatBot on http://is.gd/bleutrade
  2. <?php
  3. // The API keys for the account to send funds from
  4. $GLOBALS["apikey"] = "";
  5. $GLOBALS["apisecret"] = "";
  6. // How often to send coins (in seconds)
  7. $GLOBALS["refresh"] = "120";
  8. // Coins and amounts to send
  9. // create one entry for each coin
  10. $GLOBALS["coins"]["HTML5"] = "625";
  11. $GLOBALS["coins"]["PAC"] = "625";
  12. $GLOBALS["coins"]["GCN"] = "625";
  13. $GLOBALS["coins"]["CAGE"] = "625";
  14. //****************************************************************
  15. // Edit below this line at your own risk!!!
  16. //****************************************************************
  17. ?>
  18. <!DOCTYPE HTML>
  19. <html>
  20. <head>
  21. <title>Rainbot Drip Feeder</title>
  22. </head>
  23. <body>
  24. <?php
  25. echo "Feeding Coins: ".date (DATE_RFC2822, time())." <br>\n";
  26. foreach ($GLOBALS["coins"] as $coin => $amount)
  27. {
  28. feeder ($coin, $amount);
  29. sleep (1);
  30. }
  31. ?>
  32. <script>
  33. setTimeout(function(){window.location.reload(1);}, <?php echo ($GLOBALS["refresh"] * 1000) ?>);
  34. </script>
  35. </body>
  36. </html>
  37. <?php
  38. function feeder ($coin, $amount)
  39. {
  40. $nonce = time();
  41. $uri = "https://bleutrade.com/api/v2/account/transfer?currency=".$coin."&quantity=".$amount."&touser=rainbot&apikey=".$GLOBALS["apikey"]."&nonce=".$nonce;
  42. $sign = hash_hmac('sha512',$uri,$GLOBALS["apisecret"]);
  43. $ch = curl_init($uri);
  44. curl_setopt($ch, CURLOPT_HTTPHEADER, array('apisign:'.$sign));
  45. curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
  46. $execResult = curl_exec($ch);
  47. $status = json_decode ($execResult, 1);
  48. echo "\t Status Message: ".$status["message"]." Sending ".$amount." ".$coin." <br>\n";
  49. if ($status["success"] == "false")
  50. {
  51. $GLOBALS["loop"] = FALSE;
  52. }
  53. }
  54. ?>

comments powered by Disqus