O' the contrary, VBScript *IS* up to the task, and does it with less code!
Microsoft.XMLHTTP does this job quite nicely, here's a working sample, which
can be found in it's working form on my website. Not only does it parse, but
it's much faster than the LWP:simple module as well.
<%
Response.Buffer = True
Dim objXMLHTTP, xml, strBuffer, intEnd, intStart, strStartSearchString,
strEndSearchString
Dim strTrimFromString
Dim strTrimToString
Dim strNewBuffer
' Create an xmlhttp object:
Set xml = Server.CreateObject("Microsoft.XMLHTTP")
' Or, for version 3.0 of XMLHTTP, use:
' Set xml = Server.CreateObject("MSXML2.ServerXMLHTTP")
' Opens the connection to the remote server.
xml.Open "GET", "http://www.usatoday.com/news/nweird.htm", False
' Actually Sends the request and returns the data:
xml.Send
'Set search Parameters for searching the page
strStartSearchString ="<!-- BEGIN DATA -->"
strEndSearchString = "Copyright 2000"
intStart = instr(1, xml.responseText, strStartSearchString, 1)
intEnd = instr(1, xml.responseText, strEndSearchString, 1)
'Load the string with the portion of the page searched
strBuffer = trim(mid(xml.responseText, intStart, (intEnd-intStart)))
'Remove all external HREF links
strBuffer = replace(strBuffer, "<IMG", "</ BLOCK ")
strBuffer = replace(strBuffer, "<hr>", "<p>")
strBuffer = replace(strBuffer, "size=+2","")
'Now we're ready to spit out the results
response.write vbcrlf & "<DIV class=""clickableDiv"" oncontextmenu=""return
event.ctrlKey"">"
response.write strBuffer
response.write "</div>" & vbcrlf
Set xml = Nothing
Set strBuffer=Nothing
%>
----- Original Message -----
From: "Charles Grisar" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, December 21, 2000 6:06 AM
Subject: (no subject)
> Hello,
>
> I am currently creating my ASP's using PerlScript. This is because I need
to
> download a lot of pages from the Internet and parse them for content.
> VBScript doesn't seem to be up to this job.
>
> Now, I'd like to have my web hosted, in a shared system.
>
> I now how to install PerlScript on my computer but I am not sure about the
> instructions I should give to the hoster.
> I know that he already supports Perl through cgi-bin.
>
> Thanks for the help,
>
> Charles
> _________________________________________________________________________
> Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.
>
> _______________________________________________
> ActivePerl mailing list
> [EMAIL PROTECTED]
> http://listserv.ActiveState.com/mailman/listinfo/activeperl
_______________________________________________
ActivePerl mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/activeperl