1. Go to this page and download the library: Download tomb1n0/unifiapi library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
tomb1n0 / unifiapi example snippets
ace these with your own details.
define('UNIFI_URL', 'https://unifi.yourdomain.co.uk:8443');
define('UNIFI_SITE', 'Southampton');
define('UNIFI_USERNAME', 'admin');
define('UNIFI_PASSWORD', 'unifipassword');
// get an instance of the api
$api = new UnifiAPI\API(UNIFI_URL, UNIFI_SITE, UNIFI_USERNAME, UNIFI_PASSWORD);
// get a controller object
$controller = $api->controller();