<?php
 
// Random case-sensitive password
 // Copyright (C) 2007  somethief.net team
 // You are free to edit/share/use this source.
 // You are NOT allowed to sell this source in any case!
 // For any other uses please contact somethief@somethief.net

 // Characters to include
 
$char '0aAbBcC1dDeEfFg2GhHIi3JjKkL4lMmNn5oOpP6qQrR7sStTu8UvVwWX9xzZ';
 
// Length of password to generate
 
$len 6;
 
 
// Dont edit anything below unless you know what you are doing :)
 // (You edit it anyway so i commented it ^^ )
 // Unset $pass (Cuz the following cmd appends text in it)
 
unset($pass);
 
// Get the range where we can pick up numbers ( 0 - $len1 ) - Lenght of $char
 
$len1 strlen($char);
 
// A for loop - for (command to execute when entering loop (a.k.a. only once); Continue untill FALSE; command to execute after each loop)
 
for ($i=0;$i<$len;$i++) {
  
// Append a random character from $char to $pass
  
$pass .= $char[rand(0,$len1)];
 }
 echo 
$pass;
?>