cookie| Beginners
<title>Homepage</title>
<body>
<a href= ' http://www.thehungersite.com/' >manual redirection<br></a>
<a href= "Javascript:resetcookie ()" >cookie reset</a>
<script language= "JavaScript" >
<!--
var bvisitedtoday = false;
var lastvisit = GetCookie ("lastvisit");
if (lastvisit!= null)
{
lastvisit = 1 * lastvisit;
var lasthere = new Date (lastvisit);
var rightnow = new Date ();
if (lasthere.getyear () = = Rightnow.getyear ()
&& lasthere.getmonth () = = Rightnow.getmonth ()
&& lasthere.getdate () = = Rightnow.getdate ())
{
Bvisitedtoday = true;
}
}
if (Bvisitedtoday = = False)
{
Setlastlastvisitcookie ();
window.location= "http://www.thehungersite.com/"
}
Else
{
window.location= "About:blank"
}
function Getcookieval (offset)
{
var endstr = document.cookie.indexOf (";", offset);
if (endstr = = 1)
Endstr = Document.cookie.length;
Return unescape (document.cookie.substring (offset, endstr));
}
function GetCookie (name)