Do not clean whatismyip.com, see here for what you can call their API, which simply returns your address.
If you are not using this, you should write something like this yourself, that is, a node outside of your router that can communicate your visible address.
Please note that the web server may not see your real WAN IP address because:
Your Internet service provider may be transparently proxying HTTP traffic, and the server will see the IP address of the proxy. In this case, you usually need to search and analyze
X-Forwarded-For .
, , NAT- , , WAN . , , whatismyip.com, - IP- NAT.