Jump to content

resolving gethostbyaddr


Recommended Posts

Hi,

 

Since I've moved my web server from WAMP to LAMP enviroment following script instead of hostname only gives the IP address

 

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

echo $hostname;
?>

(resolv.conf has exact same dns servers as WAMP server had)

 

Can somebody explain how to make php resolve IP's to hostnames?

Link to comment
https://forums.phpfreaks.com/topic/71672-resolving-gethostbyaddr/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.