|
|
Show Ip Address [resolved] | ||
Discussion by kvarnerexpress with 6 Replies.
Last Update: October 14, 2007, 10:55 am | |||
![]() |
|
|
By JAVA, I mean those real applets and not javascript. I have forgotten how JAVA gets to know the real IP, but for some reason, it bypasses the proxy.
All you have to do is, get the Java applet call one of your php scripts to record its IP.
This is the best method to get real information about the visitor. I hope, I have got your question right.
CODE
import java.net.*;
import java.io.*;
import java.applet.*;
public class GetClientIP extends Applet {
public void init() {
try {
InetAddress thisIp =
InetAddress.getLocalHost();
System.out.println("IP:"+thisIp.getHostAddress());
}
catch(Exception e) {
e.printStackTrace();
}
}
}
<HTML><HEAD></HEAD><BODY>
<APPLET CODE="GetClientIP.class"
HEIGHT=10 WIDTH=10>
</APPLET>
Check JAVA console for output
</BODY></HTML>
The Servlet
CODE
public void service(HttpServletRequest req, HttpServletResponse res)
throws IOException {
String IP = req.getRemoteAddr();
}
http://www.chami.com/tips/internet/041498I.html
I'm not sure if it really detects the true IP but it has been working correctly in identifying my IP address--and I'm behind 3 firewalls and 2 routers, which something I heard that it hinders IP address for some scripts.
QUOTE (jibnet)
Just read about Java and VB.. i am thinking of learnig one of them.. Which one do you all recommend??Link: view Post: 256391
Just my opinion, if you're going to code for a network/company/clients that has Microsoft all over, with no doubt VB.
if you're going to program for an internet audience with many different Operating Systems like Linux, Mac & Windows you will
be safer with Java. You can't program in VB fo Mac or Linux anyway.
A few facts:
if you learn VB you can interact with Windows Script Host (like shells on linux) MS-SQL scripts (to create automated task inside SQL server) , Office Suite and IIS (the apache for windows). all of the previous used the same code, so you can cover a lot more territory and also most of the connections and libaries are built-in VB or shared as components. this is usefull when you interact with mortal users and Office Suite
If you learn Java you can go wider but more complex programming and connections, I'm not very good with Java but every time I tried to used it (maybe becuase I interact more with windows applications) I've found that Java is more complex and longer.
It really depends on what you need to do. Java was the Panacea years ago for interaction between plataforms and still is and now is OpenSource maybe somebody can do something to speed up the runtime process.
Hope this help!!
Please PM any moderator to continue this discussion. Until then, this topic is closed.
Similar Topics:
How To Get New Ip Address
Destination Address For quot submi...
Changing Ip Address
Option Button (2)
|
(6) Need Some Help With The Com Port
|
Loading...
HOME ![Quickly Post to Show Ip Address [resolved] w/o signup](http://xisto.cachefly.net/ks/template/x/html//images/reply.png)

![email your friend about Show Ip Address [resolved]](http://xisto.cachefly.net/ks/template/x/html//images/email.png)




