Jump to content

Recommended Posts

A few days ago, I was on this website that showed me my ISP, ofcourse as curious as I am, I went directly to php.net where I found gethostbyaddr(); providing me something but not what I wanted, so if someone knows how I can accomplish this, then please feel free to enlight me!
Link to comment
https://forums.phpfreaks.com/topic/16640-how-to-retrieve-isp/
Share on other sites

The web site that you saw do this feat (showing you your isp name); what they most likely did was:

$_SERVER['REMOTE_addr']; //gets the client IP

then they probably queried whois.arin.net with fread() or similar to get the registered owner of that IP (which would be your provider (if they are tier 1, otherwise it will return your provider's provider))

The whois data adhere's to conventions and standards so the web site new what and where to look to get your ISP's name.
Link to comment
https://forums.phpfreaks.com/topic/16640-how-to-retrieve-isp/#findComment-69842
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.