?
Solved

How to get Remote Host IP

Posted on 1998-02-01
8
Medium Priority
?
395 Views
Last Modified: 2013-11-13
Hi all,

I am writing a control, that after being downloaded, will return the server IP that the client browser is connected to. I have tried using Winsock.RemoteHostIP but it gives me a blank string. What else should I do?

Any clues/help given is much appreciated please :)    
0
Comment
Question by:janeb
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
  • 2
  • +1
8 Comments
 
LVL 8

Expert Comment

by:mrmick
ID: 1454891
I am trying to figure out what exactly is the question.  Are you asking how to gain access to the browser's URL or are you asking how to parse the domain name from the URL or are you asking how to get an IP address from a known domain name?
0
 
LVL 6

Expert Comment

by:anthonyc
ID: 1454892
The winsock control actually has to be connected as a host for remotehostip to do something.   That's why that doesn't work.  I don't understand what you are asking.
0
 

Author Comment

by:janeb
ID: 1454893
Sorry for not making it clear.

When a html page (which has my ActiveX control embedded in it) is downloaded, I need the control to obtain the IP address of the server where the page is coming from. Are there any functions inside VB5 to do this? Or I need to use VBS or JS to read the IP then pass it into the control - that is if the scripts can do it.

Hope this is clearer, thanks!
0
Get real performance insights from real users

Key features:
- Total Pages Views and Load times
- Top Pages Viewed and Load Times
- Real Time Site Page Build Performance
- Users’ Browser and Platform Performance
- Geographic User Breakdown
- And more

 
LVL 6

Expert Comment

by:anthonyc
ID: 1454894
Are you using IIS 4.0 or 3.0 on the backend server?  If you are, you could use active server pages to create server side code that can get the IP, then pass it to your control.
0
 

Author Comment

by:janeb
ID: 1454895
Thanks for the comment, but what if I'm using Unix platforms?
0
 
LVL 6

Expert Comment

by:anthonyc
ID: 1454896
I am not too up to speed on UNIX Webservers.
0
 

Accepted Solution

by:
HexMan earned 100 total points
ID: 1454897
You have to get the client IP just after the connection is made.
In the ConnectionRequest just after accepting the connection, then you can get the IP like:

othercomputer$ = Winsock1.RemoteHost
0
 

Expert Comment

by:HexMan
ID: 1454898
Oh, sorry, I thought you were writing a server program, not a client. I guess my answer isn't any help to you. Oh well
0

Featured Post

Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you haven’t already, I encourage you to read the first article (http://www.experts-exchange.com/articles/18680/An-Introduction-to-R-Programming-and-R-Studio.html) in my series to gain a basic foundation of R and R Studio.  You will also find the …
When we want to run, execute or repeat a statement multiple times, a loop is necessary. This article covers the two types of loops in Python: the while loop and the for loop.
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.
Suggested Courses

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question