Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

getting IP address

Posted on 2002-04-24
10
Medium Priority
?
179 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
NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

 
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 your Conversational Ransomware Defense e‑book

This e-book gives you an insight into the ransomware threat and reviews the fundamentals of top-notch ransomware preparedness and recovery. To help you protect yourself and your organization. The initial infection may be inevitable, so the best protection is to be fully prepared.

Question has a verified solution.

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

Introduction In this tutorial, I'll explain how to create an animated progress meter in a wireframe prototype developed using Axure RP 7.0 - a leading prototyping tool for designing web sites and software. (For more information about Axure and gett…
Geo-targeting is the practice of distributing content based on a person’s location, as best as you can determine it. Let’s look at some ways you could successfully use this tactic. The following tips and case studies could lead to meaningful results.
The purpose of this video is to demonstrate how to integrate Mailchimp with Facebook. This will be demonstrated using a Windows 8 PC. Mailchimp and Facebook will be used. Log into your Mailchimp account. : Click on your name. Go to Account Setti…
The purpose of this video is to demonstrate how to set up an RSS Feed on a WordPress Website. This will be demonstrated using a Windows 8 PC. Feedburner will be used for this demonstration. Go to your WordPress login page. This will look like the…
Suggested Courses

618 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