add auth
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
<?php
|
||||
require_once 'auth.php';
|
||||
|
||||
# allebilder.php
|
||||
|
||||
|
||||
12
auth.php
Normal file
12
auth.php
Normal file
@@ -0,0 +1,12 @@
|
||||
<?php
|
||||
include('config.inc.php');
|
||||
|
||||
if (!isset($_SERVER['PHP_AUTH_USER']) || !isset($_SERVER['PHP_AUTH_PW']) ||
|
||||
$_SERVER['PHP_AUTH_USER'] !== $inc_username || $_SERVER['PHP_AUTH_PW'] !== $inc_password) {
|
||||
header('WWW-Authenticate: Basic realm="Protected Area"');
|
||||
header('HTTP/1.0 401 Unauthorized');
|
||||
echo 'Access denied.';
|
||||
exit;
|
||||
}
|
||||
|
||||
?>
|
||||
@@ -1,4 +1,5 @@
|
||||
<?php
|
||||
require_once 'auth.php';
|
||||
|
||||
#############################################################
|
||||
# Konfigurations Datei für Webcams mit Motion
|
||||
@@ -7,6 +8,13 @@
|
||||
|
||||
$inc_pfad_www = "/z/motion/";
|
||||
|
||||
#################################
|
||||
# Zugangsdaten
|
||||
#################################
|
||||
|
||||
$inc_username = "TODO"
|
||||
$inc_password = "TODO"
|
||||
|
||||
#################################
|
||||
# KAMERAS
|
||||
#################################
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
<?php
|
||||
require_once 'auth.php';
|
||||
|
||||
# $datei
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
<?php
|
||||
require_once 'auth.php';
|
||||
|
||||
$b = isset($_GET['b']) ? $_GET['b'] : '160';
|
||||
$q = isset($_GET['q']) ? $_GET['q'] : '75';
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
<?php
|
||||
require_once 'auth.php';
|
||||
|
||||
$b = isset($_GET['b']) ? $_GET['b'] : '160';
|
||||
$q = isset($_GET['q']) ? $_GET['q'] : '75';
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
<?php
|
||||
require_once 'auth.php';
|
||||
include('config.inc.php');
|
||||
|
||||
$datei = basename(__FILE__);
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
<?php
|
||||
require_once 'auth.php';
|
||||
|
||||
# letztenbilder.php
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
<?php
|
||||
require_once 'auth.php';
|
||||
|
||||
# letztenbildermin.php
|
||||
|
||||
|
||||
Reference in New Issue
Block a user