3
Thanks Hervet, just what I was looking for.
I find it a bit odd that this sort of setting is left to chance
global $xoopsUser, $xoopsModule;
$online_handler =& xoops_gethandler('online');
mt_srand((double)microtime()*1000000);
// set gc probabillity to 10% for now..
if (mt_rand(1, 100) < 11) {
$online_handler->gc(300);
}
Being quite new to php I cant fathom if we can turn this into a time based system easily. sometimes I have many hits per hour and other I have none so this setup is a little too hit and miss for my liking, most visitors are coming to be involved in an event so right when I need the online stats to stay is most likly exactly when they wont.
would increasing the number in the microtime affect the random nature at all?
cheers
FireHorse