Using special, regular expression characters in regular expressions require you to escape them in the regular expression pattern. I had an issue with dynamically getting an array of URLs from HREF attribute from links using PHP preg_match_all and then wanted to replace this array of URLs dynamically in a loop again with their Bit.ly links [...]
Continue reading...Tuesday, June 1, 2010
All WordPress plugin developers, you can integrate a security captcha image into your own WordPress plugin using the Really Simple Captcha plugin. It is a plugin in itself but it serves as an API and doesn’t have any purpose on its own without other plugins using it. This is an example of how to use [...]
Continue reading...Wednesday, October 1, 2008
On a production site, you would most likely want to hide all possible PHP errors, warnings and notices from your users for both usability, presentational and security purposes.
Continue reading...Wednesday, August 6, 2008
I recently integrated a blog and documentation base into the Tribulant.com website and noticed after a few days that my WordPress.com stats stopped working completely after switching the theme.
Continue reading...Tuesday, August 5, 2008
Have you ever received a fatal error on your server similar to the one below when you tried to execute a script? The fatal error shown below, indicates that your PHP configuration has a memory limit set and the script which you are executing is trying to allocate more memory than what is available for [...]
Continue reading...Tuesday, June 17, 2008
You might need to calculate the date difference in days using PHP. You can easily calculate the days difference by using something like the code below.
Continue reading...Tuesday, May 6, 2008
I wrote a quick and simple function which allows you to quickly convert arrays to objects. It allows you to change an array like this :
Continue reading...Saturday, April 26, 2008
Using PHP, you might need to strip the path from a URL, leaving behind just the filename at the end of the URL. You can achieve this with a regular expression pattern of course, but I have a much simpler solution. See the example code below.
Continue reading...Thursday, April 17, 2008
With the CakePHP FormHelper, you can output a set or a list of radio button widgets.
Continue reading...Thursday, February 28, 2008
Due to the way that CakePHP rewrites URL requests with its router, it might seem confusing to execute a Crontab to run a controller action. I will show you how to set up a cron dispatcher so that you can execute all your different controller action schedules on a single file and pass the controller [...]
Continue reading...
Thursday, January 19, 2012
0 Comments