PDA

View Full Version : How to get IP with ASP



mills
11-16-2005, 08:14 PM
How to get IP address with ASP?

chuck59
11-23-2005, 04:47 AM
try using the following ASP statements...

Request.ServerVariables("REMOTE_ADDR")

and/or

Request.ServerVariables("HTTP_X_FORWARDED_FOR")

satalways
04-19-2007, 05:22 AM
Hay my posts are deleted.

jscheuer1
04-19-2007, 05:47 PM
Hay my posts are deleted.

I think they're breaking in some new moderators around here or something. Don't worry about it, the question was already answered.

satalways
04-20-2007, 05:05 AM
Yeah! You are right. New Moderators are experimenting.

techno_race
05-11-2007, 02:15 PM
I don't think ASP is needed for that. however, I've never understood ASP at all.

boogyman
05-11-2007, 04:57 PM
I don't think ASP is needed for that. however, I've never understood ASP at all.

It's not entirely necessary, but it can access that information, just as PHP, VB.NET, Javascript, ... and so on. I never tried to learn ASP as PHP has been fine for my needs; but that doesn't mean that its not needed? If he is programming a page with ASP I think it would be better to continue with that language, rather then switch to another server-side language like PHP. so it really just depends on the needs/direction/development of the page

mwinter
05-11-2007, 05:09 PM
It's not entirely necessary, but it can access that information, just as PHP, VB.NET, Javascript, ... and so on.

Whilst VB.NET probably can (with the .NET framework being the actual provider), ECMAScript implementations generally cannot. There might be a user agent around that provides that information through host objects, the vast majority don't. The only way that ECMAScript and its derivatives can is through a server-side language (generating code, including the IP address) or Java.

Back the original topic for a moment (I know it's old): whilst one might get a IP address, it might not be the address of the visitor. It may be an intermediary client/server such as a caching or anonymising proxy, a gateway, or a NAT router.