Please Help, Retrive data from the web.

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Robert

    Please Help, Retrive data from the web.

    Hosting: Windows 2003 Server, Asp3.0 , Asp.Net supported.

    I use asp cdosys for visitors to email me a form containing the message
    they type, + their ip address.

    I need to verify for statistic, where is that ip address located in.



    I do the following procedure that works fine, but i would like to automate it.

    1) I goto the following address http://www.ripe.net/db/whois/whois.html
    Is a pubblic whois service, for european region ip addresses

    2) I type the ipaddress in "searchtext " textbox

    3) i press "search" button ( that is called "do_search" )

    4) i check the row that contain the value Country : XX
    ( XX may be "US" or "UK" or whatever )



    I would like to automate the procedure and receive in the email
    not only the ip address but also the two letters for the
    corrisponding country


    P.S. : PLEASE don't propose/suggest me, any commercial product or service.



    Also I was wondering how to have in a web page something like


    Cities Temperatures :
    "London " & London_Temperat ure
    "Madrid " & Madrid_Temperat ure
    "Rome " & Rome_Temperatur e

    Of course i want updated data to display, with page load temperature
    to be checked somewhere in the web, and passed in the web page,
    possibly with ASP or ASP.Net , but i don't known how to do that.



    Any Help Appreciated.


    Best Regards.

    Robert.
  • Tom Kaminski [MVP]

    #2
    Re: Please Help, Retrive data from the web.

    "Robert" <milo2low@yahoo .co.uk> wrote in message
    news:ddbc4eb.04 10130002.269ffc 2a@posting.goog le.com...[color=blue]
    > Hosting: Windows 2003 Server, Asp3.0 , Asp.Net supported.
    >
    > I use asp cdosys for visitors to email me a form containing the message
    > they type, + their ip address.
    >
    > I need to verify for statistic, where is that ip address located in.
    >
    >
    >
    > I do the following procedure that works fine, but i would like to automate
    > it.
    >
    > 1) I goto the following address http://www.ripe.net/db/whois/whois.html
    > Is a pubblic whois service, for european region ip addresses
    >
    > 2) I type the ipaddress in "searchtext " textbox
    >
    > 3) i press "search" button ( that is called "do_search" )
    >
    > 4) i check the row that contain the value Country : XX
    > ( XX may be "US" or "UK" or whatever )
    >
    >
    >
    > I would like to automate the procedure and receive in the email
    > not only the ip address but also the two letters for the
    > corrisponding country[/color]

    You could try this technique:


    --
    Tom Kaminski IIS MVP



    http://www.iistoolshed.com/ - tools, scripts, and utilities for running IIS



    Comment

    • Robert

      #3
      Re: Please Help, Retrive data from the web.

      I copied the following code from the web, it works, but retrive the
      full page.
      I'm intrested in the portion of text, between "country:" and
      "admin-c:"

      I should use regular expression, but i'm not familiar with them.
      Can You help ?

      Best Regards.

      Robert.



      This is default.asp
      <%
      'Intruduce the url you want to visit
      GotothisURL = "http://www.ripe.net/whois?form_type =simple&full_qu ery_string=&sea rchtext=82.51.1 8.239&do_search =Search"
      ' Create the xml object
      Set GetConnection = CreateObject("M icrosoft.XMLHTT P")
      ' Conect to specified URL
      GetConnection.O pen "get", GotothisURL, False
      on error resume next
      GetConnection.S end

      ' ResponsePage is the response we will get when visiting GotothisURL
      ResponsePage = GetConnection.r esponseText

      ' We will write
      if ResponsePage="" then
      Response.write( "The page is not available")
      else
      Response.write( ResponsePage)
      end if
      Set GetConnection = Nothing
      %>

      Comment

      Working...