Skip to content

Instantly share code, notes, and snippets.

@igoralves1
Last active December 22, 2016 14:27
Show Gist options
  • Save igoralves1/9577de3bcd9f20851f2c702458cd9312 to your computer and use it in GitHub Desktop.
Save igoralves1/9577de3bcd9f20851f2c702458cd9312 to your computer and use it in GitHub Desktop.
API that interacts with IoT devices.
<?php
header('Content-Type:application/json');
$verb=$_SERVER['REQUEST_METHOD'];
include_once '../../../class/db.php';
if ($verb=="GET") {
if(isset($_GET['p_session'])){
header("HTTP/1.1 200 ok");
$p_session = $_GET['p_session'];
echo json_encode(db::patientecurrentsatus_mouvement_alert($p_session));
}
else{
die("Nothing for you at this page !");
}
}
else{
die("Nothing for you at this page !");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment