Open FunkyMonk8111 opened 1 year ago
@FunkyMonk8111 How your sample.php
file looks like?
This should be a working sample. (I can't test it because I re-flashed my APs with OpenWRT … ;-))
<?php
require './class.unifi.php';
$unifi = new unifiapi('username', 'password', 'https://<ip_of_unifi>:84443');
$login = $unifi->login();
if ($login) {
$auth = $unifi->authorize_guest('mac adress', 60);
}
KR
I am using CentOS 8 and I tried running this using:
php sample.php
When I do this, the bash window just pipes out the contents of the file. Any way to actually run it?