Tryag File Manager
Home
||
Turbo Force
||
B-F Config_Cpanel
Current Path :
/
home
/
nonga.eemo.co.kr
/
public_html
/
www
/
Or
Select Your Path :
Upload File :
New :
File
Dir
/home/nonga.eemo.co.kr/public_html/www/api_get_yanggyein_iot.php
<? session_cache_limiter('no-cache, must-revalidate'); session_start(); header("Pragma: no-cache"); header("Cache-Control: no-cache,must-revalidate"); header("Content-Type: text/html; charset=utf-8"); $yangdb=mysql_connect("erp.ppeople.net:7707","yanggyein","11qqaa..") or die(mysql_error()); mysql_select_db("yanggyein") or die(mysql_error()); $temperature = $_REQUEST['temper']; $humidity = $_REQUEST['humi']; $mac = $_REQUEST['mac']; echo '온도 : '.$temperature.' '; echo '습도 : '.$humidity.' '; echo 'MAC : '.$mac.' '; $query = "insert into farm_iots (temperature, humidity, mac, created_at, updated_at) values ('$temperature', '$humidity', '$mac', now(), now())"; $data = mysql_query($query) or die(mysql_error()); // echo json_encode($data); ?>