How to get IP address with ASP?
How to get IP address with ASP?
try using the following ASP statements...
Request.ServerVariables("REMOTE_ADDR")
and/or
Request.ServerVariables("HTTP_X_FORWARDED_FOR")
Hay my posts are deleted.
- John________________________
Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate
Yeah! You are right. New Moderators are experimenting.
I don't think ASP is needed for that. however, I've never understood ASP at all.
....(o_ Penguins
.---/(o_- techno_racing
+(---//\-' in
.+(_)--(_)' The McMurdo 500
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
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.
Bookmarks