PHP create unique alphanumeric php - Net-Raft.com

Welcome aboard! We are happy you are here and wish you good net-raft!




Just a Web Code Solution

create unique alphanumeric using php


 522

Show ResultPHP


2

<!DOCTYPE html>
<html>
<head>
</head>
<body>

<?php

function GenUnique($length=15) {

$string = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
$len = strlen($string);
$genpass = '';
mt_srand(10000000*(double)microtime());
for ($i = 0; $i < $length; $i++) {
$genpass .= $string[mt_rand(0,$len - 1)];
}
return $genpass;

}

echo GenUnique();

?>

</body>
</html>


By     Created   
The power of the user (%)
2%



The most helpful PHP solutions

detect browser phpdetect browser phpPHP

Click to see more ...

  3.7K     387

create QR code phpcreate QR code phpPHP

Click to see more ...

  2.3K     274

delete array item phpdelete array item phpPHP

Click to see more ...

  1.9K     231

create relative date phpcreate relative date phpPHP

Click to see more ...

  1.5K     216

detect ie phpdetect ie phpPHP

Click to see more ...

  1.1K     209

get current url phpget current url phpPHP

Click to see more ...

  721     189

Get real client country using php ?Get real client country using php ?PHP

Click to see more ...

  622     168

get meta tag phpget meta tag phpPHP

Click to see more ...

  547     129

detect speed internet phpdetect speed internet phpPHP

Click to see more ...

  521     106

How can I create an object using php ?How can I create an object using php ?PHP

Click to see more ...

  486     103