Solved

How to get Remote Host IP

Posted on 1998-02-01
8
367 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
  • 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
 
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
Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

 

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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
The goal of this video is to provide viewers with basic examples to understand and use conditional statements in the C programming language.
This video teaches viewers about errors in exception handling.

758 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now