Update index.php

This commit is contained in:
Nasir Hafeez
2021-02-23 11:13:00 +05:00
committed by GitHub
parent 724786cf06
commit 979ae95164

View File

@@ -1,5 +1,7 @@
<?php
########### Set the following parameters according to your environment ###########
// IP and port of Omada Controller
$controllerIP = '192.168.8.175';
@@ -100,4 +102,17 @@ $res = curl_exec($curlAuth);
curl_close($curlAuth);
if ($res !== false) {
$json = json_decode($res, true);
$code = $json['errorCode'];
if ($code == "0") {
echo "You are now authorized on the WiFi network";
} else {
die("Error: check with your network administrator");
}
}
else {
die("Error: check with your network administrator");
}
?>