<?php

if(isset($_GET["refid"])){
		setcookie("refid",strip_tags($_GET["refid"]),strtotime('+30 days'),'/', NULL, 0);
		$_refid = $_GET["refid"];
		$_refid = AntiXSS::setEncoding($_refid, "UTF-8");
}else{
	if(isset($_COOKIE["refid"])) {
		$_refid = $_COOKIE["refid"];
		$_refid = AntiXSS::setEncoding($_refid, "UTF-8");
	}else{
		$_refid = $_GET["refid"];
	}
}

?>