diff --git a/Unifi/connecting.php b/Unifi/connecting.php new file mode 100644 index 0000000..bb32550 --- /dev/null +++ b/Unifi/connecting.php @@ -0,0 +1,42 @@ +/devices/1/50) + +$controlleruser = 'username'; // the user name for access to the UniFi Controller +$controllerpassword = 'password'; // the password for access to the UniFi Controller +$controllerurl = 'https://1.1.1.1:8443'; // full url to the UniFi Controller, eg. 'https://22.22.11.11:8443' +$controllerversion = '5.10.21'; // the version of the Controller software, eg. '4.6.6' (must be at least 4.0.0) +$debug = false; + +$unifi_connection = new UniFi_API\Client($controlleruser, $controllerpassword, $controllerurl, $site_id, $controllerversion); +$set_debug_mode = $unifi_connection->set_debug($debug); +$loginresults = $unifi_connection->login(); + +$auth_result = $unifi_connection->authorize_guest($mac, $duration, $up = null, $down = null, $MBytes = null, $ap); + +//User will be authorized at this point; their name and email address can be saved to some database now +?> + + + +
+ +You're online!
+ Thanks for visiting us!