About myPublicIP

myPublicIP is a website that allows you to view information about your IP address, it's a tool that could help you test your VPN connection, it is a tool to see what information your IP may expose about you, it is a tool to get information about other IP addresses you may have found.

HOW IT WORKS

This website is built on the public IP-API, when you connect to the site, the browser sends out a GET request to the IP-API, decodes the JSON response, then displays the results to the webpage. Meaning, OUR server never interacts with your data in any way as the IP data we get isn't coming from our server.

Code example

                fetch('https://ipapi.co/json').then(function(response){
                    return response.json()
                }).then(function(obj){
                    document.getElementById('ipaddress').innerText = obj.ip
                    var location = `${obj.region}, ${obj.country_name} (${obj.country} - ${obj.continent_code})`
                    var location2 = `Timezone: ${obj.timezone}, currency: ${obj.currency_name}(${obj.currency}), ISP: ${obj.org}`
                    document.getElementById('loc1').innerHTML = location
                    document.getElementById('loc2').innerHTML = location2
                }).catch(err => {
                    document.getElementById('success').style.display = "none"
                    document.getElementById('failure').style.display = "block"
                    var message = fmsg[Math.floor((Math.random() * fmsg.length))]
                    console.log(message)
                    document.getElementById('errormsg').innerText = message
                })