2019-12-27 06:34:09 +00:00
|
|
|
<?php
|
|
|
|
|
2020-02-15 17:57:46 +00:00
|
|
|
require '../../includes/csrf.php';
|
|
|
|
require_once '../../includes/config.php';
|
2024-03-11 18:52:34 +01:00
|
|
|
require_once '../../src/RaspAP/Auth/HTTPAuth.php';
|
|
|
|
require_once '../../includes/authenticate.php';
|
2019-12-27 06:34:09 +00:00
|
|
|
|
|
|
|
exec('cat '. RASPI_HOSTAPD_CONFIG, $hostapdconfig);
|
|
|
|
$arrConfig = array();
|
|
|
|
|
|
|
|
foreach ($hostapdconfig as $hostapdconfigline) {
|
|
|
|
if (strlen($hostapdconfigline) === 0) {
|
|
|
|
continue;
|
|
|
|
}
|
2020-02-15 17:57:46 +00:00
|
|
|
$arrLine = explode("=", $hostapdconfigline);
|
2019-12-27 06:34:09 +00:00
|
|
|
$arrConfig[$arrLine[0]]=$arrLine[1];
|
|
|
|
};
|
|
|
|
$channel = intval($arrConfig['channel']);
|
|
|
|
echo json_encode($channel);
|