Solved

Show clients IP address or mac address on web page

Posted on 2014-11-16
11
154 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
Will your db performance match your db growth?

In Percona’s white paper “Performance at Scale: Keeping Your Database on Its Toes,” we take a high-level approach to what you need to think about when planning for database scalability.

 
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

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

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 several years ago, it seemed like now was a good time to update it for object-oriented PHP.  This article does that, replacing as much as possible the pr…
The viewer will the learn the benefit of plain text editors and code an HTML5 based template for use in further tutorials.
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.
Suggested Courses

630 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