function RestartSensor() { $age = GetSensorAge(); if ($age > 300) { $command = "/etc/init.d/telldusd restart"; exec($command, $exec); } }
<?php include 'Includes/includes.php'; $age = GetSensorAge(); echo $age;