Shiv Deepak
Shiv Deepak

Reputation: 3126

How to find the domain name on which the website is hosted

I am searching for the exact counter $_SERVER['PHP_SELF']; which could let me know on which domain name the site is getting visited. For portability reason i cannot use hard coded domain names.

Upvotes: 1

Views: 79

Answers (1)

Ignacio Vazquez-Abrams
Ignacio Vazquez-Abrams

Reputation: 799250

$_SERVER['HTTP_HOST']

Upvotes: 4

Related Questions