jpalatka
Jun 25th, 2000, 10:25 PM
I am trying to use the Internet Transfer Control (ITC) on an ASP page to
pull information from an HTML page to the ASP page (eventually I'd like
to pull from an XML page). Here is the code I have:
<% Option Explicit %>
<%
Dim url 'The URL to download
Dim Inet 'Object for Inet Control
Dim sHTML 'String to hold HTML from download
Dim rbuscomp 'var to hold regular expression
Dim objCols 'Object to hold collections from Regular expression
Dim sbuscomp 'string to hold the world population
Dim objMatch 'Object for matches
url = "http://wwweyestreet.com/siebel/test.html"
'Create instance of Inet Control
Inet = Server.CreateObject("InetCtls.Inet.1")
'Set the timeout property
Inet.RequestTimeOut = 20
'Set the URL property of the control
Inet.Url = url
'Actually download the file
sHTML = Inet.OpenURL()
'Regular expression to find the string stored between
'the <buscomp> tags. This is where the world population is.
Set rbuscomp = New regexp
rbuscomp.Pattern = "<buscomp>(.*)<\/buscomp>"
rbuscomp.Global = False
rbuscomp.IgnoreCase = True
'Execute the regular expression on the raw HTML
Set objCols = rbuscomp.Execute( sHTML )
'Step through our matches
For Each objMatch in objCols
sbuscomp = sbuscomp & objMatch.Value
Next
'Clean up
Set rbuscomp = Nothing
Set objCols = Nothing
'Strip the <buscomp> tags off
sbuscomp = Replace(Replace(sbuscomp, "<buscomp>", ""), "</buscomp>", "")
%>
<HTML>
<HEAD>
<TITLE>Siebel</TITLE>
</HEAD>
<BODY>
<P>The Business Component is: <%=sbuscomp %></P>
</BODY>
</HTML>
where the page http://www.eyestreet.com/siebel/test.html does exist.
I'm getting the following error:
Server object error 'ASP 0177 : 800401f3'
Server.CreateObject Failed
/siebel/extract.asp, line 14
Invalid class string
I've also tried the line
Set Inet = Server.CreateObject("InetCtls.Inet.1")
and
Set Inet = Server.CreateObject("InetCtls.Inet")
What am I doing wrong? Do I need to add the control somewhere? I'm
running IIS on WinNT 4.0 on IE5.
Thanks in Advance
pull information from an HTML page to the ASP page (eventually I'd like
to pull from an XML page). Here is the code I have:
<% Option Explicit %>
<%
Dim url 'The URL to download
Dim Inet 'Object for Inet Control
Dim sHTML 'String to hold HTML from download
Dim rbuscomp 'var to hold regular expression
Dim objCols 'Object to hold collections from Regular expression
Dim sbuscomp 'string to hold the world population
Dim objMatch 'Object for matches
url = "http://wwweyestreet.com/siebel/test.html"
'Create instance of Inet Control
Inet = Server.CreateObject("InetCtls.Inet.1")
'Set the timeout property
Inet.RequestTimeOut = 20
'Set the URL property of the control
Inet.Url = url
'Actually download the file
sHTML = Inet.OpenURL()
'Regular expression to find the string stored between
'the <buscomp> tags. This is where the world population is.
Set rbuscomp = New regexp
rbuscomp.Pattern = "<buscomp>(.*)<\/buscomp>"
rbuscomp.Global = False
rbuscomp.IgnoreCase = True
'Execute the regular expression on the raw HTML
Set objCols = rbuscomp.Execute( sHTML )
'Step through our matches
For Each objMatch in objCols
sbuscomp = sbuscomp & objMatch.Value
Next
'Clean up
Set rbuscomp = Nothing
Set objCols = Nothing
'Strip the <buscomp> tags off
sbuscomp = Replace(Replace(sbuscomp, "<buscomp>", ""), "</buscomp>", "")
%>
<HTML>
<HEAD>
<TITLE>Siebel</TITLE>
</HEAD>
<BODY>
<P>The Business Component is: <%=sbuscomp %></P>
</BODY>
</HTML>
where the page http://www.eyestreet.com/siebel/test.html does exist.
I'm getting the following error:
Server object error 'ASP 0177 : 800401f3'
Server.CreateObject Failed
/siebel/extract.asp, line 14
Invalid class string
I've also tried the line
Set Inet = Server.CreateObject("InetCtls.Inet.1")
and
Set Inet = Server.CreateObject("InetCtls.Inet")
What am I doing wrong? Do I need to add the control somewhere? I'm
running IIS on WinNT 4.0 on IE5.
Thanks in Advance