Solved

Show clients IP address or mac address on web page

Posted on 2014-11-16
11
137 Views
Last Modified: 2014-12-28
I need to able to display the users IP Address or preferably the mac address on a web page which will also be submitted along with other info for registration purposes. I did this A while back and I believe it was with ASP but can not remember the procedure. Thanks for any help.
0
Comment
Question by:ChuckT
11 Comments
 
LVL 3

Expert Comment

by:Richard Obenchain
ID: 40446174
You can use request server variables (in ASP, it is "Request.ServerVariables["REMOTE_ADDR"]") to get the IP of the remote machine, but unless it's on a local network where you can use ARP to look up the MAC, you're not going to get a MAC without running some kind of client-side app (java or something).
0
 
LVL 83

Expert Comment

by:Dave Baldwin
ID: 40446209
If this is on a publicly accessible web page on the internet, you will only get the public IP address.  If the client is on a LAN that connects to the internet thru a router and/or modem, you will not see their LAN IP address.  And if there is more than one computer on that LAN, all the computers will appear to have the same IP address which will be the public IP address.  In that case it will Not be a unique identifier.
0
 

Author Comment

by:ChuckT
ID: 40446281
clients are on the same subnet as the webserver. I put that exactly as you put it but it shows on the page as well as in the code. Not working. What am I missing.
0
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 
LVL 83

Expert Comment

by:Dave Baldwin
ID: 40446291
Did you name the file "*.asp" so the ASP interpreter will run it?
0
 

Author Comment

by:ChuckT
ID: 40446309
yes I put it in my existing asp file which send the Users name and email address to me.
0
 
LVL 83

Accepted Solution

by:
Dave Baldwin earned 500 total points
ID: 40446323
While I'm sure that it is available, you can run this short program that displays all of the available server variables.  Note the use of 'Response.Write' to get them to show on the page.
<%@ LANGUAGE = VBScript %>
<%  Option Explicit		%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
 "http://www.w3.org/TR/html4/loose.dtd">

<html>
<head>
<title>ASP Server Variables</title>
</head>
<body>
<h1>ASP Server Variables</h1>
<%
Dim item

For each item in Request.ServerVariables
	Response.Write "<b>" & item & "</b>: " _
	& Request.ServerVariables(item) _
	& "<br>" & vbCrLf
Next

	Response.Write "<b>PATH_INFO</b>: " _
	& Request.ServerVariables("PATH_INFO") _
	& "<br>" & vbCrLf

%>

</body>
</html>

Open in new window

0
 
LVL 58

Expert Comment

by:Gary
ID: 40521214
I've requested that this question be deleted for the following reason:

Not enough information to confirm an answer.
0
 

Author Comment

by:ChuckT
ID: 40521210
Solutions were accepted a while back . why does this still show as open.
0
 
LVL 83

Expert Comment

by:Dave Baldwin
ID: 40521225
Thanks for the points!!
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
HTTP POST URL 2 95
WEB Service vs ??? 7 117
Does any one know WordPress plugin for maintenance but enable user to check site 4 64
Authentication of Web Services 3 74
Preface This is the third article about the EE Collaborative Login Project. A Better Website Login System (http://www.experts-exchange.com/A_2902.html) introduces the Login System and shows how to implement a login page. The EE Collaborative Logi…
Introduction Since I wrote the original article about Handling Date and Time in PHP and MySQL (http://www.experts-exchange.com/articles/201/Handling-Date-and-Time-in-PHP-and-MySQL.html) several years ago, it seemed like now was a good time to updat…
Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

773 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