Solved

Web page that shows computer name and ip address

Posted on 2004-08-02
10
622 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
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Obtaining data on ASP 8 35
Insert Button on a table 16 47
Display if field is NOT "" or NOT null 6 22
Html split(text) 2 27
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…
Have you ever needed to get an ASP script to wait for a while? I have, just to let something else happen. Or in my case, to allow other stuff to happen while I was murdering my MySQL database with an update. The Original Issue This was written…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …

735 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