I would think one of dynamic DNS client utilities might do this... Check through the list here and see if any allow running an external command on detection ...
Internet Protocol (IP) is a numerical identifier for every gadget or network for users accessing the internet. The IP address of a user contains information like location, network identification, ...