how do i show site URL automatilcally

Discussion in 'PHP' started by nianain, Jan 31, 2008.

  1. #1
    I have a script that I want to use on several sites. I want it to automagically display the url of that site. I am certain i have seen this before.

    Basically, PHP would detect the url (http://www.mysite.com) and then fix it so that i could reuse in title to say "Hi, Welcome to mysite.com!!"
     
    nianain, Jan 31, 2008 IP
  2. theRedX

    theRedX Peon

    Messages:
    7
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    $_SERVER['SERVER_NAME'];
    Code (markup):
     
    theRedX, Jan 31, 2008 IP
  3. nianain

    nianain Active Member

    Messages:
    402
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    60
    #3
    thank you. that was what i needed
     
    nianain, Jan 31, 2008 IP