Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
UCC
webcams
Commits
8e85fc32
Commit
8e85fc32
authored
Dec 03, 2014
by
mpomery
Browse files
camera.php works now
Needs to have right owner on the server
parent
e56339ce
Changes
1
Hide whitespace changes
Inline
Side-by-side
www/camera.php
View file @
8e85fc32
<?php
$camera
=
(
$_GET
[
'camera'
]
?
$_GET
[
'camera'
]
:
'nocamera'
);
$camera
=
'nocamera'
;
if
(
isset
(
$_GET
[
'camera'
]))
$camera
=
$_GET
[
'camera'
];
$imagelocation
=
"../"
;
$file
=
$imagelocation
.
strtolower
(
$camera
)
.
".jpg"
;
header
(
"Expires: "
.
gmdate
(
"D, d M Y H:i:s"
,
time
())
.
" GMT"
);
if
(
!
is_readable
(
$file
))
{
if
(
!
is_readable
(
$file
))
$file
=
"nocamera.jpg"
;
}
header
(
"Content-Type: image/jpeg"
);
header
(
"Content-Length: "
.
filesize
(
$file
));
header
(
"Last-Modified: "
.
gmdate
(
"D, d M Y H:i:s"
,
filectime
(
$file
))
.
" GMT"
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment