Print Page | Close Window

Capture IP address

Printed From: Web Wiz Forums
Category: General Discussion
Forum Name: Classic ASP Discussion
Forum Description: Discussion on Active Server Pages (Classic ASP).
URL: https://forums.webwiz.net/forum_posts.asp?TID=17186
Printed Date: 29 March 2026 at 5:07pm
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: Capture IP address
Posted By: sccs
Subject: Capture IP address
Date Posted: 09 November 2005 at 9:53am
I have set up a contact form on our school website and we are getting a few internal submissions from students. How easy would it be to capture the IP address? Thanks



Replies:
Posted By: dpyers
Date Posted: 09 November 2005 at 5:44pm
Response.Write Request.ServerVariables("Remote_Addr")

-------------

Lead me not into temptation... I know the short cut, follow me.


Posted By: sccs
Date Posted: 10 November 2005 at 3:26am
Thanks for that. I managed to sort it out. Would be nice to capture the students username when they log on to the network as well.
Thanks.Smile


Posted By: sccs
Date Posted: 10 November 2005 at 7:25am
Is there a way of banning an IP address? We want to stop internal posts from the school.
ThanksSmile


Posted By: dj air
Date Posted: 10 November 2005 at 8:52am
intIP = Request.ServerVariables("Remote_Addr")

if instr(1,intIP, "value",vbTextCompare) then response.redirect ("Banned.asp")


hope that gives you a starting block



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net