Advertisement
hmbashar

Redirect for another pages

Sep 6th, 2016
351
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.38 KB | None | 0 0
  1.     $current_location = $_SERVER['REQUEST_URI'];
  2.    
  3.         if(isset($_COOKIE['last_visited_url'])){
  4.          $cookie_location = $_COOKIE['last_visited_url'];
  5.        
  6.  
  7.          if($current_location != $cookie_location){
  8.  
  9.             setcookie('last_visited_url', $current_location, time()+60*60*24*30, '/');
  10.          }
  11.         } else {
  12.          setcookie('last_visited_url', $current_location, time()+60*60*24*30, '/');
  13.         }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement