[Gelöst] Pseudoscript für WLAN auf beide Netze aufteilen?

S

SF1975

Guest
Hallo,
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;
?>
so aufteilen kann, dass es entweder das 2,4 oder das 5,0Ghz-Band anzeigt?
 
Zuletzt bearbeitet von einem Moderator:
Abend

Bestimmt.

Hab nur leider keine 5Ghz fähige Box.
Schau mal in den Quelltext der betreffenden (AVM-Webinterface) Seite und poste mal die anonymisierten Daten ab...
fritz.box/wlan/radiochannel.lua

QUERIES = {
...
}

...die das WLAN betreffen.
Vielleicht kriegste das sogar selber hin, dann. ;)
 
Zuletzt bearbeitet:
Hallo,
Gerade mal geschaut. Es sind die Kanäle 13 und 136:
PHP:
QUERIES = {
  ["wlan:settings/ap_enabled"] = "1", 
  ["wlan:settings/ap_enabled_scnd"] = "1", 
}
Werde da heute mal mit spielen. Geil, es klappt:

pseudowlan-status-24.php
PHP:
 <?php

        /*
                +---------------------------------------------------------------------+
                |                                                                     |
                |   SensorAndSwitch Automation Pro                                    |
                |   PseudoGeräte-Script                                               |
                |   ===============================================================   |
                |   -> WLAN                                                           |
                |      Fritz!Box WLAN         2,4Ghz                                  |
                |                                                                     |
                +---------------------------------------------------------------------+
        */

        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-Status 2,4Ghz: <img src="'.PIC.'mled'.$x[3].'.png">*HTML#';
                }
                else {
                    $fehler=true;
                    echo "P##E##";
                }
            }
            else {
                $fehler=true;
                echo "P##E##";
            }
        }
        exit;
?>
pseudowlan-status-50.php
PHP:
 <?php

        /*
                +---------------------------------------------------------------------+
                |                                                                     |
                |   SensorAndSwitch Automation Pro                                    |
                |   PseudoGeräte-Script                                               |
                |   ===============================================================   |
                |   -> WLAN                                                           |
                |      Fritz!Box WLAN         5,0Ghz                                  |
                |                                                                     |
                +---------------------------------------------------------------------+
        */

        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_scnd");
            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_scnd 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_scnd 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_scnd";
            $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-Status 5,0Ghz: <img src="'.PIC.'mled'.$x[3].'.png">*HTML#';
                }
                else {
                    $fehler=true;
                    echo "P##E##";
                }
            }
            else {
                $fehler=true;
                echo "P##E##";
            }
        }
        exit;
?>
pseudowds-status.php
PHP:
<?php

        /*
                +---------------------------------------------------------------------+
                |                                                                     |
                |   SensorAndSwitch Automation Pro                                    |
                |   PseudoGeräte-Script                                               |
                |   ===============================================================   |
                |   -> WLAN                                                           |
                |      Fritz!Box WDS-Status                                           |
                |                                                                     |
                +---------------------------------------------------------------------+
        */

        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/WDS_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/WDS_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/WDS_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/WDS_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-WDS-Status: <img src="'.PIC.'mled'.$x[3].'.png">*HTML#';
                }
                else {
                    $fehler=true;
                    echo "P##E##";
                }
            }
            else {
                $fehler=true;
                echo "P##E##";
            }
        }
        exit;
