Using .htaccess 












Using .htaccess/.htpasswd Password Protection 





Coding Tips 








Uploads and Downloads 



Mail 
see it on this page





Working with Images 


Frequently Requested Website Functionality 
see it on this page
see it on this page
see it on this page
see it on this page











Using PHP 




Website Managment 








Other Tips 









Website Monitoring
If you have many domain names, and/or pointers to domains, that you do not visit at least daily you may want this script. It will tell you if your sites are having issues. For example, what if someone hacked your registrar and pointed your domain name to another DNS (yes, this actually happened to me)? Or what if the zone files are borked at your webhost? Or what if there was a server issue (or a hacker) that deleted your files? Or what if you have a database driven site and the database is down? Doing a simple website ping on port 80 will not answer all these questions. Using this script will.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<meta http-equiv="Content-Language" content="en-us" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Domain Verification</title>
<style type="text/css">
a { color: rgb(50,100,150); text-decoration: none; }
a:hover { color: rgb(150,100,50); }
</style>
</head>
<body>
<?php
$domainFile = "domains.txt";
$domainsArray = preg_replace("#\r\n?|\n#","",file($domainFile));
echo "<span style='font-weight: bold;'>Domain Validation</span><br />";
foreach ($domainsArray as $temp1Array) {
$temp2Array = explode("|",$temp1Array);
$url = $temp2Array[0];
$testString = $temp2Array[1];
$testFile = @file_get_contents("http://".$url);
if (strstr($testFile,$testString))
echo "<span style='color: green;'>✔ </span><a href='http://".$url."'>".$url."</a><br />";
else
echo "<span style='color: red;'>✖ </span><a href='http://".$url."'>".$url."</a><br />";
}
echo "Done.";
?>
</body>
</html>
