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
 
Members Login
User ID
Password
    Register
Forgot password?

Sri Lanka Toolbar
Listen to live Sri Lanka Radio, Watch Sri Lanka TV, Search Sri Lanka, Search Google, Sri Lanka New
Download Sri Lanka Toolbar FREE



Terms And Conditions | Link Directory

Join Sri Lanka Banner Exchange | Resources - Free Link Exchange