Location: PHPKode > projects > TVEz - Media Library > tvez-0.2.1/html/shared/session.php
<?php

	# Check if the php version is 4.2 or higher
	$minVersion = "4.2";
	$minver = explode(".", $minVersion);
	$curver = explode(".", phpversion());

	if( ($curver[0] >= $minver[0]) && ($curver[1] >= $minver[1]) )
		$goodVersion = true;
	else
		$goodVersion = false;

	# set the cache limiter to 'private'
	# private_no_expire was added in PHP 4.2.0
	# private or private-no_expire will cause the browser to cache php pages
	if ($goodVersion)
		$oldCachelimiter = session_cache_limiter('none');
	else
		$oldCachelimiter = session_cache_limiter('none');

    # Set the cache expiration time
    # in ?minutes? from the current server time
    $cacheExpireTime = 60*60*24*100; // 100 days
    $oldCacheExpire = session_cache_expire($cacheExpireTime);

	$time = 60*60*24*100;
	ini_set("session.gc_maxlifetime","$time");
                                                                                     
    # Set the cookie expiration to 100 days
    # in seconds from the current server time
    $cookieExpireTime = 60*60*24*100; // 100 days
    session_set_cookie_params($cookieExpireTime);
                                                                                     
    # Set the session name
    $oldSessionName = session_name("TVEzSession");
                                                                                     
    session_start();

#	echo "Version ".( ($goodVersion) ? "higher" : "lower" )." than $minVersion<br>";
?>
Return current item: TVEz - Media Library