Computers |
|
| | #1 (permalink) |
| Super Techie | hi guys, its been long since i visited this forum, but i always return when things gets tougher for me(mind it for me and not for you guys :P) well this time, i m here to ask you, how can i fetch an ISP name from the given IP address, i looked around the google, found 2-3 sites, but they all are paid, is there any way else to do that ?? I m using php thanks a lot guys ![]() |
| | |
| | #2 (permalink) |
| Wizard Techie Join Date: Oct 2004
Posts: 4,007
| http://www.network-tools.com/ http://www.dnsstuff.com/ Off the top of my head. Those get who are my internet provider(Enta), but I go through a reseller, which those sigs pick it up (Aquiss)
__________________ Cisco CCNA, Comptia A+ |
| | |
| | #3 (permalink) |
| Newb Techie Join Date: Jan 2007
Posts: 25
| Lets see. My php is a little rusty, but I think the following might do what you need. $strHost = gethostbyaddr($_SERVER['REMOTE_ADDR']); In my case, this would return something like... UNIQUEHASH-UNIQUEHASH.cpe.net.cable.rogers.com I would imagine what you want is just the rogers or the rogers.com. You can perform some string manipulation functions on $strHost to retrieve that. |
| | |
| | #5 (permalink) |
| Super Techie | Warning: gethostbyaddr() [function.gethostbyaddr]: Address is not a valid IPv4 or IPv6 address mate this the error i got .. my simple code was <?php echo gethostbyaddr($_server['REMOTE_ADDR']); ?> when i tried it on local server, it gave my my computer name, but when i put it online, it gave me this error.. |
| | |
| | #7 (permalink) |
| Super Techie | here is how i changed the code.. <?php $ip=$_SERVER['REMOTE_ADDR']; echo"you ip adddress is".$ip; $isp=gethostbyaddr($ip); echo $isp; ?> and the output i got is you ip adddress is **.**.177.233 **.**.177.233 that means it is returning me the ip address again, instead if ISP name .. ![]() |
| | |