Learn How To Display Current Domain PHP Name Hostname Site Url Address
RegisterLogin
Learn How To Display Current Domain PHP Name Hostname Site Url Address
Post Description: Learn How To Display Current Domain PHP Name Hostname Site Url Address
Tags: Learn, How, To, Display, Current, Domain, PHP, Name, Hostname, Site, Url, Address
This Post Was Posted On Feb 29, 2008 By web hosting #1211
Post Description: Learn How To Display Current Domain PHP Name Hostname Site Url Address
Tags: Learn, How, To, Display, Current, Domain, PHP, Name, Hostname, Site, Url, Address
This Post Was Posted On Feb 29, 2008 By web hosting #1211
Learn How To Display Current Domain PHP Name Hostname Site Url Address by web hosting
With php, this is simple. php has a function called getenv().
it displays the current domain name:
for example, if i were to run this code:
Code:
<?php
echo getenv('HTTP_HOST');
?>
echo getenv('HTTP_HOST');
?>
the output will look like this if the url was: http://www.wallpaperama.com/thisfile.php
Code:
www.wallpaperama.com
NOTE: in order for this to work on your site, you will need to have PHP. If you don't have PHP hosting on your site, you can start by singing up with our friends at www.webune.com - We recommend them to all our customer.
Leave Your Comments
Related Pages: [Add Your Website]
Post New Topic
tech support
#1651 1
here is another way:
http://www.wallpaperama.com/forums/php-how-to-show-domain-name-of-your-current-website-display
http://www.wallpaperama.com/forums/php-how-to-show-domain-name-of-your-current-website-display
Feb 23, 2008 Reply Report abuse
©2012 Webune Forums - Fri Dec 14, 2012 3:42 pm
Powered by: Webune Forums V3
Powered by: Webune Forums V3