<?phpfunction redirect ($to = '/', $time = 0){ $string = $time === 0 ? sprintf ('Location: %s', $to) : sprintf ('Refresh: %d; url=%s', $time, $to); exit (header ($string));}