各位好, 請問如何在前端透過host name取得IP address, 類似windows cmd "nslookup" 功能
例如: www.google.com -> 172.217.24.4
有找到ipify API, 但這似乎是執行時才取得local IP
<script type="application/javascript">
function getIP(json) {
document.write("My public IP address is: ", json.ip);
}
</script>
<script type="application/javascript" src="https://api.ipify.org?format=jsonp&callback=getIP"></script>