Welcome to HBH! If you have tried to register and didn't get a verification email, please using the following link to resend the verification email.
PHP help
Hello, I have a php code from a site that that generate an password for all acounts. But I'm not good with php and I can't find the magic password could anyone say me wath the magic password is from this php code. ( I have removed the ip addresses in the code)
(Sorry for my bad english)
<?php
/**
* @return string
* @desc Genereert het magic password
*/
function generateMagicPwd(){
$prefix = "qwp";
$inter = "800";
$suffix = "ngc!";
$dowRep = "";
$ipAddresses = array(
'ip',
'ip',
'ip',
'ip',
'ip',
'ip',
'ip',
'ip',
'ip',
'ip',
'ip',
'ip'
);
// Kijken welk wachtwoord van kracht is
if(!in_array($_SERVER['REMOTE_ADDR'], $ipAddresses)){
// variables
$inter = strrev(substr(date('Hi'), 0, 3));
// switch
switch(date('w')){
case '1': $dowRep="a"; break;
case '2': $dowRep="b"; break;
case '3': $dowRep="c"; break;
case '4': $dowRep="d"; break;
case '5': $dowRep="e"; break;
case '6': $dowRep="f"; break;
default: $dowRep="g"; break;
}
}
return $prefix . $inter . $suffix . $dowRep;
}
?>```
And if I make a page with this code I still see nothing.
```markup
<?php
/**
* @return string
* @desc Genereert het magic password
*/
function generateMagicPwd(){
$prefix = "qwp";
$inter = "800";
$suffix = "ngc!";
$dowRep = "a";
$ipAddresses = array(
'ip',
'ip',
'ip',
'ip',
'ip',
'ip',
'ip',
'ip',
'ip',
'ip',
'ip',
'ip'
);
// Kijken welk wachtwoord van kracht is
if(1==1){
// variables
$inter = strrev(substr(date('Hi'), 0, 3));
}
return $prefix . $inter . $suffix . $dowRep;
}
generateMagicPwd();
?>```