Sample Code

Generate Sitemap for Google and other Search Engines using PHP

Google has a Sitemap generator written using Python. Python is a great language, but I prefer PHP. I took the basic idea of the Sitemap generator and converted it into a solution more suitable for my application needs. If you are looking for a way to easily create a Sitemap for submitting to Google and other search engines, you have come to the right place. I call this one cron_gen_sm.php.

Read More

Send Email for HTTP Error Codes 401, 403, 404, 500 using Perl CGI-bin

Ever wondered how long one of your websites has been down, but you didn't check your error_log file? There is an easy way to be alerted when there is an error on your website, such as 404 Not Found, 500 Internal Server Error, and others. I have made a simple CGI script using Perl that sends an email to the webmaster saying what page caused the error, what the error code is, and what the visitor's IP address is. I call it

Read More

View All ->