How many times have you come across a Web site that contained a
few small kernels of interesting information and wanted to capture
it for display on one of your own pages? You might consider using
a frame, but doing so doesn't let you manipulate the content. As an
alternative, try the Internet Transfer control.
The Internet Transfer Control is an ActiveX COM component that allows
you to easily implement the most common Internet protocols, HTTP and
FTP, with COM-compatible programming languages like Visual Basic and
VBScript. In essence, the Internet Transfer Control provides a wrapper
for the numerous WinInet API functions provided by the Windows
operating system. The control comes with several Microsoft products,
including Visual Studio and Office Developer. You can check your
System directory for the file MSINET.OCX, if you're not sure you have
it registered on your system. To use this control you call it's
openUrl method. This fills a string variable with the URL's raw
html from which you can parse a specific value.
<body>
Of course, this control may not always be suited to conditions
Weather for San Francisco:
<%
set objInet = CreateObject("InetCtls.Inet")
objInet.requestTimeout = 20
objInet.url = "http://weather.noaa.gov/weather/current/KSFO.html"
strHTML = objInet.openURL
if strHTML = "" then
strHTML = "<No Data Available>"
end if
strHTML = mid(strHTML, instr(strHTML, " Temperature ") + 73)
strHTML = mid(strHTML, 1, instr(strHTML, "C)") + 1)
Response.Write strHTML
Set objInet = Nothing
%>
</body>
involving high traffic, low bandwidth, or slow connection speeds.
That said, however, the Internet Transfer Control can still
serve many useful functions.
Integrate Web Content
By ElementK Journals, published on 14 Jul 2001
| Filed in
You might also like...
Visual Studio forum discussion
-
MS Edge in Kiosk mode
by kiwi.automate (0 replies)
-
CorelDRAW VBA: cdrTraceLineDrawing FAILS, producing single linear path instead of Centerline trace?
by dancemanj (0 replies)
-
vb script to copy specific file to another computer via local area network
by talekeshav (0 replies)
-
deobfuscate malicious vbscript
by ru5ty (0 replies)
-
How to add parameter into XML file using VBScript
by deepak_solanki19 (0 replies)
Visual Studio podcasts
-
Hanselminutes: Startup Series: Buying an Existing Small Company or Online Application
Published 8 years ago, running time 0h34m
Scott talks to Rob Walling about how he purchases small niche products and companies online and revitalizes them. He recently purchased an existing product that consisted of a 300 gig database and tens of thousands of lines of Classic ASP. How did he know it was valuable? What's next?
Comments