Forum Moderators: coopster

Message Too Old, No Replies

How to get client's information?

IP and the ISP Server

         

jimpoo

4:52 am on Feb 17, 2004 (gmt 0)

10+ Year Member



I'm working on a website hit tracking appilication,
in php we can use REMOTE_ADDR to retrieve the client's IP address, but how do I get its isp server (domain)?

For example, the domain: pcp08721939pcs.norstn01.pa.comcast.net is associated with IP: 68.32.198.43

How can I use php functions to get 'pcp08721939pcs.norstn01.pa.comcast.net'?

Anyone can help me out? Thanks.

seomike2003

7:09 am on Feb 17, 2004 (gmt 0)



<?

$hostname = gethostbyaddr($_SERVER['REMOTE_ADDR']);
//that will get their host by ip
echo $hostname;

?>
some users will come in with more then 1 ip though