Using .htaccess 












Using .htaccess/.htpasswd Password Protection 


php5
php5
Coding Tips 






Uploads and Downloads 

php5
php5
php5
Mail 



php5


Working with Images 


Frequently Requested Website Functionality 
php5
php5

php5 see it on this page
php5








Using PHP 
php5
php5
php5


Website Managment 







php5

php5
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? Doing a simple website ping on port 80 will not answer all these questions. Using this script will.
<?php
/*
This script is used to validate that all of the websites in a list are operational.
It actually reads the contents of a file on each website.
This ensures the domain name is pointing where it should, the site is up, and at least one file is intact.
It can help identify unauthorized DNS changes, server outages, or global file issues.
It must be run from a server where none of the sites are located, or the DNS test will not be valid. << IMPORTANT POINT
The script assumes that each site has a file named site_test.txt at the document root.
That file must contain the text "Test File" (no quotes or line break).
The only alteration to the script should be the $filename variable, which has the location of the domain name file.
The domain name file is a text file with the domain names listed (i.e. example.com) one per line.
The domain name file can be located on any server (you can use a url location).
The output of the script will list the domain names in green (OK) or red (problem).
This script will not identify the specific problem with a domain, only that there is a problem.
*/
$domainNamesFile = "domain_names.txt";
$testString = "Test File";
$siteArray = preg_replace("#\r\n?|\n#","",file($domainNamesFile));
echo "<span style='font-weight: bold;'>Domain Validation</span><br>";
foreach ($siteArray as $domain) {
if (@file_get_contents("http://" . $domain . "/site_test.txt") == $testString)
echo "<span style='color: green;'>$domain</span><br>";
else
echo "<span style='color: red;'>$domain</span><br>";
}
echo "<span style='font-weight: bold;'>Done.</span>";
?>