My Blog
contains PHP, Web and business/entrepreneurial related content. Please join in the conversation!
Category Archives: PHP
How to Quickly Mask a Credit Card Number
So, often I have to show a masked credit card on the screen. However, I really want to go the extra mile and show the user a secure, fully masked credit card number that still reflects their original card. For … Continue reading
Setting PHP Command Line Colors
I’m not entirely certain why this escaped me for so long, but it’s remarkably easy to set terminal colors with PHP. Simply echo the escape/color character \033, followed by the bash color definition and your output. For reference, here is … Continue reading
Want to come work with me? Let’s do some PHP!
Do you like to be challenged, learn new things, and have a supportive team? Well, let’s chat a bit. I’m building a team and I’m looking for great PHP developers to join it. What would I be doing? You would … Continue reading
PHP Doc for non declared properties in your class
You may find while working with projects like Zend Framework that you have a number of publicly available properties of your classes that are not defined and documented. They might be part of a getter/setter magic method or just purely … Continue reading
Excel won't handle UTF-8 in CSV? Force a different encoding in PHP
When generating a CSV file with PHP in the UTF-8 encoding, Microsoft Excel freaks out. It just doesn’t show the proper encoding. Thank you Microsoft! However, I did find a way to handle this encoding and make it compatible for … Continue reading
Object Cache Class in PHP
While I’m infinitely happy that all uses of a class in PHP now are references, that’s just not good enough. Sometimes I want to use my newly created object in many different methods. I have two options. First, I could … Continue reading
Easiest Form Token class to prevent CSRF
So, if you’re not familiar with CSRF, check out this blog post about AJAX Security. Some of the steps talking about Cross Site Request Forgeries will help you understand the problem. I’ve been using a very simple system with my … Continue reading
Modifying Clickheat to use your authentication
A nice free open source alternative to Crazy Egg is ClickHeat. One of my clients wanted this implemented but didn’t want to have to log in again using different criteria. I looked at the code and saw it was surprisingly … Continue reading
How I test email recipients when I develop
When developing an application, there are usually various different environments that you run the code in. First is the development environment. Next, you have the QA or test environment, staging, and then live or production. It stands to reason that … Continue reading
Easy MCrypt encryption class
For whatever reason, I can never remember the exact coding of MCrypt. And maybe that is a good thing – so I stop doing so much code duplication and start using a class I wrote. For this reason, I’ll save … Continue reading
