About Small php library to query current external IP Installation In composer.json { "require": { "martinlindhe/php-myip": "~0.2" } } Usage $ip = MartinLindhe\MyIp\IpProvider\IpProvider::factory() ->getIPv4();