当前位置: 首页>>代码示例>>PHP>>正文


PHP Trigger::intruder_check方法代码示例

本文整理汇总了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;
}
开发者ID:DawdyBishop,项目名称:viki,代码行数:31,代码来源:event.php


注:本文中的Trigger::intruder_check方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。