Krishan Posted June 9, 2001 Posted June 9, 2001 The cookie I'm setting in the browser is the Client IP. code: [FMP-SetCookie: LoginCookie={ClientIP}] I want the cookie to be a unique, fairly complex I.D. which is hard to guess or figure out. But I don't want to use calculation fields.... Do you have any ideas? Thank you!
Garry Claridge Posted June 9, 2001 Posted June 9, 2001 Maybe concatenate the time to the IP! If you use Javascript you can contrive some complex numbers. Garry
Krishan Posted June 9, 2001 Author Posted June 9, 2001 thanks... would you be able to explain further?
Garry Claridge Posted June 10, 2001 Posted June 10, 2001 This is what I had in mind: [FMP-SetCookie: mycookie1={ClientIP}{CurrentDate}{CurrentTime}] However, I had problems including the long version of CurrentTime with the intra tag, hence the seconds were omitted which meant that the value would have a low chance of being unique. Secondly value contents were a bit obvious. The Javascript version is: <script>myDate = new Date();document.cooke = "mycookie1=" + myDate.getTime();</script> This sets the value as an integer representing the date and time in miliseconds. (I removed the i in cookie because this message system did not like the word cookie in a Javascript) Both versions can have their values recalled with: [FMP-Cookie: mycookie1] Note, that if you use the Javascript version you will need to keep the cookie name in lowercase for the FMP tag to read it. Hope this helps. Garry
Krishan Posted June 13, 2001 Author Posted June 13, 2001 Thanks a lot Garry! You've been a big help... I'll try it out and see what happens.
Recommended Posts
This topic is 8632 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now