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
 (387) PHP Mysql Hosting
Tutorial Guide To Display Hostname In PHP Function To Show User Host Name
Post Description:
Post Tags: tutorial, guide, to, display, hostname, in, php, function, to, show, user, host, name
This Post Has Been Viewed 2710 Times Since Wed Nov 29, 2006 12:09 pm Posted By webmaster with 1 replies
Next Post »» Displaying Dates With PHP Tutorial How To Show Today's Date Example Script
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

Leave Your Comments     [ dejar commentarios ]
  * Name     [nombre]

  * eMail (will not be published)     [coreo electronico]

* Enter Your Reply or Comments:    [commentarios]


Add Picture To Comments         [incluir foto]
YES NO             upload
Receive Replies on my Comments (An email will be sent to you when someone replies to your comments)

     

Comments and replies About Tutorial Guide To Display Hostname In PHP Function To Show User Host Name




:: 1 :: #45043 - Reply By Subzero On Tue Mar 11, 2008 12:33 pm
thanks for this ;)