10
2011
The PHP Time Ago Function
It’s often handy to refer to Gmail’s “00:00 (4 minutes ago)” example as an additional feature of usability for web users. By creating an effective time-ago function using PHP, we can effectively format most MySQL dates, datetime, and timestamp entries into an easier to read and comprehend “Sometime ago” outputs. Besides, who really wants to have to read a date anymore?! Accepted MySQL Dates As MySQL is capable of storing dates and datetimes in a […]
4
2011
Setting up a localhost PHP development environment
Before getting too far into posting tips and tricks for some of the more advanced functions and operations that can be completed using PHP, I thought it may be helpful to provide a bit of instruction on how to set up a simple, quick, easy localhost development environment for testing. Preliminary disclosure: I am a Macintosh user, so instructions provided for setup on Windows are from third parties! Using Macintosh: For this setup, we’ll be using […]
Recent Snippets
- htaccess : Only allow access to specific wordpress upload types if logged in
- MySQL : Query WordPress Database for Invalid Media Filenames
- PHP : Get Actual IP Address with PHP
- JavaScript : Allow Tab in Textarea
- PHP : Clean sanitized database contents on output
- htaccess : Force www. prefix in URIs
- PHP : Force File Download with Correct Content Type
- Wordpress : Disable upgrade notification