Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /***
- * Created by Adil && Dominic (Myrax)
- * Used to generate a random SSO ticket
- * @author 'Adil'
- * October 16th 2011
- */
- function adilsRandomString() {//calls the function
- $alphanumerics = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';//declares our chars and ints
- $result = 'user';//username here
- for ($x = 0; $x < 32; $x++) {//keeping the character length to 32, change the 32 to vary lengths
- $result .= $alphanumerics [mt_rand(0, strlen($alphanumerics))];//$result+string
- }
- return $result;//returns the result, without this, we won't recieve the result
- }
- echo adilsRandomString();//shows the SSO ticket
- ?>
Advertisement
Add Comment
Please, Sign In to add comment