LAN DS18B20 WEB Temperature Monitor 1 meter Cable
www.WEB-Relays.com
www.Facebook.com/KMtronic

PHP file for display temperature from WEB KMtronic Temperature Monitor

Spread the love

WEB PHP file for display temperature from KMtronic Temperature Monitor

WEB PHP file for display temperature from KMtronic Temperature Monitor
WEB PHP file for display temperature from KMtronic Temperature Monitor
WEB PHP file for display temperature from KMtronic Temperature Monitor on TV with Raspberry Pi
WEB PHP file for display temperature from KMtronic Temperature Monitor on TV with Raspberry PI
PHP file for display temperature from KMtronic Temperature Monitor
PHP file for display temperature from KMtronic Temperature Monitor

 

PHP file:

<?php

$page = $_SERVER['PHP_SELF'];
$sec = "5";

$mydate = date('d-m-Y');
 $mytime = date('H:i:s');
 $days = array( 'Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday' );
 
 // Loading the XML file
 $xml = simplexml_load_file("http://88.87.29.196:8002/status.xml");

foreach($xml->children() as $sensor)
 {
    if ($sensor->name == "284108D104000072" )
       {
       $temp_ofis = $sensor->temp;
       }
 }

?>



<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="refresh" content="30">
<title>KMtronic WEB Temperature Monitor</title>
<style type="text/css">
<!--
.style1 {
 font-family: Arial, Helvetica, sans-serif;
 font-weight: bold;
 font-size: 60px;
}
.style2 {font-size: 36px}
.style4 {
 color: #999999; 
 font-size: 180px;
 }
.style5 {
 font-family: Arial, Helvetica, sans-serif;
 color: #FFFFFF;
}
.style6 {
 color: #FFFFFF;
 font-style: italic;
}
.style7 {color: #FFFFFF}
body {
 font-size: 60px;
 background-color: #000099;
}
.style_red {color: red}
.style_yellow {color: yellow}
.style_green {color: green}
-->
</style>
</head>

<body>
<div>
 <div id="header">
 <div align="left"></div>
 </div>
</div>
<div id="header2"><div align="center" class="style1">
 <p class="style7"><?php print $days[ date( 'w', strtotime($mydate) ) ] . "&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp" . $mydate . "&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp" . $mytime; ?></p>
 </div>
</div>
<table width="100%" border="10" cellpadding="10" cellspacing="10" bordercolor="#FFFFFF" bgcolor="#000099">
 <tr>
 <td height="500">
 <div align="center"><span class="style1"><span class="style6">OFFICE KMtronic</span><br />
 <span class="style4">
 <span class=style_red><?php echo $temp_ofis;?> °C</span><br>
 </span>
 </td> 
 </div>
</tr>
 
 
</table>
</body>
</html>

Save

Save

One thought on “PHP file for display temperature from WEB KMtronic Temperature Monitor

Comments are closed.

KMtronic LAN WEB 8 Channel Relay board