News:

Tekforums.net - The improved home of Tekforums! :D

Main Menu

php script for sorting an index directory?

Started by zpyder, January 06, 2015, 10:01:39 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

zpyder

I've had a quick look online and I just keep finding what look to be scripts that are much more complicated than what I need...


Essentially I have an IP webcam that uploads still images to a folder when it detects movement. Over the course of the week I get thousands of images, and if I want to see the latest image I have to scroll down the massive index page list.

All I want is to make a page that has all the items sorted by date modified, with the most recent at the top.

(better yet, the above, but auto deletes things older than 5 days...though I appreciate that would require server-type stuff to work out?)

Any suggestions?



zpyder

Cheers. Now I just need to figure out a way of getting the page to delete old images ;)

XEntity

Have you used google before?

http://techlister.com/php/delete-files-older-than-x-days-in-php/501/

Under search for "php script to delete images older than via web browser"

Clock'd 0Ne

If you offer this googling service during the day it would really help me at work sometimes :lol:

zpyder

#5
Quote from: XEntity on January 07, 2015, 19:29:52 PM
Have you used google before?


:P

Maybe I was searching for overly complicated things, as I kept getting results back for CRON things. Figured it'd be quicker to ask rather than keep searching ;)

(Plus I'm just too lazy)

XEntity

#6
Haha, Nige well I could make some kind of form, put it on a website with a memorable URL, and all you do is type in what you want to know and press a button, maybe even call the button "search" and then get it to automatically send back some pages that might be useful to what you are looking for....

Maybe something like this:

http://bit.ly/1cbuOAN

zpyder

What can I say, you probably put more time and effort in to googling and posting the link than it took me to write my question :P I'd say that's me being efficient(lazy) :D

(thank you by the way ;))

XEntity