<?php
/*
	DevSaver Web Framework
	Copyright (c) 2013-2016 DevSaver. 
	All rights reserved.
		web:  www.devsaver.com
		mail: support@devsaver.com		
*/

// dependencies

global $_SESS;



	if ($_COOKIE["uref"]) {

		//do nothing, the referal its allready takedn by somebody else
	} else {		

		if (stristr($_SERVER["HTTP_REFERER"] , $_SERVER["HTTP_HOST"])) {

		} else {		
			//expire in 30 days;
			$expire = time() + 3600*24*365;

			//set the referer	
			setcookie ( 
					"uref" , 
					$_SERVER["HTTP_REFERER"],
					$expire,
					"/", 
					false
			);	
		}
	}

?>
