Ruby on Rails’ ActiveRecord class has some really neat features, none more so perhaps than the incredibly useful find_by_attributes method. With object-oriented PHP programming we can bring that functionality to our PHP applications using PHP’s magic methods. Continue reading Porting Rails’ ActiveRecord find_by_attributes method to PHP
Dynamic DNS services are great. They allow you to keep track of your dynamic IP on your home broadband connection without the need to constantly check it at whatismyip.com or similar websites, and the erradicate the risk of you not knowing the IP address when its changed after you’ve left the house.
That said, some, well… lots of home broadband providers give you crummy routers that do not have the ability to notify Dynamic DNS services of IP changes. The cheapest router that’s optimised for your ISP’s network is usually what you end up with and that usually means less features. Continue reading Keeping Track of Home Broadband IP Address Changes Without Dynamic DNS
I recently uncovered a seemingly undocumented (though reported here and there in forums online) issue with CodeIgniter’s built-in upload library. I’m sure there’s more than one, but the one I encountered was quite annoying…
Basically the core CodeIgniter upload library has a config setting to overwrite existing files of the same name, defaulting to false this forces the newly uploaded filename to have an integer suffix added to it before the file extension, e.g. my_data.csv would become my_data1.csv and so on if the preceding filenames exist. Continue reading CodeIgniter Upload Library – Fixing Filename Iteration Limitations