Answer the question
In order to leave comments, you need to log in
How to display ads in a wifi network using captive portal with a frequency of 30 minutes?
How to display ads in a wifi network using captive portal with a frequency of 30 minutes? Another question is how to throw out a client connected to this network after a certain time?
Answer the question
In order to leave comments, you need to log in
theoretically, it should work somehow
if you have a wifi controller (WC) and an external application captive portal (CP)
the client registers in the CP
CP authorizes the client in WC for exactly half an hour
, half an hour or more passes and the next request from the WC client redirects to CP
CP looks through its database, sees that this client is already registered, which means he came for advertising. Shows him an advertisement and authorizes him again on WC by sending back a request from the client.
I don’t know how for all controllers, but for unify, for example, a redirect to CP looks like this
GET /guest/s/default/?id=be:ef:00:df:dd:ee&ap=78:78:78:78:78:78&t=1500000000&url=http://captive.apple.com%2fhotspot-detect.html&ssid=blabla HTTP/1.0
from pyunifi.controller import Controller
c = Controller(UNIFI_WLC_IP, UNIFI_WLC_USER, UNIFI_WLC_PASSW, UNIFI_WLC_PORT, INIFI_WLC_VER, UNIFI_WLC_SITE_ID, UNIFI_WLC_SSL_VERIFY)
c.authorize_guest(mac, TIME_QOUTE,
up_bandwidth=None, down_bandwidth=None, byte_quota=None, ap_mac=None)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question