Re: Retieve the calling domain name in PHP......

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

 



Hi,

Use $_SERVER['HTTP_HOST']. Much more info, that can be used, is available 
in phpinfo(). 

echo '<h1> Welcome to '.$_SERVER['HTTP_HOST'].'!</h1>';1

Regards,
Manda Krishna Srikanth
http://www.krishnasrikanth.com

php-objects@xxxxxxxxxxxxxxx wrote on 03/31/2008 01:56:04 PM:

> 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]
=====-----=====-----=====
Notice: The information contained in this e-mail
message and/or attachments to it may contain 
confidential or privileged information. If you are 
not the intended recipient, any dissemination, use, 
review, distribution, printing or copying of the 
information contained in this e-mail message 
and/or attachments to it are strictly prohibited. If 
you have received this communication in error, 
please notify us by reply e-mail or telephone and 
immediately and permanently delete the message 
and any attachments. Thank you




[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