Please Help, Retrive data from the web.

R

Robert

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_Temperature
"Madrid " & Madrid_Temperature
"Rome " & Rome_Temperature

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

Tom Kaminski [MVP]

Robert said:
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

You could try this technique:
http://www.aspfaq.com/show.asp?id=2173

--
Tom Kaminski IIS MVP
http://www.microsoft.com/windowsserver2003/community/centers/iis/
http://mvp.support.microsoft.com/
http://www.iisfaq.com/
http://www.iistoolshed.com/ - tools, scripts, and utilities for running IIS
http://www.tryiis.com
 
R

Robert

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...ing=&searchtext=82.51.18.239&do_search=Search"
' Create the xml object
Set GetConnection = CreateObject("Microsoft.XMLHTTP")
' Conect to specified URL
GetConnection.Open "get", GotothisURL, False
on error resume next
GetConnection.Send

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

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

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

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,014
Latest member
BiancaFix3

Latest Threads

Top