Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Web page that shows computer name and ip address

Posted on 2004-08-02
10
Medium Priority
?
643 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
Technology Partners: 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 2000 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

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

I recently decide that I needed a way to make my pages scream on the net.   While searching around how I can accomplish this I stumbled across a great article that stated "minimize the server requests." I got to thinking, hey, I use more than one…
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…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…

722 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