How to get the URL domain name in PHP?

Showing Answers 1 - 1 of 1 Answers

subhashini

  • Oct 25th, 2007
 

Yes it is possible by $_server[HTTP_HOST]
eg:
<? $domain=$_SERVER['HTTP_HOST'];
echo $domain;?>
will result the domain name.

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions