Grabbing IP adres from ASP webform

K

Kris

Dear all,

I know this question has been discussed in another topic but I feel
that I lack a little bit of knowledge to grasp what was said there.
My problem is as follows :

As a trainer in a company, I launched a webform asking people to log
in before they can access the needed training. Nothing fancy and just
there for monitoring who comes in and when. Problem is that some
"nice-guys" enter who knows what - because that's fun. Can I
counteract this by having the ASP form sending me also the IP address
from the PC ? And where do I have to add these lines ?

This is the code I use in my ASP form :

<%
Dim MyBody
Dim MyCDONTSMail
Dim Name
Dim Team
Dim Subject
Dim Comment
%>
<%
Name = Request.Form("Name")
Team = Request.Form("Team")
Subject = Request.Form("Subject")
Comment = Request.Form("Comment")
%>
<%
Set MyCDONTSMail = CreateObject("CDONTS.NewMail")
MyCDONTSMail.From= "XX@xx"
MyCDONTSMail.To= "xx@xx"
MyCDONTSMail.Subject="xxxxxxxx"
Mybody = "This mail has been sent by the automated customer
feedback engine" & vbCrlF
Mybody = Mybody & "Please find enclosed the data as filled in" &
vbCrlF & vbCrlF
MyBody = MyBody & "Name: " & Name & vbCrlF
MyBody = MyBody & "Team: " & Team & vbCrlF
MyBody = MyBody & "Subject: " & Subject & vbCrlF
MyBody = MyBody & "Comment: " & Comment & vbCrlF & vbCrlF &
vbCrlF
MyCDONTSMail.Body= MyBody
MyCDONTSMail.Send
Response.Write "Thank you, " & Name & ", for following the
WebTraining."
Response.Redirect("xxx.htm")
set MyCDONTSMail=nothing
%>

All help is highly appreciated. Please do understand that I'm new at
this ASP thing and that it might take some time for me to understand.

Br,

Kris
 
E

Evertjan.

Kris wrote on 26 aug 2004 in microsoft.public.inetserver.asp.general:
Can I
counteract this by having the ASP form sending me also the IP address
from the PC ?

No, because an IP address does not belong to a pc.

If you catch the IP by request.servervariables("remote_addr"):

You could get the clients isp connection IP adress, which is constant in
some cases, semiconstant in others and changing at every dial in in others
again.

Some isps have one IP addres for thousends of clients/surfers at one time.

Some/many? clients use a proxi, masking their "own" ip.

Clients on a LAN translate/mask their local ip to a common ip of the
connection, which again is subject to all the above.

On top of that all, hackers have found ways to "spoof" ips.

So yes you can "counteract", but not allways.
 
K

Kris

Agreed ... that might be the case but the problem is not of that size.
What is happening is that some users are logging by typing in other
users names ... if I could "grab" the IP adres from the PC they are
logging in from, I would be able to see who and what.

Anybody having a great idea and euh ... feel free to modify my code.

Br,

Kris
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,969
Messages
2,570,161
Members
46,708
Latest member
SherleneF1

Latest Threads

Top