<?

function cookie($name, $value = false, $expire = 0, $path = '/', $domain = false) {
	if (!$domain) {
		$domain = $_SERVER['HTTP_HOST'];
	}
	$expire = (time() + $expire);
	if ($expire == 0) {
		$expire = time() - 1;
	}
	setcookie($name, $value, $expire, $path, $domain); 
}