Greetings,
I am looking for a script that will limit the amount of page views a person can view for say an article.
What I mean is as a guest you can view a video on my website, but then after 20 seconds for example as guest you will be redirected.
I wish to have the script work even if java is disabled or the user ends the page loading once the countdown has finished.
Thanks.
Example:
<!--Customize the time (90) and dest URL to your own-->
<script language="Javascript">
<!--
/*
This credit must stay here for use
For this script, visit java-scripts.net
or
JavaScript Kit- Your comprehensive JavaScript, DHTML, CSS, and Ajax stop
*/
var countdown = "90"
function doCount() {
if (countdown > 0) {
countdown--
}
else {
document.location = "http://www.java-scripts.net"
}
window.status=countdown + " seconds left to view this page."
setTimeout('doCount()',1000)
}
doCount()
//-->
</script>