/** * Sets a cookie to remember the participant. * @param CH_Contest $contest * @param CH_Participant $participant */ static function process_cookie($contest, $participant) { $now = current_time('timestamp', 1); $end = $contest->get_utc_time(); $res = setcookie('contesthopper_' . $contest->ID, $participant->code, time() + ($end - $now), '/'); }