Added getNetConfig()

This commit is contained in:
billz 2020-12-01 18:38:57 +00:00
parent a21009e049
commit 66bd5d5927

View file

@ -234,6 +234,19 @@ function ParseConfig($arrConfig)
return $config; return $config;
} }
/**
* Fetches DHCP configuration for an interface, returned as JSON data
*
* @param string $interface
* @return json $jsonData
*/
function getNetConfig($interface)
{
$URI = $_SERVER['REQUEST_SCHEME'].'://'.$_SERVER['SERVER_NAME'] .'/ajax/networking/get_netcfg.php?iface='.$interface;
$jsonData = file_get_contents($URI);
return $jsonData;
}
/** /**
* *
* @param string $freq * @param string $freq