Archive for March 27th, 2009
Server Ping Script v1.2
by z3n on Mar.27, 2009, under Coding
Problem:
How know if a server is up and if each of it’s needed services (httpd, mysql, ftp etc) are working?
Solution:
A php script that check the ports you want and report it back to you by email when the server is down and when it gets backup.
This is a new version of my old ping script, it’s been tunned and now allows you to warn multiple emails when something goes wrong. It also fixes the issue with port flood (when there’s too little servers to check)
Please note that you are supposed to run this on a stable server with a good connection, otherwise it will generate useless status. If you insist in running it on your home connection, give a tune up on the variables by raising the timeout values.
Batch Getting Movie File Information (PHP + MySQL + FFMpeg)
by z3n on Mar.27, 2009, under Coding
Problem:
Sorting movies is a really boring process, specially when you can’t get their sizes (height x width) and length automatically.
Solution:
A php script that gets movies sizes, length, filesize, name, adds it to a mysql table for futher processing.
* You will need FFmpeg on your %PATH%
* Check source to know how to make a compatible table
Usage: mi.php <folder> [recursive 0|1]
(recursive folders is enabled by default)