mirror of
https://github.com/billz/raspap-webgui.git
synced 2025-03-01 10:31:47 +00:00
21 lines
582 B
PHP
21 lines
582 B
PHP
<?php
|
|
|
|
require '../../includes/csrf.php';
|
|
require_once '../../includes/session.php';
|
|
require_once '../../includes/config.php';
|
|
require_once '../../src/RaspAP/Auth/HTTPAuth.php';
|
|
require_once '../../includes/authenticate.php';
|
|
|
|
exec('cat '. RASPI_HOSTAPD_CONFIG, $hostapdconfig);
|
|
$arrConfig = array();
|
|
|
|
foreach ($hostapdconfig as $hostapdconfigline) {
|
|
if (strlen($hostapdconfigline) === 0) {
|
|
continue;
|
|
}
|
|
$arrLine = explode("=", $hostapdconfigline);
|
|
$arrConfig[$arrLine[0]]=$arrLine[1];
|
|
};
|
|
$channel = intval($arrConfig['channel']);
|
|
echo json_encode($channel);
|