WILDAN_IZZUDIN

RANDOM TEXT AND NUMBER (LIKE YOUTUBE)

Mar 14th, 2018
171
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2. function acakadut($jumlah) {  
  3.     $str = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890abcdefghijklmnopqrstuvwxyz';  
  4.     $strs = '';  
  5. for($i = 0; $i < $jumlah; $i++) {  
  6.       $pos = rand(0, strlen($str)-1);  
  7.       $strs .= $str{$pos};  
  8. }  
  9.   return $strs;
  10. }  
  11. echo(acakadut(8));
  12. ?>
RAW Paste Data