Grabbing IP adres from ASP webform
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Web Servers reviews > IIS server support > IIS ASP > Grabbing IP adres from ASP webform




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    Grabbing IP adres from ASP webform  
Kris


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
08-27-04 11:16 PM

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





[ Post a follow-up to this message ]



    Re: Grabbing IP adres from ASP webform  
Evertjan.


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
08-27-04 11:16 PM

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)






[ Post a follow-up to this message ]



    Re: Grabbing IP adres from ASP webform  
Kris


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
08-27-04 11:17 PM

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





[ Post a follow-up to this message ]



    Re: Grabbing IP adres from ASP webform  
Jeff Dillon


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
08-27-04 11:17 PM

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.com...
> 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







[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 09:39 AM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register