Hey guys, Just wondering if it is possible for a page to be redirected after a certain number of views. For example say a website is viewed 999 times, is there any way that on the 1000 time it gets redirected? If you can give some code that would be great as well! Thanks!
Is this for a single page, or a website? and is it for a single user or all users totalled up for the 1000 visits?
Oh, well if it's just one page it should be simple enough to do. personally I'd just use a mysql database table for it, and add 1 to a field each page refuresh until the number was over 1000, and if it was, use header('Location: http://www.newdomain.com/url'); exit(); PHP: if it was 1000 and then subtract 1000 from the value in the table. of course, you could do this with a text file too
Hey, Sounds good, I am just a little confused on how to add 1 to a field each page refresh. Would I put that php code on the page itself or inside a table?? How would you do it with a text file? thanks!