導航:首頁 > IDC知識 > 根據域名獲取ip

根據域名獲取ip

發布時間:2020-09-08 18:23:42

1、如何通過域名獲取ip 透過代理

站長工具查詢即可
http://tool.chinaz.com

2、java怎麼通過域名獲取ip地址

import java.net.InetAddress;
import java.net.UnknownHostException;
public class TestInetAddress {
InetAddress myIpAddress = null;
InetAddress[] myServer = null;
public static void main(String args[]) {
TestInetAddress address = new TestInetAddress();
System.out.println("Your host IP is: " + address.getLocalhostIP());
String domain = www.jb51.net;
System.out.println("The server domain name is: " + domain);
InetAddress[] array = address.getServerIP(domain);
int count=0;
for(int i=1; i<array.length; i++){
System.out.println("ip "+ i +" "+ address.getServerIP(domain)[i-1]);
count++;
}
System.out.println("IP address total: "+count);
}
/**
* 獲得 localhost 的IP地址
* @return
*/
public InetAddress getLocalhostIP() {
try {
myIpAddress = InetAddress.getLocalHost();
} catch (UnknownHostException e) {
e.printStackTrace();
}
return (myIpAddress);
}
/**
* 獲得某域名的IP地址
* @param domain 域名
* @return
*/
public InetAddress[] getServerIP(String domain) {
try {
myServer = InetAddress.getAllByName(domain);
} catch (UnknownHostException e) {
e.printStackTrace();
}
return (myServer);
}
}

3、如何通過域名得到其IP

而IP地址則是整個Internet統一的地址標識符,其目的就是屏蔽物理網路細節,使得Internet從邏輯上看是一個整體的網路。在實際的物理傳輸時,都必須先將IP地址「翻譯」為網卡物理地址。y

4、java通過域名獲取IP地址

public String getIP(String name){
InetAddress address = null;
try {
address = InetAddress.getByName(name);
} catch (UnknownHostException e) {
// TODO Auto-generated catch block
e.printStackTrace();
System.out.println("獲取失敗");
}
return address.getHostAddress().toString();
}

5、知道IP地址,如何得到對應的域名

http://whois.hichina.com/

http://www.webmasterhome.cn/whois/

開始--運行--cmd
nslookup
輸入IP地址,會反相解析出域名

6、如何只用C語言,通過域名得到IP地址

#

7、如何通過域名得到IP

最簡單的是通過:運行 > cmd > ping 域名 > 回車執行就可以得到該域名現在解析到什麼IP了;
第二種可以上http://www.ip138.com 這里查詢

8、怎麼通過ip反查域名

ip反向查詢,用nslookup查詢即可查看ip的反向解析記錄


ip反向解析記錄需要聯系ISP(網路提供商)設置

1 對於很多ip都是沒有做反向

2.一個ip可以對於很多域名主機


所有如果要通過ip查找域名不太可取

與根據域名獲取ip相關的知識