Example #1
0
 /**
  * Provide an <code>array</code> of rules specifing timeouts for IPv4 address ranges or
  * individual IPv4 addresses. The key is an IP address or range and the value is the time
  * until the session expires in seconds. For example:
  * 
  * Session::set_timeout_ips(array(
  * 		'127.0.0.1' => 36000	
  * ));
  * 
  * Any user connecting from 127.0.0.1 (localhost) will have their session expired after 10 hours.
  *
  * Session::set_timeout is used to set the timeout value for any users whose address is not in the given IP range.
  * 
  * @param array $session_ips Array of IPv4 rules.
  */
 public static function set_timeout_ips($session_ips)
 {
     if (!is_array($session_ips)) {
         user_error("Session::set_timeout_ips expects an array as its argument", E_USER_NOTICE);
         self::$session_ips = array();
     } else {
         self::$session_ips = $session_ips;
     }
 }