jsp get ip address

后端 未结 6 1731
挽巷
挽巷 2020-12-20 03:15

whats the best way of preventing someone from voting twice? How do i get the users ip address? What if they are on a large network? will everyone on that network show the sa

6条回答
  •  佛祖请我去吃肉
    2020-12-20 04:04

    You can get the IP address with request.getRemoteAddr(). If the network is using a NAT router, all users will get the same address though

提交回复
热议问题