Solved

Web page that shows computer name and ip address

Posted on 2004-08-02
10
630 Views
Last Modified: 2008-02-01
I am looking for a simple web page with ASP that a user would browse to that would show their computer name and IP.  I would like it to work with Win 9x if possible.

Thank you for any help,
Bill
0
Comment
Question by:bfisher666
[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
  • 5
  • 3
  • 2
10 Comments
 
LVL 22

Expert Comment

by:neeraj523
ID: 11700856
Hello

This will give you the IP address of the machine opening asp page..

<%=Request.ServerVariables("REMOTE_ADDR")%>

Check for more varaibles..

http://www.webenalysis.com/servervariables.asp

neeraj523
0
 
LVL 7

Expert Comment

by:j2nku
ID: 11700869
You have a web server running on Win 9x??

http://telefonid.com/ipc.asp <- here is an example (it also has the function to get the country from the IP database)

Source of the file (i deleted the GetCountry function)

<%
yourip = Request.ServerVariables("REMOTE_HOST")
      ipaddr=Request.Servervariables("REMOTE_ADDR")
      set obj = CreateObject( "a1asp.dns" )
      host = obj.ReverseDNSLookup( cstr(ipaddr) )
      If len(host) > 0 Then ipaddr = host
      Set obj = nothing
%>Your IP is: <%=yourip%><br>
DNS returned: <%=ipaddr%><br><%
%>

I used here a1asp.dns to get the DNS for the IP address.
0
 

Author Comment

by:bfisher666
ID: 11700890
j2nku,
That is exactly what I wanted ... but .... I'm an idiot how do I wrap that into HTML ?

extreme novice,
Bill
0
Salesforce Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.

 
LVL 22

Expert Comment

by:neeraj523
ID: 11700936
Hello

I don't think it is possible to resolve an IP Address without using any third party component to do so..

neeraj523
0
 

Author Comment

by:bfisher666
ID: 11700952
Is this how it is supposed to look?
----------------------------------
<html>
<head>
<title>IP Test</title>
</head>
<body bgcolor="#000000" text="#FFFFFF">
<%
yourip = Request.ServerVariables("REMOTE_HOST")
     ipaddr=Request.Servervariables("REMOTE_ADDR")
     set obj = CreateObject( "a1asp.dns" )
     host = obj.ReverseDNSLookup( cstr(ipaddr) )
     If len(host) > 0 Then ipaddr = host
     Set obj = nothing
%>Your IP is: <%=yourip%><br>
DNS returned: <%=ipaddr%><br><%
%>
</body>
</html>
0
 
LVL 7

Expert Comment

by:j2nku
ID: 11700968
bfisher, it's a server-side script - running on win2k3 and a1asp is a third-party COM component as neeraj said (it's possible, if i remember, to resolve DNS in .net?)

Only way i know how to show it in HTML is to use external provider (let's say - me at the moment)
and put into your HTML code the following line:

<iframe src="http://www.telefonid.com/ipc.asp" frameborder=0 scrolling=0 width=300 height=180>Iframe not supported!</iframe>

Of course, you can't use my file as a solution because you never know when i'm going to change it or remove it.

I suggest you - find a friend who has server running, ask him/her to write a short script for IP and DNS and include it to your page using iframe.
0
 
LVL 22

Expert Comment

by:neeraj523
ID: 11700972
Hello  bfisher666

if you have 'aiasp' component installed on ur wbe server.. than this code is fine and should work..

neeraj523
0
 
LVL 7

Expert Comment

by:j2nku
ID: 11700976
Yes, it's right, but now you must get a1asp.dns from somewhere - i know that a month ago i couldn't find it anymore from the internet (the download page was removed) but i may have it zipped somewhere on my hdd or server. I'll take a search.
0
 
LVL 7

Accepted Solution

by:
j2nku earned 500 total points
ID: 11700997
Ok, i found it on my server and packed it (http://www.telefonid.com/a1asp.dns.rar)
Unpack it to let's say ... C:\Program Files\a1asp.dns
and then go to command line (on your server of course)
and write
regsvr32 "C:\Program Files\a1asp.dns\a1asp.dns.dll"

There is a readme also in the packed file.
0
 
LVL 7

Expert Comment

by:j2nku
ID: 11701012
I must warn you, i'm going to remove this file soon - i'm not sure if it is free to download and share in the internet.

But i hope the solution worked.
0

Featured Post

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

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

I have helped a lot of people on EE with their coding sources and have enjoyed near about every minute of it. Sometimes it can get a little tedious but it is always a challenge and the one thing that I always say is:   The Exchange of informatio…
Hello, all! I just recently started using Microsoft's IIS 7.5 within Windows 7, as I just downloaded and installed the 90 day trial of Windows 7. (Got to love Microsoft for allowing 90 days) The main reason for downloading and testing Windows 7 is t…
There's a multitude of different network monitoring solutions out there, and you're probably wondering what makes NetCrunch so special. It's completely agentless, but does let you create an agent, if you desire. It offers powerful scalability …
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…

634 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