Look! You just got an useless local IP 192.168.x.x.
- Where is your current WAN IP? Click here. Now you got a your real IP, at right now.
- Why this happens? See the explanation here. The reason is your router. It determines the IP in WAN, but you or your code can only get it a LAN IP from it.
- How let your script get the WAN IP? Try this! "curl http://whatismyip.com/automation/n09230945NL.asp". Of course, you need to install the curl at first.
- How to let your code get WAN IP? Use libcurl.
No comments:
Post a Comment