Consultar Estado de Panel - PHP Online
Form of PHP Sandbox
Enter Your PHP code here for testing/debugging in the Online PHP Sandbox. As in the usual PHP files, you can also add HTML, but do not forget to add the tag <?php
in the places where the PHP script should be executed.
Result of php executing
Full code of Consultar Estado de Panel.php
- <?php
- /*
- $fecha = date('d/m/y');
- $horaPeticionProtom = strtotime('now');
- echo ("fecha: " . $fecha);
- echo ("\n horaPeticionProtom: " . $horaPeticionProtom);
- */
- //Valores devueltos por las operaciones de arriba ANTES de lanzar PROTOM
- $fecha = date('24/10/19');
- $horaPeticionProtom = '1571911629';
- //Valores devueltos por consulta AlarmLog
- $fechaAlarmLog = "22/10/19";
- $horaAlarmLog = "19:50:40";
- $resultAlarmLog = strtotime($horaAlarmLog);
- if(strcasecmp($fecha, $fechaAlarmLog) == 0 && $resultAlarmLog > $horaPeticionProtom){
- echo "Fuera de pruebas (CCS)";
- }
- else{
- echo "En pruebas (ITS)";
- }