Displaying External Web Site via Intranet

G

Guest

We have approximately 90 computer users, but only 13 have internet access,
the rest are not configured to browse the internet. We want to display
certain web sites to all users without reconfiguring their pcs. Is there a
way to have our intranet web server retrieve the external page and then
display the results to the user?

Thanks.
 
N

Nenefta

Hi John,
From what I understand you want to load a webpage on the server, and
display the contents in your own site. I found something that should do
it for you:

---Create the request
Dim WebRequest As System.Net.WebRequest =
System.Net.WebRequest.Create(New Uri(CurrentLink))
WebRequest.Timeout = 2000

'---Get the response produced by the request
Dim Response As System.Net.WebResponse = WebRequest.GetResponse

'---Download the page content into a stream
Dim Stream As System.IO.Stream = Response.GetResponseStream

'---Place the stream into a stream reader
Dim StreamReader As New System.IO.StreamReader(Stream)

'---Read the stream into a string object
Dim HtmlReceived As String = StreamReader.ReadToEnd

'---Place the string into a literal control
Literal1.Text = HtmlReceived

'---Cleanup
Stream.Close()
StreamReader.Close()


Good luck,
Marcel
 

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,015
Latest member
AmbrosePal

Latest Threads

Top