Einzelnen Beitrag anzeigen
  #4 (permalink)  
Alt 30.07.10, 21:30
Benutzerbild von Attain
Attain Attain ist offline
Senior Member
 
Registriert seit: Feb 2008
Ort: 127.0.0.1
Beiträge: 371
Standard

Robert

Zitat:
Zitat von robertg Beitrag anzeigen
I don't have any problem with reading in German, only writing in German is difficult.
In my case it ist complete different

2'nd at 1'st
Zitat:
Do you put this function in every php script where an alarm can be raised? Or is there a way to call a function from a different file? I tried to do this, call a function from another file but couldn't get it to work. It would be nice to have a function base so that I can reuse the code.
You can put this function in to another script (for instance the Name of the script is 12345.ips.php), then you can use this function, if you use the include() statment

To Your example.
You have a temperature variable. If the Value is changing, then it will starts an Script like this
PHP-Code:
include'12345.ips.php';//you have to use the filename
if ($IPS_OLDVALUE 95 and $IPS_VALUE >= 95){  //Value exceeds 95°
    
SetMessageList(51809 /*[MessageBox]*/,"Solar","Temperatur $IPS_VALUE ");
}
if (
$IPS_OLDVALUE 105 and $IPS_VALUE >= 105){
    
// send SMS
    // pray for clouds

HTH
Attain
Mit Zitat antworten