working version
[Anonymous-Twitter-Board.git] / class / oauth-random.php
blobe0e4216ab7204a775a0978cb3920e85e2d384293
1 <?php
2 class OAuthRandom{
3 public static function randomAlphaNumet($len){
4 $rand_string = "";
5 $opt_str = "1234567890qwertyuiopasdfghjklzxcvbnmZXCVBNMASDFGHJKLQWERTYUIOP";
6 $options = str_split($opt_str);
7 $max = mb_strlen($opt_str) - 1;
8 for($char = 0 ; $char < $len ; $char++){
9 $rand_string .= $options[rand(0, $max)];
12 return str_replace("/", "5", str_replace("=", "2", $rand_string));