From 93d78b2f229029597c047198b0611ba563bbc7c7 Mon Sep 17 00:00:00 2001 From: 4oo4 <4oo4@users.noreply.github.com> Date: Sun, 18 Mar 2018 13:28:40 +0000 Subject: [PATCH] Add ap_upgrade_firmware.php to Examples (#12) - add ap_upgrade_firmware.php, contributed by @4oo4 --- examples/ap_upgrade_firmware.php | 33 ++++++++++++++++++++++++++++++++ examples/config.template.php | 2 +- 2 files changed, 34 insertions(+), 1 deletion(-) create mode 100644 examples/ap_upgrade_firmware.php diff --git a/examples/ap_upgrade_firmware.php b/examples/ap_upgrade_firmware.php new file mode 100644 index 0000000..6ce0e5d --- /dev/null +++ b/examples/ap_upgrade_firmware.php @@ -0,0 +1,33 @@ +login(); + +// Run the actual upgrade +$results = $unifi_connection->upgrade_device($device_mac); + +/** + * provide feedback in json format from $response given by upgrade_device(); + */ +echo json_encode($results, JSON_PRETTY_PRINT); + +?> diff --git a/examples/config.template.php b/examples/config.template.php index 938e21c..1052620 100755 --- a/examples/config.template.php +++ b/examples/config.template.php @@ -21,4 +21,4 @@ $controllerversion = ''; // the version of the Controller software, eg. '4.6.6' /** * set to true (without quotes) to enable debug output to the browser and the PHP error log */ -$debug = false; \ No newline at end of file +$debug = false;