| Server IP : 93.86.61.54 / Your IP : 216.73.216.60 Web Server : Apache/2.4.62 (Ubuntu) System : Linux rasin.ddns.net 6.8.0-124-generic #124~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Tue May 26 21:05:19 UTC x86_64 User : www-data ( 33) PHP Version : 8.4.22 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /var/www/html/projects/iotdatal/ |
Upload File : |
<?php
include 'configconn.php';
include 'opendbconn.php';
echo "Pozdrav";
$id_node=0;
$stringID = "";
$flagID = 0;
$addressIP = "";
$lanID = "";
//$pm25=0.0;
//$pm10=0.0;
$sdata;
//echo $_GET["data"];
if($_GET["sdata"])
{
$sdata=$_GET["sdata"];
}
$sparameter=explode(";",$sdata);
$stringID = $sparameter[0];
$flagID = $sparameter[1];
$addressIP = $sparameter[2];
$lanID = $sparameter[3];
//$pm25=$sparameter[4];
//$pm10=$sparameter[5];
//echo($temperature);
echo "Prosledjeni podaci. ";
echo $sdata;
$sqlInsertTask="insert into rfid(stringID,flagID,addressIP,lanID) values ('$stringID','$flagID','$addressIP','$lanID')";
//$resultTask = mysqli_query($sqlInsertTask);
$resultTask=$con->query($sqlInsertTask);
//$resultTask=1;
if($resultTask){
// header('Location: '."index.php");
//$url='https://api.thingspeak.com/update?api_key=0X2HHH6Y6SB3JC36&field1='.$temperature.'&field2='.$rel_humidity;
//$contents=file_get_contents($url);
//if($contents !== false){
//echo $contents;
//}
} else{
// $message="Greska, upis podataka nije uspeo.";
// header('Location: '."measure_value.php");
}
include 'closedbconn.php';
?>
<?php
include 'configconn.php';
include 'opendbconn.php';
//$res = file_get_contents("http://192.168.22.61/1451");
//$res = file_get_contents("http://localhost/csl-ambient/testpage.php");
//$body = preg_replace("/.*<body[^>]*>|<\/body>.*/si", "", $res);
//$value = explode("<td>", $body);
//$v1=explode("<\/td>", $value[1]);
//$v2=explode("<\/td>", $value[3]);
// $val1=$v1[0];
// $val2=$v2[0];
//$val22=explode("%",$val2);
//$par1=preg_replace("/[^0-9\\.]/i", "", $val1);
//$par22=preg_replace("/\&\#382/", "", $val22[0]);
//$par2=preg_replace("/[^0-9\\.]/i", "", $par22);
echo "Pozdrav";
$id_node=0;
$temperature=0.0;
$rel_humidity=0.0;
$ir_t=0.0;
$acc_x=0.0;
$acc_y=0.0;
$acc_z=0.0;
$sdata;
if($_GET["sdata"])
{
$sdata=$_GET["sdata"];
}
$sparameter=explode(";",$sdata);
$stringID=$stringID[0];
//$temperature=$sparameter[1];
//$rel_humidity=$sparameter[2];/
//$altitude=$sparameter[3];
//$pm25=$sparameter[4];
//$pm10=$sparameter[5];
echo "Prosledjeni podaci. ";
echo $sdata;
$sqlInsertTask="insert into rfid(stringID) values (\$stringID')";
//$resultTask = mysql_query($sqlInsertTask);
//$resultTask=$con->query($sqlInsertTask);
$resultTask=1;
if($resultTask){
// header('Location: '."index.php");
//$url='https://api.thingspeak.com/update?api_key=0X2HHH6Y6SB3JC36&field1='.$temperature.'&field2='.$rel_humidity;
//$contents=file_get_contents($url);
//if($contents !== false){
//echo $contents;
//}
} else{
// $message="Greska, upis podataka nije uspeo.";
// header('Location: '."measure_value.php");
}
include 'closedbconn.php';
?>