/    Sign up×
Community /Pin to ProfileBookmark

Validation/Limit Access with IP Address

Hello all! I’m trying to figure out how to do a little something. I’ve created an online survey and my boss wants to prevent multiple submissions from one person based on IP address. Would anyone here happen to know how to do that with Javascript? ? I’ve seen some things that were similar in the forms listing already, but none seemed to be exactly what I’m looking for. Thanks in advance for any help! ?

Sharra

to post a comment
JavaScript

9 Comments(s)

Copy linkTweet thisAlerts:
@Khalid_AliJul 17.2006 — no, you can not do this directly using JavaScrtipt. A Server side solution should be used.
Copy linkTweet thisAlerts:
@felgallJul 17.2006 — 
  • 1. Javascript has no access to know the IP address unless a server side script provides it.


  • 2. More than one person can have the same IP address at different times (using the same ISP) or even at the same time (on the same local network).


  • 3. The same person can have different IP addresses at different times.
  • Copy linkTweet thisAlerts:
    @ejrhodesJul 17.2006 — Another thing you can do at the top of your survey is write a cookie. Before submitting the form, check the value of the cookie, if it is present, dont submit the form. Sure if somene wants to deliberately screw with your survey this wont stop them, but this will prevent someone from hitting submit. To prevent someone from hitting refresh and reposting the data, you should look for the cookie before writing to the survey table on the server side.
    Copy linkTweet thisAlerts:
    @slaughtersJul 17.2006 — The cookie suggestion by ejrhodes is a much better solution to what you want to do than the IP address idea.
    Copy linkTweet thisAlerts:
    @Amoranth1authorJul 18.2006 — I wish then that I knew how to write a cookie... Well, I sort of know how to write a basic one that will expire in 10 days... But I don't know the code that will prevent form submission from a computer containing the cookie. ? If any of you happen to know that kind of code, I'd appreciate the aid. If not, I will posit the suggestion to the webmaster of the site I'm working for. He might know something. I also looked at the various validation for e-mail javascripts that were under the form list from the main page. Since I'm not so sure about the cookie, is there a particular one of those you would suggest that might work? Wouldn't prevent more than one submission from the same person if said person has more than one e-mail account (like I do myself), but we could at least maybe prevent fake e-mail entries and possibly duplicate ones? Let me know what you think! Thanks!

    Sharra ?
    Copy linkTweet thisAlerts:
    @Amoranth1authorJul 18.2006 — This might help you: http://wsabstract.com/script/script2/displayip.shtml[/QUOTE]


    I took a look at this, Slaughters... I was wondering what exactly it might do. Does it display the IP address of the sender in the results sent to me? Or does it do something else? I'm sorry, I know very little about actual Javascript... Certainly, I don't know how to write it. Sorry to be such a bug. I'm just way out of my league with this... ?
    Copy linkTweet thisAlerts:
    @felgallJul 18.2006 — Any of your visitors can disable cookies in order to get around any such checking for multiple posts. They can also use a different IP address to get around that too.

    The only way to enforce one entry per user is to set up a members area and have people sign up for an account there. You can then limit it to one vote per account and perform checking to try to detect multiple accounts set up by the same person via server side processing.
    Copy linkTweet thisAlerts:
    @Amoranth1authorJul 20.2006 — *sigh* Well, then I guess we're stuck with what we've got. We can't make it a members only thing because it's an anonymous survey. I was just hoping to prevent some 12 year old computer geek from abusing it to pad the results to win the prize. Oh well. I have tried everything that I know of. If we get messed, we get messed... I could wish for other wise, but that is apparently not going to be possibly with the limited tech-knowledge I have. Thanks for trying.
    ×

    Success!

    Help @Amoranth1 spread the word by sharing this article on Twitter...

    Tweet This
    Sign in
    Forgot password?
    Sign in with TwitchSign in with GithubCreate Account
    about: ({
    version: 0.1.9 BETA 5.18,
    whats_new: community page,
    up_next: more Davinci•003 tasks,
    coming_soon: events calendar,
    social: @webDeveloperHQ
    });

    legal: ({
    terms: of use,
    privacy: policy
    });
    changelog: (
    version: 0.1.9,
    notes: added community page

    version: 0.1.8,
    notes: added Davinci•003

    version: 0.1.7,
    notes: upvote answers to bounties

    version: 0.1.6,
    notes: article editor refresh
    )...
    recent_tips: (
    tipper: @AriseFacilitySolutions09,
    tipped: article
    amount: 1000 SATS,

    tipper: @Yussuf4331,
    tipped: article
    amount: 1000 SATS,

    tipper: @darkwebsites540,
    tipped: article
    amount: 10 SATS,
    )...