This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
header("Access-Control-Allow-Origin: *"); | |
header("Content-Type: application/json; charset=UTF-8"); | |
//Creating Array for JSON response | |
$response = array(); | |
// Include data base connect class | |
$filepath = realpath (dirname(__FILE__)); | |
require_once($filepath."/db_connect.php"); | |
// Connecting to database |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
header("Access-Control-Allow-Origin: *"); | |
header("Content-Type: application/json; charset=UTF-8"); | |
//Creating Array for JSON response | |
$response = array(); | |
// Include data base connect class | |
$filepath = realpath (dirname(__FILE__)); | |
require_once($filepath."/db_connect.php"); | |
// Connecting to database |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
header("Access-Control-Allow-Origin: *"); | |
header("Content-Type: application/json; charset=UTF-8"); | |
//Creating Array for JSON response | |
$response = array(); | |
// Check if we got the field from the user | |
if (isset($_GET['temp']) && isset($_GET['hum'])) { | |
$temp = $_GET['temp']; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
header('content-type: application/json; charset=utf-8'); | |
header("access-control-allow-origin: *"); | |
//Creating Array for JSON response | |
$response = array(); | |
// Check if we got the field from the user | |
if (isset($_GET['id'])) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class DB_CONNECT { | |
// Constructor | |
function __construct() { | |
// Trying to connect to the database | |
$this->connect(); | |
} | |
// Destructor |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/****************************************************/ | |
/************** Created by : Vivek Gupta ************/ | |
/*************** www.vsgupta.in *************/ | |
/*************** www.iotmonk.com *************/ | |
/****************************************************/ | |
define('DB_USER', "database user name"); // Your database user name | |
define('DB_PASSWORD', "database password"); // Your database password (mention your db password here) | |
define('DB_DATABASE', "database name"); // Your database name | |
define('DB_SERVER', "localhost"); // db server (Mostly will be 'local' host) |
NewerOlder