1

I have to display content that should only be accessed from a given location. While I did consider geolocation for a minute, resticting the content based on the WLAN Name the client is connected to seems much more suitable.

The closest the PHP documentation comes to is Session-ID. Not what I need.

Any direction where I could look at ?

Edit : A good real-life example would be students in a school. They'd come with their own devices, connect onto the school WLAN and get access to some content not visible otherwise. The content is not hosted onto the school servers. I'm not looking for high security level, not a matter of life and death, something "basic" would do.

Edit 2: What you are all saying probably makes more sense technically speaking than the solution I initially had in mind. + the link provided is really useful.

Greg
  • 354
  • 1
  • 5
  • 11
  • 2
    Erm, a WLAN SSID is on the client, while PHP is run on a server. So what you basically want is that somebody sends his WLAN SSID to you (which might VERY well have security implications). If you know the IP address of the client, you can limit access to this using multiple ways. Please clarify what you want to do. – Markus W Mahlberg May 22 '14 at 17:04
  • 2
    Not only is this impossible without forcing the client to install some software that would extract this information and somehow send it to you, it is also a completely useless check, because I can easily go and change the SSID of my wireless network to whatever I want. – DaveRandom May 22 '14 at 17:08

1 Answers1

2

PHP executes on the server. The client is what connects to the wireless network. This is impossible, without some sort of client-side plugin that gets the WLAN SSID, and to my knowledge none exists. Furthermore, what's to stop somebody from just changing their SSID?

What you probably want to do is restrict it based on IP address... look here: How to get the client IP address in PHP?

Community
  • 1
  • 1
John Chrysostom
  • 3,973
  • 1
  • 34
  • 50