FluidCoding - Get Host Name - By: Brian SonniE

Home - PHP- Get Host Name

 /* 
	FluidCoding - Get Host Name
	Author: Brian Sonnie
*/

<?php
$ip=$_SERVER['REMOTE_ADDR'];
$hostName = gethostbyaddr($ip);
$echo $hostName;
?>

Output

ec2-54-166-229-17.compute-1.amazonaws.com


 

Ad Space

Ads

 

Ad Space

Ads