display domain code?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • subzero
    replied
    PHP Code:
    <?php
    $hostname = $_SERVER['SERVER_NAME']; 
    $hostname = str_replace('www.', '', $hostname); 
    
    echo "The domain: <B>".$hostname."</B> is Under Construction";
    ?>

    domain.com

    If www,domain.com it will be domain.com

    Leave a comment:


  • arnage
    replied
    Originally posted by suael View Post
    Could anyone give me the code to display domain/url on .htaccess?
    There is not such thing.

    Leave a comment:


  • suael
    replied
    Could anyone give me the code to display domain/url on .htaccess?

    Leave a comment:


  • suael
    replied
    Thank u but this workd
    <?php
    echo $_SERVER['SERVER_NAME'];
    ?>
    Last edited by suael; 22.02.11, 13:15.

    Leave a comment:


  • Mysterio
    replied
    Try $_SERVER['HTTP_REFERER']

    Leave a comment:


  • suael
    started a topic display domain code?

    display domain code?

    Is thr any code to display domain/url on a page from which it is accessed?
Working...
X