Those functions are returning the names/IP's that are registered in whatever DNS your app is querying, which is probably only going to be the local LAN address. If you're trying to get an external IP address that your ISP has assign to your network/router/modem/whatever, then you have to use an external web site to provide that IP for you, like
http://whatismyipaddress.com/[
^]