Every plugin I have tried such as “IP & Address Lookup by Zeroqode” or “Ipiphy by bubble” can be easily blocked by adblockers and browsers such as Brave because they are seen as cross-site trackers. Users using adblockers usually do not need to do anything for this to work, as most adblockers and indeed Brave block these plugins by default as cross-site trackers. I attempted to use “https://api.myip.com/” however that prompted a CORS issue from bubble which read as a 403 error. Since more and more people are using adblockers, is there anything more reliable I can do? I had planned to add VPN / Tor detection to my website, but there is not much point in this if IP’s can be so easily hidden by downloading almost any adblocker. Just looking for a better way to capture a users address. Thanks in advance!
simple answer, no.
if a user wants to block you from seeing their ip, there is nothing you can do.
How is that even possible? The user is connecting to my server. Certainly the server must know what their IP address is.
I use a workaround now. When the IP comes up as empty I just display a popup that blocks them from accessing the site. Usually it’s only people using the browser “brave” so i just ask them to turn off their shield to continue.
That gets you the user’s IP address, and doesn’t get hung up with CORS. It’s not perfect - sometimes it’ll return the IPv6 address, and I’m not exactly sure how to prevent that. But it works. Not sure if that’s clear enough. Let me know if not and I’ll elaborate.