Results 1 to 3 of 3

Thread: [RESOLVED] Identify Domain best way?

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Mar 2009
    Posts
    156

    Resolved [RESOLVED] Identify Domain best way?

    Can i use PHP to identify the domain of the site the page is currently on?

    What would I use?

  2. #2
    PowerPoster
    Join Date
    Sep 2003
    Location
    Edmonton, AB, Canada
    Posts
    2,629

    Re: Identify Domain best way?

    yes. you can use $_SERVER['HTTP_HOST'] to determine the domain. this will either be "domain.com" or "www.domain.com" or "subdomain.domain.com" (depending on which request you sent using the browser).

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Mar 2009
    Posts
    156

    Re: Identify Domain best way?

    Thanks It works quite well.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width