%
' Checking whether or not the user was referred by an affiliate
' If it is not a new referral, we check if the user has a cookie
' on his computer, meaning that he has been referred before
' Declaring variables
dim affiliate, a
' Requesting affiliate info (First from QueryString and then from Cookie)
a = Request("a")
' Creates a session to track the user in his current visit
Session("affiliate") = a
' Sets a new or updates the existing cookie - valid for 10 years
Response.Cookies("a") = a
Response.Cookies("a").Expires = Date + 3650
%>
Wish Pearl - den unike gaven