S
SF1975
Guest
Hallo,
Ich wollte mal fragen, ob man dieses Script:
so aufteilen kann, dass es entweder das 2,4 oder das 5,0Ghz-Band anzeigt?
Ich wollte mal fragen, ob man dieses Script:
PHP:
<?php
/*
+---------------------------------------------------------------------+
| |
| SensorAndSwitch Automation Pro |
| PseudoGeräte-Script |
| =============================================================== |
| -> WLAN |
| Fritz!Box WLAN |
| |
+---------------------------------------------------------------------+
*/
error_reporting(0);
include "include/includefunctions.php";
include "include/includefritzbox.php";
include "include/includedateien.php";
include "include/includeconf.php";
include "include/includeconfig.php";
include "include/includedefine.php";
$fehler=true;
if ($_GET["info"]=="status") {
$Status = shell_exec("/usr/bin/ctlmgr_ctl r wlan settings/ap_enabled");
if ($Status) {
$fehler=false;
echo "S#".trim($Status)."#";
}
else {
$fehler=true;
}
}
if ($_GET["schalter"]=="1") {
$Status = shell_exec("/usr/bin/ctlmgr_ctl w wlan settings/ap_enabled 1");
if ($Status) {
$fehler=false;
echo "S#1#";
}
else {
$fehler=true;
}
}
if ($_GET["schalter"]=="0") {
$Status = shell_exec("/usr/bin/ctlmgr_ctl w wlan settings/ap_enabled 0");
if ($Status) {
$fehler=false;
echo "S#0#";
}
else {
$fehler=true;
}
}
if ($fehler) {
$Login=$Conf["FB"]."/login_sid.lua";
$user=$Conf["USER"];
$password=$Conf["PASSWORD"];
$url=FB."/query.lua?sid=".GetSessionID($Login,$user,$password)."&wlan=wlan:status/ap_enabled";
$ch = curl_init();
$timeout = 5;
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_USERAGENT, "Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0)");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST,false);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER,false);
curl_setopt($ch, CURLOPT_MAXREDIRS, 10);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $timeout);
$Status = curl_exec($ch);
curl_close($ch);
if ($Status) {
$x=explode('"',$Status);
if ($x[3]=="0" or $x[3]=="1") {
$fehler=false;
echo 'P#WLAN-Statusanzeige: <img src="'.PIC.'mled'.$x[3].'.png">*HTML#';
}
else {
$fehler=true;
echo "P##E##";
}
}
else {
$fehler=true;
echo "P##E##";
}
}
exit;
?>
Zuletzt bearbeitet von einem Moderator: