S
stec00
I have an javascript application that needs to generate a unique ID
that will identify the client. It doesn't really matter what this ID
is, a number, string or even set of ascii codes would be fine - as
long as it is unique or nearly unique. The ID needs to be something
that can be worked out just from the client's info. Ideally it would
be done in straight javascript but if this isn't possible I'd even
consider an AJAX request that got the info from a server. I've got a
server that's running PHP so this would be the preferred server side
language if that option is chosen.
Anyway I'm racking my brains trying to work out how to do this. In
Javascript I've been considering whether it might be possible to use
some combination of UserAgent components but UserAgent doesn't really
provide very much that would be unique and the snag is it might change
if say the user changed their add-ons or version of Firefox etc. (We
can assume the user is running Firefox here since this is for a
GreaseMonkey script). I'd hoped there might be some way to get the
user's MAC address (it only has to be unique for the computer being
used) but it seems this isn't possible to get hold of using Javascript
or PHP. In PHP I'd considered using the IP address but this isn't
necessarily going to stay the same over time, which is another
requirement.
So I'm running into quite a few dead ends and now turning to Internet-
land for help...Can anyone think of a way? Would be grateful for any
suggestions.
Cheers,
Steve
that will identify the client. It doesn't really matter what this ID
is, a number, string or even set of ascii codes would be fine - as
long as it is unique or nearly unique. The ID needs to be something
that can be worked out just from the client's info. Ideally it would
be done in straight javascript but if this isn't possible I'd even
consider an AJAX request that got the info from a server. I've got a
server that's running PHP so this would be the preferred server side
language if that option is chosen.
Anyway I'm racking my brains trying to work out how to do this. In
Javascript I've been considering whether it might be possible to use
some combination of UserAgent components but UserAgent doesn't really
provide very much that would be unique and the snag is it might change
if say the user changed their add-ons or version of Firefox etc. (We
can assume the user is running Firefox here since this is for a
GreaseMonkey script). I'd hoped there might be some way to get the
user's MAC address (it only has to be unique for the computer being
used) but it seems this isn't possible to get hold of using Javascript
or PHP. In PHP I'd considered using the IP address but this isn't
necessarily going to stay the same over time, which is another
requirement.
So I'm running into quite a few dead ends and now turning to Internet-
land for help...Can anyone think of a way? Would be grateful for any
suggestions.
Cheers,
Steve