本文整理匯總了PHP中Trigger::intruder_check方法的典型用法代碼示例。如果您正苦於以下問題:PHP Trigger::intruder_check方法的具體用法?PHP Trigger::intruder_check怎麽用?PHP Trigger::intruder_check使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Trigger
的用法示例。
在下文中一共展示了Trigger::intruder_check方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: isset
$datablob = isset($_GET['datablob']) ? $sqliconn->escapestring(htmlspecialchars($_GET['datablob'])) : '';
}
// POST
if ($_SERVER['REQUEST_METHOD'] === 'POST') {
$post = json_decode(file_get_contents('php://input'), true);
$type = isset($post['type']) ? $sqliconn->escapestring(htmlspecialchars($post['type'])) : '';
$location = isset($post['location']) ? $sqliconn->escapestring(htmlspecialchars($post['location'])) : die;
$source = isset($post['source']) ? $sqliconn->escapestring(htmlspecialchars($post['source'])) : '';
$method = isset($post['method']) ? $sqliconn->escapestring(htmlspecialchars($post['method'])) : 'unknown-web-POST';
$info = isset($post['info']) ? $sqliconn->escapestring(htmlspecialchars($post['info'])) : '';
$imgblob = isset($post['imgblob']) ? $sqliconn->escapestring(htmlspecialchars($post['imgblob'])) : '';
//base64_decode(rawurldecode(
$datablob = isset($post['datablob']) ? $sqliconn->escapestring(htmlspecialchars($post['datablob'])) : '';
}
// update database
$sql = "INSERT INTO events (uuid, type, location, source, time, method, info, imgblob, datablob) VALUES ('{$uuid}', '{$type}', '{$location}', '{$source}', '{$currenttime}', '{$method}', '{$info}', '{$imgblob}', '{$datablob}')";
//var_dump( $sql );
if ($sqliconn->query($sql) === TRUE) {
// fire state updater
$trigger = new Trigger();
$trigger->update_state_on_event($sqliconn, $uuid, $type, $location, $source, $method, $currenttime);
if ($type == "motion") {
$trigger->intruder_check($sqliconn, $uuid, $type, $location, $source, $method, $currenttime);
}
//http_response_code(200);
//echo "all grand";
} else {
//http_response_code(418);
echo "Error updating record: test";
// . $sqliconn->error;
}