Scriptimiz 3 ayrı zorluk seviyesine göre belirlenen uzunlukta rastgele şifreler üretiyor, örneklerini cPanel gibi uygulamalardan hatırlayabilirsiniz.
1. Seviye: Küçük harf / rakam kombinasyonu
2. Seviye: Küçük-büyük harf / rakam kombinasyonu
3. Seviye: Küçük-büyük harf / rakam / özel karakter kombinasyonu
Parkta, bahçede, piknikte gönül rahatlığıyla kullanabilir, sevdiklerinize doğum günü armağanı olarak gönderebilirsiniz. Ayrıca acil olarak rastgele üretilmiş şifrelere ihtiyaç duyduğunuz her an bu scripti kullanmak üzere http://egonomik.com/sifre/ adresini ziyaret edebilirsiniz.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 | if($_GET['len'] != "" && $_GET['len'] >= "3") { $uzunluk = $_GET['len']; } else { $uzunluk = "6"; } function generatePassword($length=6,$level=2){ list($usec, $sec) = explode(' ', microtime()); srand((float) $sec + ((float) $usec * 100000)); $validchars[1] = "0123456789abcdfghjkmnpqrstvwxyz"; $validchars[2] = "0123456789abcdfghjkmnpqrstvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"; $validchars[3] = "0123456789_!@#$%&*()-=+/abcdfghjkmnpqrstvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_!@#$%&*()-=+/"; $password = ""; $counter = 0; while ($counter < $length) { $actChar = substr($validchars[$level], rand(0, strlen($validchars[$level])-1), 1); // All character must be different if (!strstr($password, $actChar)) { $password .= $actChar; $counter++; } } return $password; } echo ' <div class="container"> <div class="box"> <fieldset> <legend><img src="images/1.png"></legend> <input class="pass" type="text" value="'.generatePassword($uzunluk,"1").'" onclick="select();" /> <br /> <input class="pass" type="text" value="'.generatePassword($uzunluk,"1").'" onclick="select();" /> <br /> <input class="pass" type="text" value="'.generatePassword($uzunluk,"1").'" onclick="select();" /> <br /> </fieldset> </div> <div class="box"> <fieldset> <legend><img src="images/2.png"></legend> <input class="pass" type="text" value="'.generatePassword($uzunluk,"2").'" onclick="select();" /> <br /> <input class="pass" type="text" value="'.generatePassword($uzunluk,"2").'" onclick="select();" /> <br /> <input class="pass" type="text" value="'.generatePassword($uzunluk,"2").'" onclick="select();" /> <br /> </fieldset> </div> <div class="box"> <fieldset> <legend><img src="images/3.png"></legend> <input class="pass" type="text" value="'.generatePassword($uzunluk,"3").'" onclick="select();" /> <br /> <input class="pass" type="text" value="'.generatePassword($uzunluk,"3").'" onclick="select();" /> <br /> <input class="pass" type="text" value="'.generatePassword($uzunluk,"3").'" onclick="select();" /> <br /> </fieldset> </div> <div style="clear:both; margin-bottom: 20px"></div> <form name="sifre" action="'.$PHP_SELF.'" method="GET"> <b>Yeni şifre oluştur</b><br /> Uzunluk: <select name="len" onchange="document.sifre.submit();">'; for($i=3; $i<=15; $i++) { echo '<option'; if($uzunluk == "$i") { echo ' selected'; } echo '>'.$i.'</option>'; } echo '</select> <input type="submit" value="Yeni" style="cursor:pointer" /> </form> <div class="dipnot"> Egonomik.com 2010 | <a href="http://www.egonomik.com/" title="Egonomik Anasayfa">Anasayfa</a> | <a href="http://www.egonomik.com/2010/11/php-rastgele-sifre-uretici-php-random-password-generator/" title="PHP Rastgele Şifre Üretici (PHP Random Password Generator)">Konuya Git</a> | <a href="http://www.egonomik.com/script/php-sifre-olusturucu/php-sifre-olusturucu.rar" title="PHP Random Password Generator Download">Bu Scripti İndir</a> </div> </div>'; |
Scriptin Çalışan Örneği:
Demo
Script Dosyalarını İndir (11 KB):
Download
güzel olmuş. tşkler
demo:
http://benim.tk/php
Ellerine sağlık başarılı…
demoda max. şifre uzunluğunu da kontrol etseniz iyi olur. adres satırından çok uzun bir rakam girilirse http 500 hatası veriyor aşırı yükten ötürü.