Forum Moderators: mack
The second best way, again IMHO, would be to use JavaScript in the page that contains the movie. Try this:
<script type="text/javascript">
var myCookies = document.cookie;
var p = myCookies.indexOf("seenthis=");
var seenthis = (p!= -1)? myCookies.substring(p + 9, p + 10) : 0;
if (seenthis > 3 ) {
location.href = "pasttheintro.html";
} else {
var farfuture = new Date();
farfuture.setFullYear(farfuture.getFullYear() + 10);
seenthis++;
document.cookie = "seenthis=" + seenthis + "; expires=" + farfuture.toGMTString();
}
</script>
Setting and reading cookies is not that difficult. Pretty basic JavaScript - next time, try doing it yourself ;)
Off course this won't work in browsers where JavaScript is disabled. That's why I'd prefer a server side solution. Neither will work if folks are blocking cookies, though.