How to find IP address using HTML?

随声附和 提交于 2019-12-12 03:05:45

问题


I am trying to find the IP address using HTML coding but I cannot. Is it possible to find the IP address in HTML without using JavaScript or PHP?

ping -a ip-adress

It displays ping only


回答1:


PHP is required - with HTML only its not possible.




回答2:


If Apache is set to resolve IP addresses, then you can use <!--#echo var="REMOTE_HOST" -->. However, it is unlikely that your host has that option enabled, because it makes requests take longer.




回答3:


You're right, it is not possible in pure HTML/Javascript.Did you need local IP of PC where browser is running on or remote PC of user which is connected to web server?




回答4:


If you insist, you can create an iframe to load the IP and the iframe page will use JavaScript or php etc.. to make the result.



来源:https://stackoverflow.com/questions/8700730/how-to-find-ip-address-using-html

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!