Archive for October, 2009

Oct 27th

3

Relative time in PHP with flexible detail level

7 years 7 months ago comment 3 Comments

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.

(more…)

Oct 26th

3

Domain name WHOIS query using PHP

7 years 7 months ago comment 3 Comments

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.

(more…)

Oct 20th

0

Javascript and CSS compression using YUI compressor, PHP and gzip

7 years 7 months ago comment No Comments

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.

(more…)

Oct 14th

0

AES wrapper class with pure php and MCrypt extension support

7 years 8 months ago comment No Comments

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.

(more…)

Oct 13th

0

cURL wrapper class with executable and PHP extension support

7 years 8 months ago comment No Comments

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.

(more…)

Oct 12th

0

Amazing Tree javascript library

7 years 8 months ago comment No Comments

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.

(more…)

Oct 4th

0

Frame Glider javascript library

7 years 8 months ago comment No Comments

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.

(more…)