Commit initial
This commit is contained in:
25
server/webplatform/www/camera-auth/index.php
Normal file
25
server/webplatform/www/camera-auth/index.php
Normal file
@ -0,0 +1,25 @@
|
||||
<?php
|
||||
|
||||
$GLOBALS['app_path'] = '../../apps/CameraMonitor/';
|
||||
|
||||
require $GLOBALS['app_path'].'Model/ModelCamera.php';
|
||||
|
||||
if(isset($_POST['name']) && isset($_POST['rtmp_handle']))
|
||||
{
|
||||
$idCam = $_POST['name'];
|
||||
$rtmp_handle = $_POST['rtmp_handle'];
|
||||
$modelCamera = new ModelCamera();
|
||||
if($modelCamera->exist($idCam) && $rtmp_handle != "")
|
||||
{
|
||||
$camera = $modelCamera->getCameraOnly($idCam);
|
||||
if($camera->getRtmpHandle() == $rtmp_handle)
|
||||
http_response_code(200);
|
||||
else
|
||||
http_response_code(403);
|
||||
}
|
||||
else
|
||||
http_response_code(403);
|
||||
}
|
||||
else
|
||||
http_response_code(403);
|
||||
?>
|
Reference in New Issue
Block a user