note 51943 deleted from function.rand by felipe

[email protected]
Newsgroups php.notes
Message-ID <[email protected]>
Note Submitter: goochivasquez -at- gmail 

----

Following script generates a random key of characters and numbers. Handy for random logins or verifications.

***
// RANDOM KEY PARAMETERS
$keychars = "abcdefghijklmnopqrstuvwxyz0123456789";
$length = 40;

// RANDOM KEY GENERATOR
$randkey = "";
for ($i=0;$i<$length;$i++)
  $randkey .= substr($keychars, rand(1, strlen($keychars) ), 1);
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.