ipify - A Simple Public IP Address API
 

ipify - A Simple Public IP Address API

I came across ipify - A Simple Public IP Address API when I was looking at a way to hide my research links from the normal visitor but have them visible to me.

Some time back I was convinced that if I had outbound links on my pages it would effect my page-ranking. Things have moved on and not only don't I care but I think that search engines such a Google have also moved on. The major problem with outbound links is that visitors having found the link that they were looking for they just move on.

The call to the ipify API returns the string above.

The code for generating the text above was found on the the ipify website. The call to the API is made when the page loads in a synchronous manner.

My requirement is to determine the value of my current IP and then compare it with a stored value. I have the basis of some of this working but I need to bring it all together. To do this I need to understand the API call a little more.

Top

Using the code found by an AI search:

In keeping with other AI generated solutions the data is retrieved and then echoed back to the console, You can see it by pressing F12 (on Edge at least)

The ipify API fetch:

<script>
fetch('https://api.ipify.org?format=json')
.then(response => response.json())
.then(data => {
console.log('Your IP address is:', data.ip);
})
.catch(error => {
console.error('Error fetching IP address:', error);
});
</script>

Links

Link to PDF Disabled

If you require a copy please email tempusfugit.me.uk

Top

References - a note on these

  • ipify.org - https:// www.ipify.org/

Site design by Tempusfugit Web Design -