It seems it's impossible to detect a visitor's IP using JS. But I have a feeling there is a workaround which can get it.
For example, the JS does an AJAX request which runs a PHP script on a server which is then able to access the IP address via $_SERVER['REMOTE_ADDR'] or $_SERVER['REMOTE_HOST'], and then the IP address is returned to the script, or something like that.
So this is my project:
Try to find some JS which can detect the visitor's IP address. If this is not possible, then try to come up with a trick (e.g. as described above, or anything else which you think will work) which can get the IP address and make it available within a JS script.
22 Freelancer bietetn im Durchschnitt $73 für diesen Job an
Hi, Your solution is perfectly fine and it is what I thought about when reading your title. I also found another solution that works with firefox and chrome. I'd be glad to provide a demo if you ask me
Hi! i Have already have a solution with json request to jsonip service. please check atached files.. P.S. cant attach files, please write PM to me and i will send you files