Author Topic: php script for sorting an index directory?  (Read 2587 times)

  • Offline zpyder

  • Posts: 6,946
  • Hero Member
php script for sorting an index directory?
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?



  • Offline zpyder

  • Posts: 6,946
  • Hero Member
Re: php script for sorting an index directory?
Reply #2 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 ;)

Re: php script for sorting an index directory?
Reply #3 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/

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

    • Tekforums.net - It's new and improved!
  • Offline Clock'd 0Ne

  • Clockedtastic
  • Posts: 10,945
  • Administrator
  • Hero Member
Re: php script for sorting an index directory?
Reply #4 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:

  • Offline zpyder

  • Posts: 6,946
  • Hero Member
Re: php script for sorting an index directory?
Reply #5 on: January 07, 2015, 22:44:08 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)
Last Edit: January 07, 2015, 22:49:41 PM by zpyder #187;

php script for sorting an index directory?
Reply #6 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
Last Edit: January 07, 2015, 22:50:32 PM by XEntity #187;

  • Offline zpyder

  • Posts: 6,946
  • Hero Member
Re: php script for sorting an index directory?
Reply #7 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 ;))

Re: php script for sorting an index directory?
Reply #8 on: January 08, 2015, 16:47:04 PM
It's called outsourcing :-p

0 Members and 1 Guest are viewing this topic.