Tekforums

Chat => Entertainment & Technology => Topic started by: zpyder on January 06, 2015, 10:01:39 AM

Title: php script for sorting an index directory?
Post by: zpyder on January 06, 2015, 10:01:39 AM
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?

Title: Re: php script for sorting an index directory?
Post by: XEntity on January 06, 2015, 23:27:22 PM
This?

http://ml.pe/optimizing/2013/show-all-images-in-folder-with-php/ (http://ml.pe/optimizing/2013/show-all-images-in-folder-with-php/)
Title: Re: php script for sorting an index directory?
Post by: zpyder on January 07, 2015, 14:07:39 PM
Cheers. Now I just need to figure out a way of getting the page to delete old images ;)
Title: Re: php script for sorting an index directory?
Post by: XEntity on January 07, 2015, 19:29:52 PM
Have you used google before?

http://techlister.com/php/delete-files-older-than-x-days-in-php/501/ (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"
Title: Re: php script for sorting an index directory?
Post by: Clock'd 0Ne on January 07, 2015, 21:07:38 PM
If you offer this googling service during the day it would really help me at work sometimes :lol:
Title: Re: php script for sorting an index directory?
Post by: zpyder on January 07, 2015, 22:44:08 PM
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)
Title: php script for sorting an index directory?
Post by: XEntity on January 07, 2015, 22:46:09 PM
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 (http://bit.ly/1cbuOAN)
Title: Re: php script for sorting an index directory?
Post by: zpyder on January 08, 2015, 10:06:17 AM
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 ;))
Title: Re: php script for sorting an index directory?
Post by: XEntity on January 08, 2015, 16:47:04 PM
It's called outsourcing :-p