![]() |
![]() |
![]() |
||||
Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact us. |
![]() ![]() |
|
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed. |
|
Thread Tools |
![]() |
#1 |
Confirmed User
Join Date: Feb 2005
Location: Café del Mar
Posts: 5,162
|
![]() Is there a way to let php sift through all the files on one's server and delete those which haven't been accessed in a year or so?
I have a shitload of gallery html's which just sit there taking up space... |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#2 |
Confirmed User
Industry Role:
Join Date: Aug 2006
Location: Poland
Posts: 9,229
|
there's no way to determine what's been accessed. Its possible to do this based on last modified date.
Unless you want it to sift through gigabytes of server logs, in which case php is still not the right language for that
__________________
Mechanical Bunny Media Mechbunny Tube Script | Mechbunny Webcam Aggregator Script | Custom Web Development |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#3 | |
Too lazy to set a custom title
Join Date: Mar 2002
Location: Australia
Posts: 17,393
|
Quote:
![]() |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#4 |
Certified Asshole
Industry Role:
Join Date: Jan 2003
Location: In front of my laptop.
Posts: 896
|
On what OS are your files located ?
you can always try to use fileatime() http://ca3.php.net/manual/en/function.fileatime.php
__________________
Living the dream. |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#5 | |
Confirmed User
Join Date: Feb 2005
Location: Café del Mar
Posts: 5,162
|
Doesn't this function do that:
http://www.w3schools.com/php/func_fi..._fileatime.asp ? Or did I misunderstand it? edit Quote:
|
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#6 |
MOBILE PORN: IMOBILEPORN
Join Date: Jan 2004
Location: Tinseltown NL
Posts: 16,502
|
fileatime should work, just use it to check, then loop through the directory and unlink() files that haven't been used in x amount of time.
|
![]() |
![]() ![]() ![]() ![]() ![]() |