Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top


I wanted to programmatically find out how to check if a remote access to my website is associated with only my wireless network. I know this might not be needed by having it our the intranet. But I have to add this feature to my application and the firm needs that. I am using PHP.

share|improve this question

What you have:

  • IP of remote user

What you need:

  • List of IP addresses or netblocks associated with each of your corporate wireless networks


  • Check the user's IP to see if it's in the list.

You'll need to speak with whomever maintains your network to see if they can give you a way to query for the second piece of information (List of IP addresses/netblocks).

share|improve this answer
Can I use the IP address of user to derive anything that would help me? I am sorry but am not good at all with networking! – name_masked May 18 '11 at 20:12
No, nothing about the IP address inherently means that it's on a wireless network. Often, the same DHCP server hands out IP addresses to wired and wireless clients. You need to talk to your network admin to help you determine #2 in the above list. – MikeyB May 18 '11 at 20:46

Your wireless network is encompassed in a subnet with only one external IP. You could log it with $_SERVER['REMOTE_ADDR']. Any machine in the subnet you're on will appear with that same IP. There is no way I know of to differentiate between machines on the same subnet but different wireless access points. I don't believe it should be possible, but the subnet is probably enough for you.

Beware that if the internet connection this subnet uses eventually gets a different IP address from the ISP (extremely likely), you will start seeing that different IP.

Hope that's enough for you to do whatever it is you're trying to do.

share|improve this answer
Just because your wireless network only has one external IP address doesn't mean that all do. – MikeyB May 18 '11 at 20:08

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.