Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- function myRandomChars($theLength = 64) {
- $myChars = 'ABCDEFGHLMNOPKRSTUVWXYZ1234567890-*/$^!:;,<>';
- $myId = '';
- $length = strlen($myChars);
- for($i=0; $i<=$theLength; $i++) {
- $myId .= $myChars[rand(0, $length - 1)];
- }
- return $myId;
- }
- echo myRandomChars();
- echo '<br><font face="Tahoma" color="red">' .strlen(myRandomChars()). '</font>';
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement