I have security cameras which uploads the photos to server. There is no direct access to those folders and I’m looking for solution where authenticated users can access their photos.
The solution is something like this:
- Security camera upload photos to “/home/myserver/[username]”
- User goes to http://www.example.com which asks username and password.
- Authenticated user have access to the security camera photos.
I have some ideas but I’m asking for typical solutions. Solution should be in PHP.
EDIT:
Good answers. I prefer solution which contains easy user management. It should be something for non-technical person. So I can add users using admin account. That was the point of using PHP.
You don’t even need PHP for this. You can do it solely by setting up an Apache virtualhost.
Basically you could just use Basic Authentication for the authenticating the users and make the directory with the pictures listable.
http://httpd.apache.org/docs/current/mod/mod_auth_basic.html
You should use this in the Directory directive to make the specific directory listable: