dmartens Posted December 11, 2002 Posted December 11, 2002 I've been working on an online poll using Filemaker & CDML. I have it working, however I'd like to limit users to one vote per hour. I was able to do this using [FMP-ClientIP] to set the IP address of the voter in the database and then compare the creation date & time of the latest record created by that client using a JavaScript. When a client votes they first do a search for records with their IP address & date & question ID. If no records are found the vote is cast. If records are found then creation times are compared with the current time & either the vote is cast, or a message appears to try again later. This seems to work fine for clients with real IP addresses, but if the client is behind a proxy or firewall then the IP address which is returned by [FMP-ClientIP] is the address of the router (or proxy). Is there a way to capture the actual IP address of the client. Or is there a more elegant way to handle the client validation?
Steve T. Posted December 11, 2002 Posted December 11, 2002 Hi, dmartens! If this is a public poll and you don't have a unique identifier of any kind, you may want to consider using a cookie instead of checking IP's. You can make it so there can be only 1 vote per session. Bozos could still corrupt your poll, but they would have to quit and relaunch their browsers each time and that may be enough of a deterrent. This isn't a shoe poll on doc martens, is it? LOL!
dmartens Posted December 16, 2002 Author Posted December 16, 2002 That was the answer. Thanks. Though I couldn't get the Web Companion to set a cookie properly in IE (it set the expire time incorrectly). I used a Java Script to set the cookie & check the cookie before submitting the votes.
balooka Posted January 3, 2003 Posted January 3, 2003 hi, I use cookies for remembering reged users (login/logout/change language). works perfectly well. About the resetting the cookies: if I got to prefs in IE, I can delete the cookies and go back to the page right away. No need to relaunch, just to reload. [i'm on a Mac though]. JP
Recommended Posts
This topic is 7987 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