[HELP] Visit 1 page that lays a cookie, redirect to another in 2 seconds

Hello guys,
For affiliate link, direct link doesn’t work, so I was thinking, if visit link 1 that lays the cookie, and then redirect to page 2 - just not sure how to implement it - last time I touched web it was still php 3 and html 4 :smiley:

Are there any modern solutions you might think of?


This would need to be done on the server side.

If you’re using PHP then it’s pretty simple.

<a href="/first-stop.php">Continue</a>

first-stop.php file below


// expires in 1 hr.
setcookie("Test Cookie", $yourCookieValue, time() * 3600);

// redirects to 2nd php file
header("Location: /second-stop.php");

awesomesauce! I’ll try it out!!! :partying_face: