Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   ASP General (http://www.velocityreviews.com/forums/f65-asp-general.html)
-   -   IP Address Geographyc Resolution ( city or region ) (http://www.velocityreviews.com/forums/t794140-ip-address-geographyc-resolution-city-or-region.html)

Bubu 04-25-2004 02:37 PM

IP Address Geographyc Resolution ( city or region )
 
Hello this is Robert from Italy,

I use windows 2003 shared host, that support ASP 3.0 and cdosyd

I allow my website visitors to email me, without getting my email
address spammed,
without tell anybody my email address, and without robots to get my
email address,
visitors fill a form, then they push the "send" button, and i get the
email
In the email i receive, there is in addition of the message, the
sender IP address,

If i want to verify the city or the region from where the email was
sent,
i have to go in the internet somewhere, type the sender ip address and
then,
i see the city or region where the sender IP address is located

i would like to improve the code, to get in the mail i receive,
IP Address & IP Address CITY (or Region )

Following the code i use.

Any help Appreciated.
Best Regards.
Robert.



<%
DIM corpoMessaggio, numeroCampi, invioA, invioDa, nomeDominio,
indirizzoIp, modulo, browserSistemaOperativo

invioA = "email_address@domain.com"
invioDa = "email_address@domain.com"

nomeDominio = Request.ServerVariables("HTTP_HOST")
indirizzoIp = Request.ServerVariables("REMOTE_ADDR")
modulo = Request.ServerVariables("HTTP_REFERER")
browserSistemaOperativo = Request.ServerVariables("HTTP_USER_AGENT")

FOR numeroCampi = 1 TO (Request.Form.Count() - 1)
IF NOT Request.Form(numeroCampi) = "" THEN
corpoMessaggio = corpoMessaggio & vbCrLf &
Request.Form.Key(numeroCampi) & " = " &
Trim(Request.Form(numeroCampi))
END IF
NEXT

DIM iMsg, Flds, iConf

Set iMsg = CreateObject("CDO.Message")
Set iConf = CreateObject("CDO.Configuration")
Set Flds = iConf.Fields

Flds(cdoSendUsingMethod) = cdoSendUsingPort
Flds(cdoSMTPServer) = "smtp.domain.com"
Flds(cdoSMTPServerPort) = 25
Flds(cdoSMTPAuthenticate) = cdoAnonymous ' 0
Flds.Update

With iMsg
Set .Configuration = iConf
.To = invioA
.From = Request.Form("email")
.Sender = invioDa
.Subject = "Contatto dal dominio " & nomeDominio
.TextBody = "Dati inseriti nel modulo presente alla pagina " &
modulo & " utente con indirizzo IP " & indirizzoIp & " browser e
sistema operativo " & browserSistemaOperativo & vbCrLf &
corpoMessaggio & ""
.Send
End With
%>


All times are GMT. The time now is 10:13 AM.

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


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57