?>
pseudomediaserver.php
PHP:
<?php

        /*
                +---------------------------------------------------------------------+
                |                                                                     |
                |   SensorAndSwitch Automation Pro                                    |
                |   PseudoGeräte-Script                                               |
                |   ===============================================================   |
                |   -> WLAN                                                           |
                |      Fritz!Box Mediaserver-Status                                   |
                |                                                                     |
                +---------------------------------------------------------------------+
        */

        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 mediasrv settings/enabled");
            if ($Status) {
                $fehler=false;
                echo "S#".trim($Status)."#";
            }
            else {
                $fehler=true;
            }
        }
        if ($_GET["schalter"]=="1") {
            $Status = shell_exec("/usr/bin/ctlmgr_ctl w mediasrv settings/enabled 1");
            if ($Status) {
                $fehler=false;
                echo "S#1#";
            }
            else {
                $fehler=true;
            }
        }
        if ($_GET["schalter"]=="0") {
            $Status = shell_exec("/usr/bin/ctlmgr_ctl w mediasrv settings/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=mediasrv:settings/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#Mediaserver-Status: <img src="'.PIC.'mled'.$x[3].'.png">*HTML#';
                }
                else {
                    $fehler=true;
                    echo "P##E##";
                }
            }
            else {
                $fehler=true;
                echo "P##E##";
            }
        }
        exit;
?>
pseudoonlinspeicher.php
PHP:
 <?php

        /*
                +---------------------------------------------------------------------+
                |                                                                     |
                |   SensorAndSwitch Automation Pro                                    |
                |   PseudoGeräte-Script                                               |
                |   ===============================================================   |
                |   -> WLAN                                                           |
                |      Fritz!Box Onlinespeicher-Status                                |
                |                                                                     |
                +---------------------------------------------------------------------+
        */

        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 webdavclient status/connection_state");
            if ($Status) {
                $fehler=false;
                echo "S#".trim($Status)."#";
            }
            else {
                $fehler=true;
            }
        }
        if ($_GET["schalter"]=="1") {
            $Status = shell_exec("/usr/bin/ctlmgr_ctl w webdavclient status/connection_state 1");
            if ($Status) {
                $fehler=false;
                echo "S#1#";
            }
            else {
                $fehler=true;
            }
        }
        if ($_GET["schalter"]=="0") {
            $Status = shell_exec("/usr/bin/ctlmgr_ctl w webdavclient status/connection_state 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=webdavclient:status/connection_state";
            $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#Onlinespeicher-Status: <img src="'.PIC.'mled'.$x[3].'.png">*HTML#';
                }
                else {
                    $fehler=true;
                    echo "P##E##";
                }
            }
            else {
                $fehler=true;
                echo "P##E##";
            }
        }
        exit;
?>
Absolut geil, ich lerne immer mehr dazu :D. Thx für die Hilfe :dance:

Jetzt fehlt nur noch die Abfrage, ob bestimmte Rufnummern connected sind. Da komem ich aber noch nicht weiter. :-Ö
 
Zuletzt bearbeitet von einem Moderator:
Moin

:)
Absolut geil, ich lerne immer mehr dazu
Genau das wollte ich erreichen.
Einmal verstanden und dann ist es plötzlich ganz leicht. ;)

PeterPawn hat ein Skript geschrieben, welches mit luavar arbeitet.
Das ist wesentlich schneller als ctlmgr_ctl.
Wenn ich es durchgecheckt und verstanden habe wirds in SaS auf der Fritz!Box eingesetzt.
 
Zuletzt bearbeitet:
Hallo,
Ich habe aber eine Weile gebaucht ;). Ist nicht so ganz easy, wenn man sich mit der Programmierung nicht auskennt. Bestimmt nicht alles ganz sauber, was Anmerkungen anbelangt, muss da noch mal nachbessern ;)
 
Moin

:)
Genau das wollte ich erreichen.
Einmal verstanden und dann ist es plötzlich ganz leicht. ;)

PeterPawn hat ein Skript geschrieben, welches mit luavar arbeitet.
Das ist wesentlich schneller als ctlmgr_ctl.
Wenn ich es durchgecheckt und verstanden habe wirds in SaS auf der Fritz!Box eingesetzt.
Das klingt interessant. Gerade die Fritzbox ist da etwas zäh bei vielen PseudoScript-Abarbeitungen. :)
 
Moin

luavar

Momentan gehen damit Abfragen, also Sensoren.
Immerhin wäre das schon eine Entlastung für die Fritz!Box.
Das Schalten (setzen von Variablen) selber geht noch nicht mit dem Skript.
Dieser Satz von PeterPawn klingt aber hoffnungsvoll:
:doktor:
PeterPawn schrieb:
Man kann über das Lua-Interface auch Variablen setzen ... das ist aber ein anderes Thema und dem widme ich mich später vielleicht einmal.
 
