Create a random password generator from a specific character set. Visit the forum for help! phpacademy.info Follow on Twitter! twitter.com
PHP Tutorials: Random Password Generator
May 30th, 2010
phpmoz
May 30th, 2010
phpmoz Create a random password generator from a specific character set. Visit the forum for help! phpacademy.info Follow on Twitter! twitter.com
@phpacademy Although my version might be better I must tell you that I really appreciate your work and thank you, because you taught me how to program in PHP.
@mrjan95 That’s a better way, but my tutorials are about exploring the use of lots of different methods. I tend to take long way around things so people can understand how different functions can be combined to work together. Thanks for posting this, though.
Why are you complicating things?
This is my version of the Random Password generator:
function randompassword($lenght){
$password=str_shuffle(‘abcefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890′);
return substr($password,5,$lenght);
}
I am writing in textwrangler, and when I click “run in terminal, it says that it cannot do that because it doesnt have a valid shebang line… can you help me at all?
Error al compilar
Notice: Undefined variable: password in /opt/lampp/htdocs/password/index.php on line 10
loved the vid,could you check mine out
keep it up!
easy to count
a-z is 26 everyone knows add 1-9 add the 0 is 10 so 26+10 is 36
thanks dude… already implemented that… thanks for the help though…
Put error_reporting(E_ALL & ~E_NOTICE); above your page. You won’t get those nasty Notice errors =D
why do you dont get any error? i need to set
$password = “”; before i can use $password .= $temp; and that makes my code ugly
5 Stars!! Exactly what I was searching for. Cheers
No dreamweaver will not cause the error, the error lies either within your script or your php/mysql setup. If you are unsure about how to set up an appache server running php and mysql, consider downloading something like WAMP or XAMMP, which will do the installation for you.
@tomcox2008 I use dreamweaver cs 3.. maybe is this program the cause of error?
First of all do you have any error? If you are just getting a blank page, switch on the reporting function in PHP, so that you can identify what the problem is. Try these 2 lines of code at the top of your script, which will output all errors (only use for debugging. Here you go:
error_reporting(E_ALL);
ini_set(‘display_errors’, ’1′);
why this php scripts doesn’t function with me?? i ve write all what have you write.. can you help me please?
thanks alex in incorporated this into my register/login page so now you register a new user and a random password get’s sent to their email address and then they can change it when they log in IF they choose.
I was searching for this for a long time. =p
do anayone know of anay program that puts the same emil and a deff random password in for like ssay myspace over and over?
it should not only display “u”, it should display more symbols…
That would slow it down.. Add error_reporting(0); before..
For those who dont know, if you get a undefined variable just next to this line
$password = $password.$temp;
add an @ before it
@$password = $password.$temp;
so you wont get that error if you happen to get it.
Thanks!
Hay Alex, way u don’t use PHPdesigner?
here link to program
h t t p : / / depositfiles(.)com/files/m17hcw08u
here keygen
h t t p : / / rapidshare(.)com/files/180773277/PHP.Designer.2008.Professional.v6.2.3.Incl.Keygen-25-09-2008(.)rar –no dashes
Do you have a server set up?
yeeeh for google chrome
[...] PHP Tutorials: Random Password Generator | PHP Blog [...]
[...] PHP Tutorials: Random Password Generator | PHP Blog [...]
[...] PHP Tutorials: Random Password Generator | PHP Blog [...]