Solved

Show clients IP address or mac address on web page

Posted on 2014-11-16
11
148 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
[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
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
When ransomware hits your clients, what do you do?

MSPs: Endpoint security isn’t enough to prevent ransomware.
As the impact and severity of crypto ransomware attacks has grown, Webroot fought back, not just by building a next-gen endpoint solution capable of preventing ransomware attacks but also by being a thought leader.

 
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

Secure Your WordPress Site: 5 Essential Approaches

WordPress is the web's most popular CMS, but its dominance also makes it a target for attackers. Our eBook will show you how to:

Prevent costly exploits of core and plugin vulnerabilities
Repel automated attacks
Lock down your dashboard, secure your code, and protect your users

Question has a verified solution.

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

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…
SASS allows you to treat your CSS code in a more OOP way. Let's have a look on how you can structure your code in order for it to be easily maintained and reused.
Viewers will learn about arithmetic and Boolean expressions in Java and the logical operators used to create Boolean expressions. We will cover the symbols used for arithmetic expressions and define each logical operator and how to use them in Boole…
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

738 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