473,322 Members | 1,610 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

getting results from another html page

hello,

i am building some objects to keep track of page
statistics (ie, pages visited by certain ip addresses) so
that i can see which countries my visitors are coming
from. i am using a free php service to determine the
location of an ip address.. for example, if i want to
find ip 1.2.3.4's country, i go to
http://www.myservice.xxx/findip.php?ip=1.2.3.4 and it
will spit back "united states" or "canada" or whatever..

how can i call this from inside an asp.net page to get
the result? for example,

Dim strClientIPAddress as String
Dim strCountry as String

strCountry = SomehowEvaluate("http://.../findip.php?ip="
& strClientIPAddress)

any help will be greatly appreciated!

mike
Nov 18 '05 #1
1 950
Michael,
You could use the "System.Net.WebClient" class.
e.g.
Dim wc As New System.Net.WebClient
Dim st As System.IO.Stream = wc.OpenRead("http://www.myservice.xxx/findip.php?ip=1.2.3.4")
Dim sr As New System.IO.StreamReader(st)
Dim country As String = sr.ReadToEnd()

--

Thanks,
Carl Prothman
Microsoft ASP.NET MVP
http://www.able-consulting.com

Michael Jean wrote:
i am building some objects to keep track of page
statistics (ie, pages visited by certain ip addresses) so
that i can see which countries my visitors are coming
from. i am using a free php service to determine the
location of an ip address.. for example, if i want to
find ip 1.2.3.4's country, i go to
http://www.myservice.xxx/findip.php?ip=1.2.3.4 and it
will spit back "united states" or "canada" or whatever..

how can i call this from inside an asp.net page to get
the result? for example,

Nov 18 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

303
by: mike420 | last post by:
In the context of LATEX, some Pythonista asked what the big successes of Lisp were. I think there were at least three *big* successes. a. orbitz.com web site uses Lisp for algorithms, etc. b....
2
by: Lance Wynn | last post by:
Hello All, In case the subject wasn't completely clear, I just upgraded to Windows XP Pro from Windows 2000 Pro. All my ASP stuff seems to work, except that when an ASP page generates an error,...
0
by: Jim | last post by:
I need some help getting started with a .NET web project for a commercial site. I am new to .NET and my understanding of some (but not all) of its concepts is a little sparse. I apologize for the...
0
by: Jim | last post by:
This si a repost, I apologize but perhaps my original inquiry got buried under all the usenet spam... I need some help getting started with a .NET web project for a commercial site. I am new to...
2
by: Mark | last post by:
Hi Guys, I have a page with a list of links that when clicked submit data to a clients search engine, The result opens in another window and either displays a list of items or diaplays "No Items...
2
by: Alex | last post by:
Hi all, I'm writing a small web application which searches a database based on a date field, and populates a datagrid control with the results. The datagrid control has selection buttons added...
8
by: Brent White | last post by:
If you need more information, I'd be glad to give it, but I am developing an ASPX page so that the user can select multiple values for a specific field, then pass them on (using Crystal Reports 10...
2
by: Tina | last post by:
I'm trying to get started with Atlas and associated necessary javascript at the same time. I started out at http://atlas.asp.net/walkthroughs/gettingstarted/basic.net where they have an...
8
by: =?Utf-8?B?QW1yaXQgS29obGk=?= | last post by:
Okay, after much research, I have discovered a few interesting things in ASP.NET. I have a MasterPage that has a WebForm on it and it looks like this: <body> <form id="controls"...
7
by: Atul | last post by:
Hi Theres a website that books hotels . user enters the information and according to that results are displayed to the user.Let it be website A. Now I want to create a new project with...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.