Your Ad Here

Posted By

winstonford on 06/22/10


Tagged

domain tld


Versions (?)

Who likes this?

3 people have marked this snippet as a favorite

dantreacy
voove
willbolton


Get tld from domain


 / Published in: PHP
 

  1. <?php
  2. $tld = strrchr ( $_SERVER['SERVER_NAME'], "." );
  3. $tld = substr ( $tld, 1 );
  4. echo $tld;
  5. ?>

Report this snippet  

You need to login to post a comment.