HEX
Server: LiteSpeed
System: Linux premium106.web-hosting.com 4.18.0-553.44.1.lve.el8.x86_64 #1 SMP Thu Mar 13 14:29:12 UTC 2025 x86_64
User: cstehnfp (2380)
PHP: 8.1.34
Disabled: NONE
Upload Files
File: /home/cstehnfp/lgos-rdc.com/genkey.php
<style type="text/css">
.genkeyimg { text-align:center; PADDING : 1px; height:30px; FONT-WEIGHT: bold; FONT-SIZE: 32px; 
BACKGROUND: #f96633 repeat-x; CURSOR: pointer; COLOR: #ffffff; BORDER : #ff0000 1px solid; border-radius:5px;}
</style>
<?php
function gen_reg_key($r){ 
//on initialise la variable $key � "vide" 
$key=""; 
//on d�finit la taille de la chaine (6 caract�res ca suffit ;)) 
if($r==0){$max_length_reg_key=6;}else{$max_length_reg_key = $r; }
//on d�finit le type de caract�res ascii de la chaine (l'alphabet suffit amplement, mais libre a vous) 
$chars=array("1","2","3","4","5","6","7","8","9","0","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"); 
//on comptabilise le nombre total de caract�res possibles (26 pour l'alphabet) 
$count=count($chars) - 1; 
//on initialise la fonction rand pour le tirage al�atoire 
srand((double)microtime()*1000000); 
//on tire al�atoirement les $max_length_reg_key caracteres de la chaine 
for($i = 0; $i < $max_length_reg_key; $i++) $key .= $chars[rand(0, $count)]; 
//on renvois la cl� g�n�r�e 
$key=strtoupper($key);
return($key); 
}
?>