Software Developer. Computer Geek. INTJ.

Month June 2010

Splitting up PHP Mate

I have decided to split up PHP Mate, my “general-purpose” PHP library, into several smaller libraries…


Stores flash messages in the user session and clears automatically when displayed.


PHP functions to make URLs clickable in plain text input.


Generate & check nonces to protect against CSRF attacks.


Base class for holding singleton objects, automatically instantiating them when required.

Detect pipe/file input in a Bash/shell script

How to detect whether input is from keyboard, a file, or another process. Useful for writing a script that can read from standard input, or prompt the user for input if there is none.


General utility functions and Smarty plugins.


Custom subclasses of Zend_Db (database abstraction layer).


Helper functions & Smarty plugins for creating web forms.


Generate the <head> code (title, meta description, etc.) in the application controller/views then display it in the layout.

Download MySQL database from cPanel to development server (shell script)

This is a tiny script I used to download my live site database onto my development server when I used a web host that used cPanel, but didn’t give me access to mysqldump over SSH (because they have Jailshell enabled).



© 2021 Dave James Miller — Powered by WordPress

Theme by Anders NorenUp ↑