RE: [php_mysql] Retieve the calling domain name in PHP......

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi
 
Try this
 
echo "Welcome to the website".$_SERVER['HTTP_HOST'];
 
or
 
                echo "Welcome to the website".$_SERVER[' SERVER_NAME'];
 
 
 
Thanks,
Muthukumar Selvarasu,
Project Manager (Web Development),
Webmasters Ltd.
 
 
From: php_mysql@xxxxxxxxxxxxxxx [mailto:php_mysql@xxxxxxxxxxxxxxx] On Behalf
Of Hitesh
Sent: Monday, March 31, 2008 8:26 PM
To: php-list@xxxxxxxxxxxxxxx
Cc: php-objects@xxxxxxxxxxxxxxx; php4india@xxxxxxxxxxxxxxx;
PHP_MySQL_usergroup@xxxxxxxxxxxxxxx; php_mysql@xxxxxxxxxxxxxxx;
phpug-ph@xxxxxxxxxxxxxxx; phpresource@xxxxxxxxxxxxxxx;
web_page_programming@xxxxxxxxxxxxxxx
Subject: [php_mysql] Retieve the calling domain name in PHP......
 
Friends,

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
line.

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
page

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]
 


[Non-text portions of this message have been removed]


[Index of Archives]     [PHP Home]     [PHP Users]     [PHP Soap]     [Kernel Newbies]     [Yosemite]     [Yosemite Campsites]

  Powered by Linux