Convert IP Address to Hostname using PHP

gethostbyaddr function

<?php

$ip = '8.8.8.8';
$hostname = gethostbyaddr($ip);

echo $hostname;

Leave a Comment

Cancel reply

Your email address will not be published.