This is my place for little scripts I've written and want to share with the world.
Error-page script. Returns a custom error page for various server error codes as 404 and 500 as well as some slightly less-common ones like 400, 401, 403, and 505. In the case of 404 and 500 errors ("not found" and "server error" respectively), it will email the webmaster (according to the configured address) to report the error. In addition, it reports the remote address of the viewer as well as the http referer (the page with the link s/he clicked on to get to the error-producing page).
The package consists of two files: error.php and README.txt.
README error.zip error.tar.gzAll scripts are released under the GPL. This basically means that you can use, modify, and distribute them, as long as you distribute the source code along with any binaries. (Not an issue with PHP. <g>)
However, if you like my scripts, and especially if you use them, I would very much appreciate an email to say so. Please give me the URL of your site. Maybe I'll link to sites that are using my scripts.
I am distributing scripts in both .zip and .tar.gz format, to accommodate both Windows and 'nix users. The .zip files use the Windows line break, and the .tar.gz use the 'nix one. This means that if 'nix users select the .zip file, they will have to remove those ugly ^M's at the end of each line, and if Windows users get the .tar.gz version, the whole PHP file will be on one line.
The PHP code in my scripts uses neither registered globals nor short open tags. Therefore, there should be no compatibility problems.
I have left the markup in my scripts intentionally plain, in order to allow users their own customization. As it stands, the scripts need only a doctype declaration in order to validate as XHTML 1.0 Strict; they should thus validate as any other doctype (except XHTML 2.0). This is one of my pet peeves; I hate modifying someone else's code to make a page validate. (I did not include a doctype because I don't want to impose mine on anyone else.) It's also annoying to make a script look the way I want, so I made them as simple to customize as I could.