IP Address Geographyc Resolution ( city or region )

B

Bubu

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 = "(e-mail address removed)"
invioDa = "(e-mail address removed)"

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
%>
 

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,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top