Hey daiv,
Sorry I did't explain very well. Okay.
When a user posts add to the database (or index) that is holding all of the posts the unix timestamp.
The timestamp is accessible by using: time()
$timestamp=time();
echo $timestamp
Then in your auto delete script. You would pull ALL of the posts. (However you want to do that) and check the timestamp value.
same as you would try to check the DATE that you showed me erlier.
To check the timestamp you would do this:
$timestamp=time(); //This gives the timestamp for right now.
$timestamp2=Post time //The Posts Timestamp
$checktime=$timestamp-$timestamp2; // Minusing the two.
if($checktime<86400){ //Checking to see if its been 24 hours.
//It has no been 24 hours. DO NOT REMOVE
}else{
//It has been 24 hours. REMOVE POST.
}
However you want to remove the post is up to you.
Hope that helps 
__________________
Please login or register to view this content. Registration is FREE - 100 Satisfied Customers - Custom Programming and Web Development
|