?
Solved

getting IP address

Posted on 2002-04-24
10
Medium Priority
?
177 Views
Last Modified: 2010-05-18
how can I get the IP address for the server who is accessing my site.

I want to allow a customer access to my website, but want to limit access to certain customers. I was looking at the http header trying to get the ip address but all I get is my address.

my setup;

I'm using II's and using ASP pages. I'm using the "Request.ServerVariables".

suggestions?
0
Comment
Question by:tomhoran
[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
10 Comments
 
LVL 4

Expert Comment

by:EricWestbo
ID: 6966913
0
 

Author Comment

by:tomhoran
ID: 6967175
i'm running nt 4. i have loggin enabled. i want to be able to access the IP address in my asp page on a real-time basis.
0
 
LVL 19

Expert Comment

by:cheekycj
ID: 6969439
<%
' RETURNS THE REQUESTER IP TO anyVariable
userIPAddress = Request.ServerVariables("REMOTE_ADDR")
%>
0
Get your Disaster Recovery as a Service basics

Disaster Recovery as a Service is one go-to solution that revolutionizes DR planning. Implementing DRaaS could be an efficient process, easily accessible to non-DR experts. Learn about monitoring, testing, executing failovers and failbacks to ensure a "healthy" DR environment.

 
LVL 19

Expert Comment

by:cheekycj
ID: 6969459
you can use REMOTE_HOST for the server name of that IP address.

CJ
0
 

Author Comment

by:tomhoran
ID: 6969637
i've used all of the following:

hostall = Request.ServerVariables("ALL_HTTP")
securelogin = Request.ServerVariables("HTTPS")
hostaddr = Request.ServerVariables("HTTP_HOST")
hostip = Request.ServerVariables("REMOTE_ADDR")
referer = Request.ServerVariables("HTTP_REFERER")
REMOTEHOST = Request.ServerVariables("REMOTE_HOST")

they all return the values from my router and not the webiste i came from. the only one that returns a value from the initiating website is HTTP_REFERER.

see www.bensoftinc.com/wk1.htm (this site is hosted by Dell). then click on the link "login to repayme". this will take you to my other website, hosted here in the office.

suggestions?
0
 
LVL 19

Expert Comment

by:cheekycj
ID: 6969664
this tells the you the IP address of the requesting server/client.. your router's IP address should NOT be involved.

referrer is just the server name the request came from (like what page you clicked the link from)

do you want the client's IP address or the server that sent the client to you?

CJ
0
 

Author Comment

by:tomhoran
ID: 6969679
i'm looking for the server that sent the client to me. what i'm looking to do is allow certain customers to auto login from there website (since hey have already verified the login), so i want to verify who is trying to autologin. I can use the referrer as that has the webaddress it's coming from but one client was having a problem sending it to me (they are linx/appache)
0
 
LVL 19

Accepted Solution

by:
cheekycj earned 320 total points
ID: 6969726
then HTTP_REFERRER is what you want.

You want to verify that the cleint came from this server to you only.

CJ
0
 
LVL 53

Expert Comment

by:COBOLdinosaur
ID: 8187080
It is time to clean this abandoned question up.  

I am putting it on a clean up list for CS.

<recommendation>
points to cheekycj

</recommendation>

If anyone participating in the Q disagrees with the recommendation,
please leave a comment for the mods.

Cd&
0
 

Expert Comment

by:Chmod
ID: 8240142
As recommended

Chmod
Community Support Moderator @Experts Exchange
0

Featured Post

Get real performance insights from real users

Key features:
- Total Pages Views and Load times
- Top Pages Viewed and Load Times
- Real Time Site Page Build Performance
- Users’ Browser and Platform Performance
- Geographic User Breakdown
- And more

Question has a verified solution.

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

This article provides a case study on how our local youth baseball league deployed a new website, including the platform selection, implementation and benefits to the league.
Dramatic changes are revolutionizing how we build and use technology. Every company is automating, digitizing, and modernizing operations. We need a better, more connected way to work together as teams so we can harness the insights from our system…
The purpose of this video is to demonstrate how to reset a WordPress password if you are locked out and cannot reset the password. A typical use would be if you cannot access the email to which WordPress would send the password recovery email to…
The purpose of this video is to demonstrate how to set up basic WordPress SEO. This will be demonstrated using a Windows 8 PC. The plugin used will be WordPress SEO by Yoast. Go to your WordPress login page. This will look like the following: myw…
Suggested Courses

762 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