Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /*
- *
- * Periodical Cookie Redirect
- * (c)2013 Dennis Kupec
- *
- */
- $_redirect_time = "3600"; // Time in seconds for each redirect (3600 = 1 hour)
- $_redirect_link = "http://google.com"; // Link to redirect to (eg. http://google.com)
- /*
- * Ignore everything below here
- */
- $_newtime = time()+$_redirect_time;
- if(!isset($_COOKIE["redirtime"])) setcookie("redirtime", $_newtime);
- if($_COOKIE["redirtime"]<=time()) {
- setcookie("redirtime", $_newtime);
- header("Location: ".$_redirect_link);
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement