- Forums
- PHP
- Tutorial Guide To Display Hostname In PHP Function To Show User Host Name
This Page Contains information about Tutorial Guide To Display Hostname In PHP Function To Show User Host Name By webmaster in category PHP with 1 Replies. [979], Last Updated: Sat May 18, 2024
webmaster
Wed Nov 29, 2006
1 Comments
6725 Visits
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
https://www.wallpaperama.com/forums/tutorial-guide-to-display-hostname-in-php-function-to-show-user-host-name-t520.html