Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   ASP General (http://www.velocityreviews.com/forums/f65-asp-general.html)
-   -   Grabbing IP adres from ASP webform (http://www.velocityreviews.com/forums/t796081-grabbing-ip-adres-from-asp-webform.html)

Kris 08-26-2004 07:31 AM

Grabbing IP adres from ASP webform
 
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

Evertjan. 08-26-2004 07:46 AM

Re: Grabbing IP adres from ASP webform
 
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.

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress,
but let us keep the discussions in the newsgroup)


Kris 08-26-2004 03:37 PM

Re: Grabbing IP adres from ASP webform
 
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

Jeff Dillon 08-26-2004 06:31 PM

Re: Grabbing IP adres from ASP webform
 
As stated, request.servervariables("remote_addr") is your only bet

Jeff

"Kris" <rufus_4_ever@hotmail.com> wrote in message
news:f92d1d3e.0408260737.49460bbd@posting.google.c om...
> 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





All times are GMT. The time now is 01:31 AM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.