Community discussions

MikroTik App
 
JohnServerDev
newbie
Topic Author
Posts: 26
Joined: Thu Jan 22, 2015 11:56 am

How can I know if a user is connected to my HotSpot Wi-Fi?

Tue Feb 10, 2015 5:06 pm

Hi,

I have an external login page and other pages in my portal that works when the user connects to my HotSpot wi-fi.

I want to design a page that shows a message when a user is not connected to my wi-if. For instance:
To view this page, please connect to "MyHotSpot" wi-fi first.
How can I know if a user is connected to my HotSpot Wi-Fi? (Using JavaScript or PHP API (MikroTik commands))

Thank you in Advance.
 
User avatar
czolo
Member
Member
Posts: 423
Joined: Fri Mar 04, 2005 9:49 am
Location: Poland (Warsaw)
Contact:

Re: How can I know if a user is connected to my HotSpot Wi-Fi?

Wed Feb 11, 2015 5:18 pm

You can detect session parameters from the redirect page on MT hotspot.
You have several variables that MT sends in session, that you can detect from PHP. In example - you can check if there is a value for variable "logged-in". Of cource you have to send it from MT to external PHP server.

PS. Remeber that if you like my answer, you can rise my Karma ;)

Who is online

Users browsing this forum: No registered users and 67 guests