Tutorial Guide To Display Hostname In PHP Function To Show User Host Name

RegisterLogin
Tutorial Guide To Display Hostname In PHP Function To Show User Host Name
Post Description: Tutorial Guide To Display Hostname In PHP Function To Show User Host Name
Tags: Tutorial, Guide, To, Display, Hostname, In, PHP, Function, To, Show, User, Host, Name
This Post Was Posted On Feb 29, 2008 By webmaster #1192
PHP is great, it has a function to get your visitor's hostname,

to see it in action, i've created this small snippett (code) to show you how it works.

first copy and paste this code into your HTML/PHP editor or text editor like notepad:


     Code:
<HTML>
<HEAD>
<TITLE>Displaying Your Hostname or Sitename by Wallpaperama.com</TITLE>
</HEAD>
<BODY>
<p>This Script was developed by <a href="http://www.wallpaperama.com">Wallpaperama.com</a> - Support us by telling your friends about wallpaperama and help contribut to the open source by adding your knowledge of PHP, Linux, Mysql and more to others, just like this script.</p>
<p><strong>Your Hostname is: <?php echo gethostbyaddr($_SERVER['REMOTE_ADDR']);?></strong></p>
<p>Thank You</p>
<p>Wallpaperama Team</p>
<p align="center">Visit <a href="http://www.wallpaperama.com">Wallpaperama.com</a> Today </p>
</BODY>
</HTML>


Now save it as wallpaperama-hostname.php and uploaded it to your website and open it with your browser
(example: youdomain.com/wallpaperama-hostname.php)

Thats's it,

Hope this helps

Share our Knowledge - Freely!
Wallpaperama Team
Leave Your Comments
Related Pages: [Add Your Website]
Post New Topic
Subzero
#1633 1
thanks for this ;)
Mar 11, 2008 Reply Report abuse
©2011 Webune Forums - Sun Dec 18, 2011 6:19 pm
Powered by: Webune Forums V3