Webmaster Tools
Webmaster Tools gives you a selection of utilities to help in designing your website. Tools include CSS color and font selection, drop down menu creation, code validation, meta-tag help, table creation, optimizers and simple encryption.
Click Here to access all of our online Webmaster Tools!
PHP Programming Tips
error_reporting(E_ALL ^ E_STRICT);
error_reporting(0);
if($varA == $varB){$valid = true;}else{$valid = false;}
$valid = ($varA == $varB ? true : false);
function generate_passwd($length = 16){
static $chars = 'abcdefghjkmnpqrstuvwxyzABCDEFGHJKLMNOPQRSTUVWXYZ23456789';
$chars_len = strlen($chars);
for ($i = 0; $i < $length; $i++)
$password .= $chars[mt_rand(0, $chars_len - 1)];
return $password;
}
list($year, $month, $day) = split("-", $date);
$date = date('M d, Y', mktime(0, 0, 0, $month, $day, $year));
$str = preg_replace('{(.)\1+}','$1',$str);
$str = preg_replace('.*.*<\W*\/a\W*>', '[LINK REMOVED], $str');
Bad Example
if($_POST['username'] == 'rob' && $_POST['password'] == 'foo'){
$authenticated = true;
}
$authenticated = false;
if($_POST['username'] == 'rob' && $_POST['password'] == 'foo'){
$authenticated = true;
$salt = 'thequickbrownfox';
$password 'foobar123';
$salted_hash = md5($salt . $password);
sleep($ss); // $ss = number of seconds to wait