• August 22, 2019, 06:15:53 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 1510 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: 47706
  • 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:200mb/10Mb>NetGear C7800>DIR-882>DGS-1100>HP 24pt Gb Switch. COVR-3902/2202/1203,DIR-2680,890L,882,880L,868L,DNR-202L,DNS-345x2,DCS-933L,936L and 960L.
Go Here>Router Troubleshooting