Web Development Network  |  Sites:    Capital Tutorials    Internet Marketing Books    Arcade Games
Depiction- Webmaster Resources
Stock Image


Contributors: SSD VPS in Europe  |  SEO Las Vegas |  EsqRank |  Free SEO Report

Dental SEO Marketing  |  Best Las Vegas SEO Company  |  Currency Converter Live

Misc Links: Submit Tutorials (Earn $$) l Advertising l Privacy Policy | Site Map

Tutorials > PHP > Get Host

 

Get the internet host name or ISP corresponding to a given IP address.


Most people know how to find and display a visitor's IP address. A visitor's ISP can also be found and displayed much like a visitor's IP address.

Code:
------------------------------------------------------------------------
<?php
$hostname = gethostbyaddr($_SERVER['REMOTE_ADDR']);

echo $hostname;
?>
------------------------------------------------------------------------

In action:

ec2-54-146-177-118.compute-1.amazonaws.com


 
 

Affiliates

GuiStyles Photoshop Tutorials
Tutorial Man Wallpaper Stock  More

Resources