Entries from March 2010 ↓

Mootools iTunes like image flip gallery

This iTunes image flip gallery script utilizes Mootools v1.2. A direct link to the script

It's great to see the internet move away from flash more and more everyday.

Strip HTTP:// www. and/or suffixes from URL with PHP

This code shows how to strip http, www, or any suffixes. The most efficient way is to toss an array at str_replace. If anyone write this will all the suffixes please post in comments!

function remove_http($url){
$remove = array('http://','https://','www.','.com','.org','.net','.co.uk','.name','.info','.cc','.biz','.us','.gb','.tt');
$stripedUrl = str_replace($remove, '', $url);
return strtolower($stripedUrl);
}

Example:

<? echo remove_http("http://www.DesignCodeExecute.com") ?>

Result:

designcodeexecute