The data submit form writes the data to a data file that is included into the ViewData form. It also adds a link into a links files. So, it writes: [serial]data.php to contain the data and then writes one line to "DataList.incl" adding a link to the newly submitted data.
The ViewData form includes DataList.incl containing the links to the various data files themselves.
<a href="ViewData.html?serial=45176">45176</a><br>
<a href="ViewData.html?serial=45177">45177</a><br>
<a href="ViewData.html?serial=45178">45178</a><br>
<a href="ViewData.html?serial=45179">45179</a><br>
<a href="ViewData.html?serial=45180">45180</a><br>
<a href="ViewData.html?serial=45181">45181</a><br>
<a href="ViewData.html?serial=45182">45182</a><br>
Basically, I'm looking for a way to "expire" both the data files and links after a week or so.
It's easy enough to write a script to delete the old data files but the links in DataList.incl are another matter. I could tag the links with a date tag (YYYYMMDD) or something but would need another script to periodically parse DataList.incl and delete lines with data tags older than a week.
That is, I could write link lines in DataList.incl like:
<a href="ViewData.html?serial=45182">45182</a><br><!--20100805-->
Then, once a day, run a script that deletes [serial]data.php files where the create date is older than a week and then parses DataList.incl to remove those lines with date tags a week old.
Are any of you currently "expiring" files and links like this?
Assuming that I go ahead and tag each link with YYYYMMDD, can removal of old links within DataList.incl be done with php or will that require Perl or some such?