The jopin project Allows you to log your IP to a database and retrieve it afterwards. With options for multiple "users", read and write passwords, an IP history and setting an IP parameter or just saving the originating IP.
Accepted urls are
where the get gets and the put puts the ip adress for the specified id.
An example of how to use this data in a script is Oberon.sh on the bash page.
There are also the following optional parameters

This work is licensed under a
Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License.
Use this code at your own peril; I am not responsible for anything that happens to you or your devices. You re a big boy or girl, please do some research before using it if you have any concerns!