Afternoon all,
Was hoping someone could give me a quick hand. I've written a neat little PHP script that logs IP addresses to a website and stores them in a table in a mysql database. Now is there a way I can integrate a little bit of php that will empty the table say every week or fortnight or month, (Just don't want it getting to big).
The only thing I could think of was to add a date row in the table and store the day of the week everytime it logs an IP address and then add a bit of script that compares that value to the current value and if they're the same then delete it.
But this seems like a rather complicated/bloated way of doing things. Is there an easier way?
Was hoping someone could give me a quick hand. I've written a neat little PHP script that logs IP addresses to a website and stores them in a table in a mysql database. Now is there a way I can integrate a little bit of php that will empty the table say every week or fortnight or month, (Just don't want it getting to big).
The only thing I could think of was to add a date row in the table and store the day of the week everytime it logs an IP address and then add a bit of script that compares that value to the current value and if they're the same then delete it.
But this seems like a rather complicated/bloated way of doing things. Is there an easier way?