mirror of
https://github.com/RaspAP/raspap-webgui.git
synced 2024-11-25 09:00:25 +00:00
Initial commit: ajax get channel
This commit is contained in:
parent
6abe731ae5
commit
b6cd2e0fa1
1 changed files with 17 additions and 0 deletions
17
ajax/networking/get_channel.php
Normal file
17
ajax/networking/get_channel.php
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
require('../../includes/csrf.php');
|
||||||
|
include_once('../../includes/config.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);
|
Loading…
Reference in a new issue