Nov 6th

1

Resume HTTP downloads in PHP using cURL or fsockopen

comment 1 Comment
PHPcURLHTTP

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.

Read the rest of this entry »

Oct 27th

3

Relative time in PHP with flexible detail level

comment 3 Comments
PHPRelaive time

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.

Read the rest of this entry »

Oct 26th

3

Domain name WHOIS query using PHP

comment 3 Comments
PHPWHOIS

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.

Read the rest of this entry »

Oct 20th

0

Javascript and CSS compression using YUI compressor, PHP and gzip

comment No Comments
JavascriptPHPYUI compressor

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.

Read the rest of this entry »

Oct 14th

0

AES wrapper class with pure php and MCrypt extension support

comment No Comments
PHPMCrypt

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.

Read the rest of this entry »

Oct 13th

0

cURL wrapper class with executable and PHP extension support

comment No Comments
PHPcURL

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.

Read the rest of this entry »

Oct 12th

0

Amazing Tree javascript library

comment No Comments
JavascriptAmazing Tree

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.

Read the rest of this entry »

Oct 4th

0

Frame Glider javascript library

comment No Comments
JavascriptFrame Glider

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.

Read the rest of this entry »