For example i send a request to https://www.w3schools.com/ which is showed Remote Address: 192.229.179.87:443 on Inspect tools, can i get that ip in js?
-
https://stackoverflow.com/questions/391979/how-to-get-clients-ip-address-using-javascript/45549790 – Amit Baranes Apr 28 '19 at 08:26
-
I want to get ip of domain in client side, not client ip, is this possible? – John Doe Apr 28 '19 at 08:34
-
you could use api like https://www.domaintools.com/resources/api-documentation/reverse-ip – Tom Berghuis Apr 28 '19 at 09:01
1 Answers
An IP address or Internet Protocol is used in hand with TCP(Transmission control protocol) to identify and share information between computers on the internet. Because it would be a very hard job for humans to keep IP's of various servers in the head, all IP addresses are saved on a DNS server together with their domain names. Hence, whenever you make a request to a site in your web browser, the web browser first visits a DNS server to fetch the IP address corresponding to your domain before making a direct request to the server. Hence there is no Javascript code or command to generate IP addresses from domain names. Hence to accomplish this, you'll have to use an API which will do all the hard work for you.
Check this question for some API's : API's for getting IP

- 630
- 9
- 13