Default TemplateGreen TemplateBlue TemplateRed TemplateGold TemplateBlue Gloss Template
Article Categories

Mycities Network
PHP Scripts Examples and Tutorials
Check the domain extension using PHP

Monday Feb 04, 2008
This function will help you to get the domain extension, simply pass the domain name and it will print the domain extension

<?
function DomainExtension($domainname){
 list($domain,$extention,$nextext) = explode(".",$domainname);
 if ($nextext) {
  $dext = $extention . "." . $nextext;
 }else{
  $dext = $extention;
 }
 return $dext;
}

print DomainExtension("mulpituwa.com");

?>

Author: Safras Ahamed



Comments : What do you think about this news?
No Comments yet.

POST COMMENT
Name
Message
  Post will be visible after admins approval
 

About Maldives Resorts

Members Login
User ID
Password
    Register
Forgot password?

SriLankaWebHosting.com
Just for (Rs.500) $5 per month

Your own domain name, 1GB Space, Unlimited Email Address, Sri Lankan Support & for more info call us.
077-989-5368, 072-829-9077



Terms And Conditions | Link Directory

Join Sri Lanka Banner Exchange | Resources - Free Link Exchange