• January 19, 2021, 02:30:47 PM
  • Welcome, Guest
Please login or register.

Login with username, password and session length
Advanced search  


This Forum Beta is ONLY for registered owners of D-Link products in the USA for which we have created boards at this time.

Author Topic: PHP script for creating web galleries with webcam images  (Read 1905 times)


  • Level 1 Member
  • *
  • Posts: 6
PHP script for creating web galleries with webcam images
« on: December 03, 2015, 03:10:26 AM »


In case anyone is interested, here is my PHP script for creating web pages showing the images FTP-ed to a server: https://github.com/cloveras/kamera I am posting it in case someone else might find a use for it.

Generates HTML for image directories created by a web camera: ./20151202/image-2015120221560000.jpg (etc).

Shows the following, depending on the query string:

    Today's images: empty string, or '?'
    The latest image: ?1
    All images for a date: ?type=day&date=20151202
    All images for a month: ?type=month&year=2015&month=12
    One specific image: ?type=one&image=2015120213560301

Sunset, sunrise, dawn and dusk are found based on latitude and longditude, and only images between dusk and dawn are shown. Midnight sun and polar night is handled (see TODOs).

Supports navigation back/forward/up/down with the arrow keys.

Uses Google Analytics so you can see how many times you click on your page.

The script started as a simple hack, then grew into this much larger and almost maintainable hack. It is a good candidate for a complete rewrite, if you have the time.

ALL HTML is hand coded, and no framework is used. The pages are not responsive, do not support swiping, etc.

Also: All text is hard coded in Norwegian. Nice.

See it in use here: http://superelectric.net/viktun/kamera/
« Last Edit: December 03, 2015, 03:12:49 AM by cloveras »


  • Poweruser
  •   ▲
    ▲ ▲
  • *****
  • Posts: 49459
  • D-Link Global Forum Moderator
    • Router Troubleshooting
Re: PHP script for creating web galleries with webcam images
« Reply #1 on: December 19, 2015, 09:33:45 AM »

Thank you for the information. Hope it helps future users.  ;)
Cable: 1Gb/50Mb>NetGear CAX80>DIR-882>HP 24pt Gb Switch. COVR-1202/2202/3902,DIR-2660/80,3xDGL-4500s,DIR-857,835,827,815,890L,880L,868L,836L,810L,685,657,3x655s,645,628,601,DNR-202L,DNS-345,DCS-933L,936L,960L and 8000LH.