glenscott/unifi-controller

Authorise guest logins via the Ubiquiti Networks UniFi controller

v1.1.1 2015-03-20 21:16 UTC

This package is not auto-updated.

Last update: 2024-10-26 18:11:51 UTC


README

Authorise guest logins via the Ubiquiti Networks UniFi controller.

Example:

// capture details from UniFi controller
$user_mac_address = $_GET['id'];

try {
    $controller = new \UniFi\Controller(UNIFI_SERVER, UNIFI_USER, UNIFI_PASS);
    $controller->sendAuthorization($user_mac_address, $authorisation_minutes);
	echo "Authorised OK";
} catch (Exception $e) {
    echo "Could not send authorization to UniFi controller: " . $e->getMessage();
}