-3

Please Help me ..!! How do I do this now ??

I want to make a redirect WebPage, where if a user comes the first time, then the user will see original page. But if the user visits or comes again in 1-2 days at the same page link then the page will automatically redirect to another page link.

(This is not a login page. It's just a simple PHP or HTML Web page.)

Please Help me, I want to do this.

2

1 Answer 1

1

you can do it either in php or in js

PHP

    $cookie_name = "redirect_cookie";
    $cookie_value = "true";
    if (!isset($_COOKIE[$cookie_name])){
      setcookie($cookie_name, $cookie_value, time() + (86400 * 30), "/"); // 86400 = 1 day
    } else {
         header("Location: <url>"); /* Redirect browser */
         exit();
    }

?>
1
  • Thank Your Brother it working But here i got a problem that is when the code Redirect to another link then there can not catch up the click id . i mean if user click the continue button (physical click) then then landing make click id but when the code redirect the same link then the link or landing can not generate the click id . i need the click id for my work. Please Brother remake the code for me.
    – mark ket
    Nov 18, 2019 at 15:14

Not the answer you're looking for? Browse other questions tagged or ask your own question.