Hi there! I log my visitors IP-adresses in a mySQL-db, on a secret stat-site I want to list all these IP-adresses and also what domain a certain IP-adress belongs to.
How do I do that?
Thanks in advance!
Regards Daniel
You can begin by getting the hostname! Check the "gethostbyaddr" function: http://www.php.net/manual/en/function.gethostbyaddr.php
A short example:
<?php $REMOTE_ADDR = '209.61.191.11'; $REMOTE_HOST = gethostbyaddr($REMOTE_ADDR); echo $REMOTE_HOST; ?>
Lycka till!
Thanks a lot! /Daniel