IP Address Geographyc Resolution ( city or region )

Discussion in 'ASP General' started by Bubu, Apr 25, 2004.

  1. Bubu

    Bubu Guest

    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 = ""
    invioDa = ""

    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
    %>
     
    Bubu, Apr 25, 2004
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Jamie J. Begin
    Replies:
    1
    Views:
    294
    Marc 'BlackJack' Rintsch
    Dec 19, 2006
  2. SAL

    #Region #End Region issue

    SAL, Aug 29, 2008, in forum: ASP .Net
    Replies:
    1
    Views:
    363
    Alexey Smirnov
    Aug 29, 2008
  3. Replies:
    1
    Views:
    261
  4. Ribolovac
    Replies:
    2
    Views:
    3,722
    Alexey Smirnov
    Nov 9, 2009
  5. Îικόλας

    GeoIP2 for retrieving city and region ?

    Îικόλας, Jul 12, 2013, in forum: Python
    Replies:
    40
    Views:
    531
    Chris Angelico
    Jul 17, 2013
Loading...

Share This Page