Welcome Guest ( Log In | Register)



 
Closed TopicStart new topic
> Show Ip Address [resolved]
kvarnerexpress
post Mar 7 2006, 10:01 PM
Post #1


Super Member
*********

Group: Members
Posts: 407
Joined: 13-December 04
Member No.: 2,696



Is there a way to show a user's remote ip address if they are behind a router using nat in a vb application. So far I have tried screen scraping www.whatismyip.com but in the textbox it show's from the start of the webpage to the end of the ip address (I can't get it show starting from the ip address to the end of the address). Any idea's or code would be very helpful.
Go to the top of the page
 
+Quote Post
OpaQue
post Mar 8 2006, 12:56 AM
Post #2


Administrator
Group Icon

Group: Admin
Posts: 1,443
Joined: 11-June 04
From: Somewhere in Time & Space.
Member No.: 1



JAVA is the only way in which you can GET the REAL IP address being used by your website client.

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. smile.gif

This is the best method to get real information about the visitor. I hope, I have got your question right.
Go to the top of the page
 
+Quote Post
Inspiron
post Mar 8 2006, 06:01 AM
Post #3


Trap Grand Marshal Member
***********

Group: Members
Posts: 1,205
Joined: 25-March 05
Member No.: 4,883



Here's the code for Java, JSP and Servlet.

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();
  }


Go to the top of the page
 
+Quote Post
BuffaloHELP
post Mar 8 2006, 07:41 AM
Post #4


Desperately seeking "any key" to continue...
Group Icon

Group: Admin
Posts: 3,418
Joined: 23-April 05
From: Trap17 storage box
Member No.: 6,042



Somehow I knew bookmarking this page would come handy someday. Since Trap17 supports PERL this site explains how to write for PERL.

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.
Go to the top of the page
 
+Quote Post
jibnet
post Jun 5 2006, 09:02 AM
Post #5


Member [Level 1]
****

Group: Members
Posts: 53
Joined: 4-June 06
Member No.: 24,718



Just read about Java and VB.. i am thinking of learnig one of them.. Which one do you all recommend??
Go to the top of the page
 
+Quote Post
adiaz01
post Oct 14 2007, 04:22 PM
Post #6


Newbie
*

Group: Members
Posts: 7
Joined: 30-September 07
Member No.: 50,874



QUOTE(jibnet @ Jun 5 2006, 05:02 AM) *
Just read about Java and VB.. i am thinking of learnig one of them.. Which one do you all recommend??


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!!




Go to the top of the page
 
+Quote Post
velma
post Oct 14 2007, 05:55 PM
Post #7


Super Member
Group Icon

Group: [MODERATOR]
Posts: 447
Joined: 14-March 07
From: Trap17 forum :)
Member No.: 40,018
Spam Patrol



Topic is resolved.

Please PM any moderator to continue this discussion. Until then, this topic is closed.
Go to the top of the page
 
+Quote Post

Closed TopicStart new topic

Collapse

> Similar Topics

Topics Topics
  1. Windows Address Book(2)


 



- Lo-Fi Version Time is now: 5th July 2008 - 03:44 AM