|
-
May 13th, 2007, 01:13 PM
#1
Thread Starter
Frenzied Member
how to get hostname and ISP from an ip ?
Hi all could any one show me how i can get host name,isp,connection type from given ip ?I am looking for a php script that i be able to host and does the job me.Thanks
Last edited by tony007; May 13th, 2007 at 01:16 PM.
-
May 14th, 2007, 05:26 PM
#2
Re: how to get hostname and ISP from an ip ?
You can get the hostname from an IP address using the gethostbyaddr() function:
PHP Code:
echo gethostbyaddr($_SERVER['REMOTE_ADDR']);
As for "isp", you'll probably need to do some lookups on the hostname/and or address, but I'm not sure exactly how.
Every passing hour brings the Solar System forty-three thousand miles closer to Globular Cluster M13 in Hercules -- and still there are some misfits who insist that there is no such thing as progress.
-
May 14th, 2007, 11:18 PM
#3
Thread Starter
Frenzied Member
Re: how to get hostname and ISP from an ip ?
 Originally Posted by sunburnt
You can get the hostname from an IP address using the gethostbyaddr() function:
PHP Code:
echo gethostbyaddr($_SERVER['REMOTE_ADDR']);
As for "isp", you'll probably need to do some lookups on the hostname/and or address, but I'm not sure exactly how.
But if do like this it willn't work :
echo gethostbyaddr(69.105.29.93 );
If i knew how to get the isp i was not asking it in the first place!!
-
May 14th, 2007, 11:19 PM
#4
Re: how to get hostname and ISP from an ip ?
try using quotes (" ") and deleteing the space at the end.
My usual boring signature: Something
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|