I don't know the target user but test on the ip to know if the user has already voted is not a good strategy:
- Different user can have the same ip if they are behind a proxy (at work for example) so if one user votes the other are not able to vote anymore.  
- On mobile device, IP can change fairly frequently

I think you should use a Cookie instead.