Tutorial Guide To Display Hostname In PHP Function To Show User Host Name
tutorial guide to display hostname in php function to show user host name
tutorial, guide, to, display, hostname, in, php, function, to, show, user, host, name
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
POST# 351
Posted On: Fri Feb 29, 2008 12:01 pm
webmaster
Topic: Tutorial Guide To Display Hostname In PHP Function To Show User Host Name
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


Tue Mar 11, 2008 12:33 pm
1
Subzero
Reply #954
thanks for this ;)

What do you think?

* name:  

* email:  

* Please enter comments:


Receive Replies on my Comments
(An email will be sent to you when someone replies to your comments)

Add image to comments
yes no             upload