Please visit our sponsor
UNKNOWN
'**************************************
' Name: Stealing Information from Anothe
' r Web Page (
' Description:This code steals info/outp
' ut from other pages! This can be used cr
' eate meta-searches by grabing the output
' of other pages!!! For example, you could
' pass a search string into 2 existing pag
' es and return the results to a single pa
' ge!
' By: Kevin Reay
'
'
' Inputs:None
'
' Returns:None
'
'Assumes:None
'
'Side Effects:None
'This code is copyrighted and has limite
' d warranties.
'Please see http://www.Planet-Source-Cod
' e.com/xq/ASP/txtCodeId.6123/lngWId.4/qx/
' vb/scripts/ShowCode.htm
'for details.
'**************************************
<% Option Explicit %>
<%
Dim url'The URL to download
Dim sInfo 'string to hold the collected info
Dim sHTML 'String to hold HTML from download
Dim rReg 'var to hold regular expression
Dim objCols'Object to hold collections from Regular expression
Dim objMatch 'Object for matches
Dim inet 'Object for Inet Control
url = "WhatEverURL"
'Create instance of Inet Control
Set inet = Server.CreateObject("InetCtls.Inet")
'Set the timeout
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 s
' tored between
'the tags. This is where information is.
'
Set rReg = New regexp
'the TagGoesHere and EndTagGoesHere tags
' below represent
'the tags surrounding the information we
' want
'these tags can be more complex if requi
' red
rReg.Pattern = "TagGoesHere(.*)EndTagGoesHere"
rReg.Global = False
rReg.IgnoreCase = True
'Execute the regular expression on the r
' aw HTML
Set objCols = rReg.Execute( sHTML )
'Step through our matches
For Each objMatch in objCols
sInfo = sInfo & objMatch.Value
Next
'Clean up
Set rWorldPop = Nothing
Set objCols = Nothing
'Strip the TagGoesHere tags off of the i
' nfo
sInfo = Replace(Replace(sInfo, "TagGoesHere", ""), "EndTagGoesHere", "")
%>
Web output Stealer
The output of the page is: <%=sInfo %>