I am connected to a lan.. I can access internet. using the browser I can find my public ip using the search "what is my ip".
I want to get the public ip using php
I am running the script in my localhost
wamp server..
I tried:
$_SERVER['REMOTE_ADDR'] and $_SERVER['SERVER_ADDR']` both give me `localhost ip ::1
Is there any networking functions that can give me my public ip address?
is there any way without using any external service? because if I use an external service, it may not available in the future.