473,405 Members | 2,282 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

Get Visitors IP Address

How can I grab the IP address of a visitor to my site so I can store it in a
session variable?

Thanks
Jul 22 '05 #1
4 2086
On Mon, 7 Feb 2005 23:26:54 -0000, "Keith" <@.> wrote:
How can I grab the IP address of a visitor to my site so I can store it in a
session variable?


IPAddress = Request.ServerVariables("REMOTE_ADDR")

Jeff
Jul 22 '05 #2
On Tue, 08 Feb 2005 03:40:51 GMT, je*********@zina.com (Jeff Cochran)
wrote:
On Mon, 7 Feb 2005 23:26:54 -0000, "Keith" <@.> wrote:
How can I grab the IP address of a visitor to my site so I can store it in a
session variable?


IPAddress = Request.ServerVariables("REMOTE_ADDR")

Jeff


One word of warning, I have discovered to my downfall just yesterday
that REMOTE_ADDR can have more than one IP address in it, it can be a
comma separated list of IPs.

So look out for that if you are processing them or any such thing.

I

--
Iain Norman | http://www.eliteforum.org
Jul 22 '05 #3

"teknohippy" <an******@me.com> wrote in message
news:vq********************************@4ax.com...

One word of warning, I have discovered to my downfall just yesterday
that REMOTE_ADDR can have more than one IP address in it, it can be a
comma separated list of IPs.


How can that be?

Ray at work
Jul 22 '05 #4
On Tue, 8 Feb 2005 10:52:10 -0500, "Ray Costanzo [MVP]" <my first name
at lane 34 dot commercial> wrote:

"teknohippy" <an******@me.com> wrote in message
news:vq********************************@4ax.com.. .

One word of warning, I have discovered to my downfall just yesterday
that REMOTE_ADDR can have more than one IP address in it, it can be a
comma separated list of IPs.


How can that be?

Ray at work

Surprised me as well, I've not looked at the HTTP specs yet to see
what it's all about.

The client in question was going through some kind of web cache box
thing.

REMOTE_ADDR was being reported like this (just a random made up
example)

195.148.231.128, 10.0.1.124

So I'm thinking it was the external IP of the cache machine and
possibly the internal IP of the requesting client for some reason or
another.

I

--
Iain Norman | http://www.eliteforum.org
Jul 22 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

23
by: deko | last post by:
Can someone point me to a sample script that will log all visitors to my web site? I'm looking for a simple script that will capture IP address, Host Name, Browser, OS, and referring page - and...
5
by: cc | last post by:
From the popular website At this link: http://www.w3schools.com/asp/asp_globalasa.asp I got this code, but it does not work on my server... I can open three IE browsers and watch the count go to...
4
by: Al Sashun | last post by:
Hi There, I'm not sure if this is the right place, but I'm after a script or program that will provide me with site visitors email address's, the only reason being my clients would like to see who...
4
by: Paul Lee | last post by:
Hi, I posted a question to this forum a few days ago and got a veyr good response - unfortunately I asked the wrong question (I asked about referring domains, not IPs of visitors). I've got a...
0
by: ip2location.inc | last post by:
IP2Location has announced the availability of IP2Location .NET Component, that enables application developers to geolocation the Internet visitors by IP Address from their .NET applications. ...
3
by: johnny | last post by:
hi all! I am starting to study the best way to track site visitors. Logfiles stats which come with every web hosting, have little metrics to be analyzed and also problems with cached pages which...
16
by: nmdc69 | last post by:
Hi folks, Is there a simple way to log IP's without CGI? I need to log the IP's of the visitors to a website I run. I used to have a CGI script but there's no CGI on the server I'm using now....
4
by: Chris | last post by:
Hi, i want to get the amount of visitors online. I did this in global.asax I tested it by opening several browser sessions. The amount increases, but never decreases, when i close some...
32
by: Ciaran | last post by:
Hi I've seen this a few places - The site lists off the number of people (not logged in) currently browsing the site. How can I do this with php / mySQL please?
0
by: kashok | last post by:
hi all, how to track online visitors ip address and country name through ip address of those who are visiting my web site in asp.net..... Ashok
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.