well do esactly as Shrike says, setup a cronjob on server that runs a php script to delete contents of the text file every 24 hours. or have it detect when its over 24 hours old when ever someone goes to your site via index.php and have it delete the contents if over 24 hours.
if thats not what you mean then im totally dunno what you are on about.