poe Posted June 1, 2007 Share Posted June 1, 2007 my brain is fried at the moment, so i cant really think too well..... using time(), how do i compare 2 times by comparing the hours and day, i dont care about min, or seconds. i want to log only 1 hit by the hour, so this will trigger another script to run. so every page load, if i have already had a hit this hour - do nothing, otherwise enter this hour in the log thanks chris Quote Link to comment https://forums.phpfreaks.com/topic/53912-time/ Share on other sites More sharing options...
yzerman Posted June 1, 2007 Share Posted June 1, 2007 //where $time1 is now, and $time2 is the value you stored + 1 hour if ($time1 >= $time2) { //do something } else { //do nothing }//end if Quote Link to comment https://forums.phpfreaks.com/topic/53912-time/#findComment-266567 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.