<?xml version="1.0" encoding="UTF-8"?>
<feed xml:lang="en-US" xmlns="http://www.w3.org/2005/Atom">
  <id>tag:refactormycode.com,2007:users214</id>
  <link type="application/atom+xml" href="http://refactormycode.com/users/214" rel="self"/>
  <title>jmut</title>
  <updated>Wed Oct 17 15:45:06 +0000 2007</updated>
  <entry>
    <id>tag:refactormycode.com,2007:Refactor453</id>
    <published>2007-10-17T15:45:06+00:00</published>
    <title>[PHP] On Random password</title>
    <content type="html">&lt;p&gt;Seems this is limited to 62 char long password. I will just add more randomness in it :)&lt;/p&gt;

&lt;pre&gt;function random_password($length = 6)
{
	$characters = array_merge(range('a', 'z'), range('A', 'Z'), range(0, 9));
        srand((float)microtime() * 1000000);
	shuffle($characters);
	return implode('', array_slice($characters, 0, $length));
}

echo random_password();
&lt;/pre&gt;</content>
    <author>
      <name>jmut</name>
      <email>jmut@drun.net</email>
    </author>
    <link type="text/html" href="http://refactormycode.com/codes/90-random-password/refactors/453" rel="alternate"/>
  </entry>
</feed>
