Jump to content

Please Help: Unique Cookies


This topic is 8442 days old. Please don't post here. Open a new topic instead.

Recommended Posts

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! smile.gif" border="0

Link to comment
Share on other sites

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

Link to comment
Share on other sites

This topic is 8442 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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.