Re: [問題] 如何在網頁上用Applet顯示使用者ip
※ 引述《vincewen (Zafe)》之銘言:
: 小弟最近在研究JAVA網路相關的一些內容
: 利用InetAddress myaddress = InetAddress.getLocalHost();
: 在自己電腦跑(cmd或JFrame)可以成功取出電腦的IP
: 想說改寫成applet的方式,但是最後顯示出來只有localhost 127.0.0.1
: 不論至丟上上傳空間或直接用電腦開都一樣
: 請問是否可以請高手幫忙指點一下癥結點 以及要如何解決
: 上網有找到我想要做出的功能的網頁 但似乎不提供原始碼
: http://reglos.de/myaddress/MyAddress.html
: 感謝回答^^
http://docs.oracle.com/javase/1.4.2/docs/
api/java/net/InetAddress.html#getLocalHost()
Returns the local host.
If there is a security manager,
its checkConnect method is called with the local host name and
-1 as its arguments to see if the operation is allowed.
If the operation is not allowed,
an InetAddress representing the loopback address is returned.
我沒有實際測試過,不過看到這段文字
我至少會先把 applet 給 sign 過試試看
如果還是不行,那我會在文章當中告訴大家我已經 sign 過了
--
錢鍾書: 說出來的話
http://www.psmonkey.org
比不上不說出來的話
Java 版 cookcomic 版
只影射著說不出來的話
and more......
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 220.135.202.140
推
01/28 20:09, , 1F
01/28 20:09, 1F
推
01/28 21:00, , 2F
01/28 21:00, 2F
推
01/29 00:22, , 3F
01/29 00:22, 3F
推
01/29 00:25, , 4F
01/29 00:25, 4F
→
01/29 00:35, , 5F
01/29 00:35, 5F
→
01/29 00:37, , 6F
01/29 00:37, 6F
推
01/29 01:10, , 7F
01/29 01:10, 7F
→
01/29 01:13, , 8F
01/29 01:13, 8F
→
01/29 11:16, , 9F
01/29 11:16, 9F
→
01/29 11:18, , 10F
01/29 11:18, 10F
推
01/29 16:06, , 11F
01/29 16:06, 11F
→
01/29 16:11, , 12F
01/29 16:11, 12F
→
01/29 22:04, , 13F
01/29 22:04, 13F