Təsadüfi mətn
Verilmiş ölçüdə yalnız hərflərdən təsadüfi mətn yaratmaqunknown
php
4 years ago
467 B
4
Indexable
<?php function anotherRandomIDGenerator() { // burada yazilan olcu + 1 yalniz herflerden ibaret metn generasiya edir $len = 8; $base = 'ABCDEFGHKLMNOPQRSTWXYZabcdefghjkmnpqrstwxyz'; $max = strlen($base) - 1; $activatecode = ''; mt_srand((double)microtime() * 1000000); while (strlen($activatecode) < $len + 1) $activatecode .= $base{mt_rand(0, $max)}; return $activatecode; } echo anotherRandomIDGenerator();
Editor is loading...