This post describes a method to download a file using a PHP script and resume the download if the previous download was interrupted. The code here could be used while downloading a new version of a PHP application from the application author’s website. Two implementation examples are provided – one using cURL and another using fsockopen.
Oct 27th
Relative time in PHP with flexible detail level
This post describes how you can display relative or nicer time values like 10 days, 4 hours and 6 minutes ago instead of a date like 26 October, 2009 6:45 PM. The function is flexible enough to take a parameter for the details level you desire – for example, in the above example, the detail level was 3. So, it displays days, hours and minutes. If it was 4, it would have displayed seconds too. If we were using an older date, detail level of 3 might have displayed years, months and weeks.
Oct 26th
Domain name WHOIS query using PHP
This post is about a PHP class which allows you to check if a domain name is available or not using WHOIS servers. The class simply opens a socket connection to the WHOIS server and passes the domain name to check for. Based on the available string you provide, it checks if the domain name is available or not.
Oct 20th
Javascript and CSS compression using YUI compressor, PHP and gzip
It is well known that visitors to your site will not wait for a long time for your page to load. This post will show you how to optimize your pages by reducing the number and size of javascript and CSS files.
Oct 14th
AES wrapper class with pure php and MCrypt extension support
The code below is a wrapper class around the AES-128 implementation at http://www.phpclasses.org/browse/package/3650.html and the MCrypt extension. It use the MCrypt extension if it is enabled and use the pure PHP AES-128 class otherwise.
Oct 13th
cURL wrapper class with executable and PHP extension support
Most cURL wrapper classes I found could handle either the PHP extension or the command line executable version of cURL. I needed a class where I could set one variable and have it switch from using the PHP cURL extension to the cURL executable without having to change the other variable of the class.
Oct 12th
Amazing Tree javascript library
Some time back, I required a drag and drop tree implemented in javascript where you could rearrange nodes by dragging them around the tree. I decided to make a post and release it. Its called Amazing Tree. The code is available for download from the projects page.
Oct 4th
Frame Glider javascript library
I had written a javascript library Frame Glider some time back which allows you to drag and drop page elements across frames or iframes within a browser window. The code is now available for download from the projects page.