I am trying to set a dynamic DNS for my phone and I have created a hostname on no-ip.com with the name: sdfgcs.ddns.net. When I use the online tools to resolve the IP, I get the correct ans: 111.65.61.78. However, if I use the nslookup or gethostbyname function, it shows
Server: 127.0.1.1
Address: 127.0.1.1#53
Non-authoritative answer:
Name: sdfgcs.ddns.net
Address: 111.65.38.226
which is the original ip address when the ddns is set. It seems that the gethostbyname function is not able to get the update IP address. Can someone please suggest what may be the problem? Thanks a lot.