• April 19, 2024, 01:51:15 PM
  • Welcome, Guest
Please login or register.

Login with username, password and session length
Advanced search  

News:

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 2599 times)

cloveras

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

Hi

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.

Quote
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 »
Logged

FurryNutz

  • Poweruser
  •   ▲
    ▲ ▲
  • *****
  • Posts: 49923
  • 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.  ;)
Logged
Cable: 1Gb/50Mb>NetGear CM1200>DIR-882>HP 24pt Gb Switch. COVR-1202/2202/3902,DIR-2660/80,3xDGL-4500s,DIR-LX1870,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.