RE: [php_mysql] Retieve the calling domain name in PHP......
- View Source
echo “Welcome to the website”.$_SERVER['HTTP_HOST'];
echo “Welcome to the website”.$_SERVER[' SERVER_NAME'];
Project Manager (Web Development),
I have 20 Domains with me.
All the 20 Domains are pointed to a same single directory on my web space
(Linux), resulting when a user types any URL out of those 20 domain names,
the person is taken to a same php page.
Now, that php page has a headline as "Welcome to the website
www.mywebsite.com" (website name)
The problem is, I want such a php script code, that would retrieve the
particular name of the calling domain and then add that domain name in that
For example I have 4 domains www.123.com, www.abc.com, www.890.com &
www.xyz.com, that means a person typing the url www.123.com will see a home
As "Welcome to the website www.123.com", and if he types www.abc.com, then
the page should be "Welcome to the website www.abc.com", but the php file
remains only ONE.
Thank you very much for any feedback or views in this situation....
[Non-text portions of this message have been removed]