April 10, 200917 yr At the moment I have got a script that logs day, time, date etc like the following: Friday 10th of April 2009 02:34:16 PM Friday 10th of April 2009 02:34:21 PM Is it possible to use PHP to search through this data to find duplicates? E.g. <?php $DATE = ".date."; if ($DATE>1){ echo "This has happened more than once today"; } else { echo "This is the first time that this has happened today"; } ?> The information is not essential so the only other way I could think of is when doing the original fwrite is to fwrite something to a file and then run a cron job every 24 hours to empty the file and then run a check to see if the file is empty or not.
April 13, 200917 yr In that case I would output each line/date to an array, then loop through the array for each stored date to find duplicates using the in_array() function. EDIT: Or you could even use the array_search() function...
Create an account or sign in to comment