0

I'm making a strawpoll site. I'm using IP addresses to check if a user already voted on a poll or not. For the moment I'm using an external API with a JSON callback which returns the user IP. The problem here is that some ADBlockers will block the http request to the external site leading in a user "without" an IP bound to him. I would like a function which would give me the user IP without the use of an external site.

Is this possible? And how would I go about implementing it?

georgeawg
  • 48,608
  • 13
  • 72
  • 95
Nathan
  • 11
  • 1
  • "I'm using IP addresses to check if a user already voted on a poll or not." – Terrible idea: Often many people share the same IP address. Often one person has requests passed through a load balanced set of proxies with multiple ip addresses. – Quentin May 12 '18 at 21:24
  • You also seem to be trying to have software running on the user's browser (which is entirely under the control of the user) stop the user from doing something you don't want them to do. This is unlikely to be effective. – Quentin May 12 '18 at 21:25
  • Also, many people interact with one website through more than one IP address. – Andrew Morton May 12 '18 at 21:26
  • For a simple poll, set a cookie. If it has to be more robust, make sure only users that are logged in can vote. – Ibu May 12 '18 at 21:26
  • Doesn't Strawpoll already do that? – Ravenous May 12 '18 at 21:26
  • @Quentin How would you go about checking if a user already voted or not? – Nathan May 12 '18 at 21:35
  • @Ibu A cookie can be deleted which would lead in people being able to vote multiple times on one vote. Users should be able to vote without making an account on the site. – Nathan May 12 '18 at 21:35

0 Answers0