Home | Random Cat Page | PHP Related | Share-ation

Greetings! Here are some of some my hand-written PHP scripts (among other things) for various purposes, each listed. If you use these, please don't claim ownership of them. Things like that are made of lose and fail.

I am not (yet) a professional programmer, and I'm sure that my scripts reflect the amature level of my programming abilities. If you find any problem with them, feel free to email me at webmaster -at- lawlinternet -dot- com. Additionally, I provide no guarantee that these scripts will not mess your files/folders/servers up, so please, use them at your own risk.

Please note that each of these are in a text format so you can copy/paste the code right into yours. Enjoy!

Scripts

DomLogScan This script is intended for use on a linux-based server in conjunction with combined Apache logs. It is ran via the command-line. It takes one argument, which is the full path and filename of the log file to scan through. This script goes through the file, pulls out any IPs that it finds, and tallies up how often it sees them, plus some additional stats. Can be useful to see if a site is under attack.
IPScan This script is intended for use on a linux-based server. It should be run via command-line. It runs through a netstat and counts the number of times it sees any IP found in the netstat return.
IMAPTest This script can be ran on any server. It attempts a connection with a server via IMAP based on some configuration values set within the script. Can be useful for testing IMAP connectivity to a server.
POPTest This script does the same as IMAPTest, just using POP.
IPTest This script was written based on an example given at php.net so I could easily find whether an IP input by a user is valid. The end result of $fail is whether or not this IP would be valid.
MySQL Backup This script is intended for a cPanel server (although I suppose it could work with any server that has MySQL). Based on the configuration values in the script, this script will dump, archive and allow you to download a database from the a server. Also allows you to remove the backup file when done!

Instructions

FFMPeg This is a guide on how to install ffmpeg, ffmpeg-php, LAME, MEncoder/MPlayer, etc etc needed for a YouTube-ish clone site.