aldinokemal

script

Oct 20th, 2020 (edited)
806
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2.  
  3. function randomString($length = 5) {
  4.     $characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
  5.     $charactersLength = strlen($characters);
  6.     $randomString = '';
  7.     for ($i = 0; $i < $length; $i++) {
  8.         $randomString .= $characters[rand(0, $charactersLength - 1)];
  9.     }
  10.     return $randomString;
  11. }
RAW Paste Data