S
SF1975
Guest
Hallo,
Ich habe versucht, 4 Scripte in einem zusammen zu fassen.
Leider "verschwindet" die Anzeige sehr oft und "kommt nur sporadisch" zurück:
So soll es aussehen: Anhang anzeigen 81739, so sieht es sehr oft aus: Anhang anzeigen 81740.
Ich habe versucht, diese 4 Scripte (Anhang anzeigen 81741) in diesem zusammen zu fassen:
psgFBF-7390.php
Vielleicht hat ja einer von Euch eine Idee :noidea:
So aufgeteilt laufen sie problemlos:
Anhang anzeigen 81744
[EDIT]
zu früh gefreut....
Anhang anzeigen 81745
Ich habe versucht, 4 Scripte in einem zusammen zu fassen.
Leider "verschwindet" die Anzeige sehr oft und "kommt nur sporadisch" zurück:
So soll es aussehen: Anhang anzeigen 81739, so sieht es sehr oft aus: Anhang anzeigen 81740.
Ich habe versucht, diese 4 Scripte (Anhang anzeigen 81741) in diesem zusammen zu fassen:
psgFBF-7390.php
PHP:
<?php
/*
+---------------------------------------------------------------------+
| |
| SensorAndSwitch Automation Pro |
| PseudoGeräte-Script |
| =============================================================== |
| -> SIP |
| Fritz!Box Anrufbeantworter / Rufnummern / WLAN / Mediapl.-WebDAV |
| |
+---------------------------------------------------------------------+
*/
include __DIR__."/../include/psg.php";
$Login=$Conf["FB"]."/login_sid.lua";
$user=$Conf["USER"];
$password=$Conf["PASSWORD"];
/*
Anrufbeantworter
*/
$url=$Conf["FB"]."/query.lua?sid=".GetSessionID($Login,$user,$password)."&wlan=tam:settings/TAM0/Active";
$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=tam:settings/TAM1/Active";
$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=tam:settings/TAM2/Active";
$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);
$ab1="2";
$ab2="2";
$ab3="2";
$x1=explode('"',$Status1);
if ($x1[3]=="0" or $x1[3]=="1") {
$ab1=$x1[3];
}
$x2=explode('"',$Status2);
if ($x2[3]=="0" or $x2[3]=="1") {
$ab2=$x2[3];
}
$x3=explode('"',$Status3);
if ($x3[3]=="0" or $x3[3]=="1") {
$ab3=$x3[3];
}
/*
Rufnummern
*/
$url=$Conf["FB"]."/query.lua?sid=".GetSessionID($Login,$user,$password)."&wlan=sip:status/sip7/connect";
$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=sip:status/sip9/connect";
$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=sip:status/sip8/connect";
$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);
$Login=$Conf["FB"]."/login_sid.lua";
$user=$Conf["USER"];
$password=$Conf["PASSWORD"];
$url=$Conf["FB"]."/query.lua?sid=".GetSessionID($Login,$user,$password)."&wlan=sip:status/sip14/connect";
$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);
$Status4 = 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=sip:status/sip15/connect";
$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);
$Status5 = curl_exec($ch);
curl_close($ch);
$t1="2";
$t2="2";
$t3="2";
$t4="2";
$t5="2";
$x1=explode('"',$Status1);
if ($x1[3]=="1" or $x1[3]=="2") {
$t1=$x1[3]-1;
}
$x2=explode('"',$Status2);
if ($x2[3]=="1" or $x2[3]=="2") {
$t2=$x2[3]-1;
}
$x3=explode('"',$Status3);
if ($x3[3]=="1" or $x3[3]=="2") {
$t3=$x3[3]-1;
}
$x4=explode('"',$Status4);
if ($x4[3]=="1" or $x4[3]=="2") {
$t4=$x4[3]-1;
}
$x5=explode('"',$Status5);
if ($x5[3]=="1" or $x5[3]=="2") {
$t5=$x5[3]-1;
}
/*
WLAN
*/
$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);
$wl1="2";
$wl2="2";
$wl3="2";
$x1=explode('"',$Status1);
if ($x1[3]=="0" or $x1[3]=="1") {
$wl1=$x1[3];
}
$x2=explode('"',$Status2);
if ($x2[3]=="0" or $x2[3]=="1") {
$wl2=$x2[3];
}
$x3=explode('"',$Status3);
if ($x3[3]=="0" or $x3[3]=="1") {
$wl3=$x3[3];
}
/*
Media
*/
$url=$Conf["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);
$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=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);
$Status2 = curl_exec($ch);
curl_close($ch);
$mm1="2";
$mm2="2";
$x1=explode('"',$Status1);
if ($x1[3]=="0" or $x1[3]=="1") {
$mm1=$x1[3];
}
$x2=explode('"',$Status2);
if ($x2[3]=="0" or $x2[3]=="1") {
$mm2=$x2[3];
}
/*
Anzeige
*/
echo 'P#<div style="font-size:20px;text-align:right;width:320px;position:absolute;top:-5px;"><img src="'.picdesign("work1.gif").'" border="0"></div><div style="font-size:16px;text-align:right;width:260px;position:absolute;top:-1px;"><div>AB: <img src="'.picdesign("mled".$ab1.".png").'" height="15px"><img src="'.picdesign("mled".$ab2.".png").'" height="15px"><img src="'.picdesign("mled".$ab3.".png").'" height="15px"> SIP: <img src="'.picdesign("mled".$t1.".png").'" height="15px"><img src="'.picdesign("mled".$t2.".png").'" height="15px"><img src="'.picdesign("mled".$t3.".png").'" height="15px">&<img src="'.picdesign("mled".$t4.".png").'" height="15px"><img src="'.picdesign("mled".$t5.".png").'" height="15px"><br>WLAN: <img src="'.PIC.'mled'.$wl1.'.png" height="15px"><img src="'.PIC.'mled'.$wl2.'.png" height="15px"><img src="'.PIC.'mled'.$wl3.'.png" height="15px"> Media/DAV: <img src="'.PIC.'mled'.$mm1.'.png" height="15px"><img src="'.PIC.'mled'.$mm2.'.png" height="15px"></div>*HTML#';
exit;
?>
So aufgeteilt laufen sie problemlos:
Anhang anzeigen 81744
[EDIT]
zu früh gefreut....
Anhang anzeigen 81745
Zuletzt bearbeitet von einem Moderator: