Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /*if(!isset($_POST["id"])){
- return;
- }*/
- class generateKey{
- private $plugin;
- public function __construct($tamanho = 15){
- $this->tamanho = $tamanho;
- }
- public function gerar(){
- $key = "";
- $all = "qwertyuiopasdfghjklzxcvbnmQWERTYUIOPASDFGHJKLZXCVBNM1234567890";
- for($i=0 ; $i < $this->tamanho; $i++){
- $key .= $all[mt_rand(0, 61)];
- }
- return $key;
- }
- }
- $html = false;
- $a = fopen("ids.yml", "a");
- fclose($a);
- $keyfix = "";
- $file = yaml_parse("ids.yml");
- if(array_key_exists("DanielYTK", $file)){
- unset($file["DanielYTK"]);
- file_put_contents($file);
- $key = new Key(20);
- $keyfix = $key->gerar();
- $this->html = true;
- }
- if($html === false){
- header("Locate: noexists.html"); # ENVIAR O CLIENTE PRA UMA PÁGINA DIZENDO QUE O ID DE COMPRA NÃO EXISTE
- return;
- }
- ?>
- <!DOCTYPE html>
- <html>
- <head>
- <title>KEY</title>
- </head>
- <body>
- <center><h1><?php $keyfix ?></h1><center>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement