php CURL to meraki API to check whether a device is connected to access point

NatwanTilembar
New here

php CURL to meraki API to check whether a device is connected to access point

So I have three outlets (restaurants) with three access points in each of them and I have designed a webpage to display food menu according to which access point (that is which outlet) the guest is connected to.

$url = "https://dashboard.meraki.com/api/v1/devices/Q2PD-6G6S-XXXX/clients?timespan=1000.0";

I use php curl to execute this line to fetch all the clients connected in 15mins timespan. So since I have three access points I will run the same curl url with other two APs. This the data i get from the API.

[{"id":"k1ff571","mac":"30:51:fb:85:66:59","description":"Azraa-s-S10","mdnsName":null,"dhcpHostname":"Azraa-s-S10","user":null,"ip":"192.168.255.190","vlan":2000,"switchport":null,"adaptivePolicyGroup":null,"usage":{"sent":368364.0,"recv":19799.0}},

So from the data I have how can i find out if a device/client is connected to the access point in php. These are the methods I tried and failed.

  1. IP - since website is not hosted on the local server when I try to get client IP using php it shows my public IP so don't think its possible to get private IP unless the server is also hosted in the same network.
  2. MAC - I searched a lot and came to the conclusion that its not possible to get MAC address with php.

Please help me find a way to identify the client using php expect hosting the website in the same network.

1 Reply 1
PhilipDAth
Kind of a big deal
Kind of a big deal

Have you though about using a splash page on the access points, and either using a custom splasg page or redirecting the users to a different web page based on which network they are in?

 

https://documentation.meraki.com/General_Administration/Cross-Platform_Content/Splash_Page#Custom_Sp... 

 

or "Where should users go":

https://documentation.meraki.com/General_Administration/Cross-Platform_Content/Splash_Page#Splash_Be... 

Get notified when there are additional replies to this discussion.