Zuletzt bearbeitet:
@SF1975,
hi SF1975 ich finde die Idee mit dem 2,4GHz und 5GHz W-Lan aufteilung gut. Muß ich noch irgenetwas beachten wenn ich diese Scripte einsetzen möchte und darf.
Möchte zumindest vorher mal fragen ob es dir recht ist denn schließlich hast du die Arbeit gehabt.

Gruß Benne007
 
Hallo,
Wenn ich die Scripte hier gepostet habe, kannst Du sie problemlos nutzen. Falls Du sas 4.x nutzt, musst Du sie ein wenig anpassen:
psgFBF-WLAN.php
Code:
<?php

    /*
        +---------------------------------------------------------------------+
        |                                                                     |
        |   SensorAndSwitch Automation Pro                                    |
        |   PseudoGeräte-Script                                               |
        |   ===============================================================   |
        |   -> WLAN                                                           |
        |      Fritz!Box WLAN-Status                                          |
        |                                                                     |
        +---------------------------------------------------------------------+
    */

    include __DIR__."/../include/psg.php";

    $Login=$Conf["FB"]."/login_sid.lua";
    $user=$Conf["USER"];
    $password=$Conf["PASSWORD"];
    $url=$Conf["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);
    $Status1 = curl_exec($ch);
    curl_close($ch);
    $Login=$Conf["FB"]."/login_sid.lua";
    $user=$Conf["USER"];
    $password=$Conf["PASSWORD"];
    $url=$Conf["FB"]."/query.lua?sid=".GetSessionID($Login,$user,$password)."&wlan=wlan:status/ap_enabled_scnd";
    $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);
    $Status2 = curl_exec($ch);
    curl_close($ch);
    $Login=$Conf["FB"]."/login_sid.lua";
    $user=$Conf["USER"];
    $password=$Conf["PASSWORD"];
    $url=$Conf["FB"]."/query.lua?sid=".GetSessionID($Login,$user,$password)."&wlan=wlan:status/guest_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);
    $Status3 = curl_exec($ch);
    curl_close($ch);

    $t1="2";
    $t2="2";
    $t3="2";
    $x1=explode('"',$Status1);
    if ($x1[3]=="0" or $x1[3]=="1") {
        $t1=$x1[3];
    }
    $x2=explode('"',$Status2);
    if ($x2[3]=="0" or $x2[3]=="1") {
        $t2=$x2[3];
    }
    $x3=explode('"',$Status3);
    if ($x3[3]=="0" or $x3[3]=="1") {
        $t3=$x3[3];
    }
    echo 'P#WLAN (2,4/5,0 Ghz & Gast): <img src="'.PIC.'mled'.$t1.'.png"> <img src="'.PIC.'mled'.$t2.'.png"> <img src="'.PIC.'mled'.$t3.'.png">*HTML#';
    exit;
?>
 
@SF1975
Vielen Dank,
Habe die Scripte schon angepasst und läuft wunderbar.

Gruß Benne007
 

Zurzeit aktive Besucher

Statistik des Forums

Themen
244,840
Beiträge
2,219,267
Mitglieder
371,543
Neuestes Mitglied
Brainbanger
Holen Sie sich 3CX - völlig kostenlos!
Verbinden Sie Ihr Team und Ihre Kunden Telefonie Livechat Videokonferenzen

Gehostet oder selbst-verwaltet. Für bis zu 10 Nutzer dauerhaft kostenlos. Keine Kreditkartendetails erforderlich. Ohne Risiko testen.

3CX
Für diese E-Mail-Adresse besteht bereits ein 3CX-Konto. Sie werden zum Kundenportal weitergeleitet, wo Sie sich anmelden oder Ihr Passwort zurücksetzen können, falls Sie dieses vergessen haben.