Shaun's
PHP Scripts
[Scripts
Archive Main| Registration Info | Disclaimer
| Contact Me ]
I spend a lot of
my time programming, and when I'm programming for the web, it's usually in PHP.
Here are some scripts that I've decided to share with the public. Almost all of
these PHP scripts are freeware, which means that you can use them, modify them,
and even redistribute them. A few of the scripts - mostly the ones that took a
long time to write - are shareware; those you'll need to register and I retain
full copyright.
PHP Version
Note: I wrote these scripts under the assumption that register_globals is
on (since most of them were written when that was the default). As of PHP 4.20,
register_globals defaults to "Off." This behavior broke just about every
PHP script on the planet, including mine. Until I take the time to rewrite all
of my scripts to use the new superglobal arrays, I've included a quick hack
in each script that should make them continue to function just fine, even if you
have register_globals turned off.
The
Scripts (alphabetically):
| 404Handler | Updated 3/1/2002 | | Don't wait for your visitors to report a broken link. Know
about them as they happen by setting this script to be your ErrorDocument
404 in Apache. You'll receive an email report anytime someone encounters
a 404 error on your site. |
| | Freeware | |
| ANAL | 5/20/2002 | | ANAL stands for "Auto NANAS and LART." If you don't recognize either of those acronyms, this probably isn't a script for you. |
| | Donateware | |
| BatchSubmit | Updated 3/31/2002 | | BatchSubmit is an easy, cheap way to automatically submit large batches of URLs directly to 6 major search engines, Google is now included. Why pay some submission company $50 to submit one URL? Submit thousands of URLs by yourself with this script! |
| | Freeware | |
| Leader | 9/25/00 | Leader lets you send a series of messages to people
via email. The messages are sent incrementally, e.g. your recipients
can receive one email per day, or one a
week, etc. Leader was designed with network marketers in mind, but has an
endless variety of uses. Keep your site or business fresh in your
visitors' minds, or mail out chapters of a book incrementally. All you
do is set up your message templates once; the daily maintenance
(processing mails, adding new recipients) is painless.
Leader has been replaced by Reminder. If you have MySQL, please use Reminder instead of Leader. |
| | Shareware: $10.00 | |
| Network Query Tool | Updated 2/19/2005 | Network Query Tool (NQT) is a one-stop solution for getting
information about a domain or IP address. Instead of manually using
different unix commands or visiting numerous websites to "investigate"
a host, just load Network Query Tool and enter the hostname or IP.
NQT will do the following: reverse lookup, DNS query (dig), whois
(domain owner), whois (IP owner), check port, ping, and traceroute. |
| | Freeware | |
| NukePost | 6/12/2002 | | NukePost will remove a large batch of your posts from Google's groups.google.com Usenet archive. Because Google limits their manual interface to nuking only one post at a time, this script can be a huge timesaver. |
| | Donateware | |
| POPClear | 5/28/2002 | | POPClear is a script that will delete all of the messages in a POP3 mailbox. Deleting is done without downloading or viewing the messages. I wrote this script because the mailbox for my BellSouth.net dialup account, which I keep as a backup in case my cable modem goes down, gets nothing but spam. |
| | Freeware | |
| Reminder | 8/9/2002 | Reminder lets you send a series of messages to people
via email. The messages are sent incrementally, e.g. your recipients
can receive one email per day, or one a
week, etc. Reminder was designed with network marketers in mind, but has an
endless variety of uses. Keep your site or business fresh in your
visitors' minds, or mail out chapters of a book incrementally. All you
do is set up your message templates once; the daily maintenance
(processing mails, adding new recipients) is painless.
Reminder is a replacement for Leader (listed above). Reminder is more powerful than its predecessor. |
| | Shareware ($50) | |
| Simple Hit Counter | 8/1/2000 | | Just as the name says, this is a simple text-based hit counter
script. You add it to your page(s) with a PHP include statement or an SSI
include call; it creates a counter file for each page |
| | Freeware | |
| URLiSt | 9/20/2000 | | URLiSt is a quick-and-dirty hack I wrote to create a list of
all the URLs on an entire website. Just edit one config variable, upload
the script to your document root
and execute it. You'll get a plaintext file which lists the URL to every
single object on your site, recursively from the document root. The unix
"find" command must be enabled on your server
in order for this to work. |
| | Freeware | |
| web2mail2news | 9/10/2000 | This script lets you post messages to Usenet newsgroups. It
sends the message through the dizum.com mail2news
gateway. It is not a newsreader, it only lets
you post. You need to have sendmail installed and
working on your system in order for this script to
function.
New: the script
now generates a random, bogus Message-ID for each post. This is useful for
people who want to post anonymously. If you don't like this feature,
comment out the code that creates the Message-ID. |
| | Freeware | |
I
hope you find these scripts useful. Please respect my copyright. You're welcome
to modify the scripts if you like, but you may not use any of my code in for-profit projects. You must give me credit if you redistribute any of these scripts; linking to this page is sufficient.
Code
Snippets
Here
are a few code snippets you may find useful in your own scripts:
| Calculate Elapsed Time | 2/10/2001 | | Want to calculate the elapsed time between two points? Here's an example of using the mktime() function along with Unix Epoch timestamps to do time math. This particular implementation can be useful in determining the runtime of a particular script. |
| | Freeware | |
| Send mail with PHP | 5/2/2000 | | mail() is one of the most useful functions provided by PHP. Unfortunately, it can take awhile to figure out how to use it properly; especially the "extra headers" parameter. This script shows you how to set up and send an email using PHP. |
| | Freeware | |
Miscellaneous
Notes about PHP
Various
personal musings, tests, and comments about PHP:
| Benchmarking Heredoc Notation | 8/2/2002 | | I did some simple benchmarking to determine whether or not heredoc notation is faster than using multiple echo statements. The verdict is in! |
| | Freeware | |
Disclaimer
I
figured I ought to put this here as the standard CYA move. I wrote these scripts
for me, and they work for me. I don't guarantee that they'll work for you. If
they don't work, or if your server blows up as a result of using them, that's
life: I'm not responsible. I've tried to make the scripts as resource-friendly
as possible so they should all work OK in a shared/virtual hosting environment.
Contact
Me
I'm
always accepting bug reports and large cash donations. (Punch this button to buy me a beer.) If you want to get in touch
with me, use the email link at the bottom of this page. You're also welcome
to see what else I'm up to by peeking at shat.net.
|
|