code,steals,infooutput,from,other,pages,used,
Quick Search for:  in language:    
code,steals,infooutput,from,other,pages,used,
   Code/Articles » |  Newest/Best » |  Community » |  Jobs » |  Other » |  Goto » | 
CategoriesSearch Newest CodeCoding ContestCode of the DayAsk A ProJobsUpload
ASP/ VbScript Stats

 Code: 132,008 lines
 Jobs: 198 postings

 
Sponsored by:

 

You are in:

 
Login


 

 


Latest Code Ticker for ASP/ VbScript.
if i remember, this is a M. Harris code sample
By ask on 8/24


MTS Registration Script
By Igor Krupitsky on 8/23


Click here to see a screenshot of this code!Creating Windows Users with ASP and ADSI
By jamespwalters on 8/23

(Screen Shot)

News Poster (Advanced)
By Martin Kilbryde on 8/22


Print a web document through MS Word
By ask on 8/22


Click here to see a screenshot of this code!ADSI Domain Group Explorer
By Gordon Asbach on 8/22

(Screen Shot)

_-~Who is looking at your site? v2.0!~-_
By John on 8/22


Using HTML Option to Display Current Month
By Patrick Ingle on 8/20


FdB: Free Database (Aka Fake Database)
By TV2k.net on 8/19


Click here to put this ticker on your site!


Add this ticker to your desktop!


Daily Code Email
To join the 'Code of the Day' Mailing List click here!





Affiliate Sites



 
 
   

Stealing Information from Another Web Page (

Print
Email
 
VB icon
Submitted on: 4/10/2000 7:07:30 PM
By: Kevin Reay 
Level: Intermediate
User Rating: By 6 Users
Compatibility:ASP (Active Server Pages), VbScript (browser/client side)

Users have accessed this code 13811 times.
 
 
     This code steals info/output from other pages! This can be used create meta-searches by grabing the output of other pages!!! For example, you could pass a search string into 2 existing pages and return the results to a single page!
 
code:
Can't Copy and Paste this?
Click here for a copy-and-paste friendly version of this code!
 
Terms of Agreement:   
By using this code, you agree to the following terms...   
1) You may use this code in your own programs (and may compile it into a program and distribute it in compiled format for languages that allow it) freely and with no charge.   
2) You MAY NOT redistribute this code (for example to a web site) without written permission from the original author. Failure to do so is a violation of copyright laws.   
3) You may link to this code from another website, but ONLY if it is not wrapped in a frame. 
4) You will abide by any additional copyright restrictions which the author may have placed in the code or code's description.

    '**************************************
    ' 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
    '
    'This code is copyrighted and has    ' limited warranties.Please see http://w
    '     ww.Planet-Source-Code.com/xq/ASP/txtCode
    '     Id.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", "")
    %>
    <HTML>
    <HEAD>
    <TITLE>Web output Stealer</TITLE>
    </HEAD>
    <BODY>
    <P>The output of the page is: <%=sInfo %></P>
    </BODY>
    </HTML>

 
Report Bad Submission
Use this form to notify us if this entry should be deleted (i.e contains no code, is a virus, etc.).
Reason:
 
Your Vote!

What do you think of this code(in the Intermediate category)?
(The code with your highest vote will win this month's coding contest!)
Excellent  Good  Average  Below Average  Poor See Voting Log
 
Other User Comments
4/10/2000 8:16:51 PM:Mike Stevenson
I'd like to know where I can get this 
'InetCtls.Inet' component so that I can 
actually try this...  There is no link 
to download it.
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
4/10/2000 8:49:20 PM:Kevin Reay
It should come with win2000 server of 
Visual Basic.  Are you running Win2k 
Server?
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
4/18/2000 10:45:16 AM:Tetteh Pecku
We are running Windows NT on our 
development server.  How do I get a 
hold of the InetCtrls.Inet component?  
Also, regexp is not a standard object 
on our server.  This does exactly what 
we need.  Any ideas on where I can get 
the component etc? 
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
5/18/2000 2:15:46 PM:Rio
where I can get 'InetCtls.Inet' 
component so that I can try this code?
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
8/27/2000 9:51:27 PM:Fabio A.
Dear,
Author or anyone with 
information...
I'm new to ASP and 
i'm currently making a website with 
meta-search engines.. and since this 
script gets me the code it is very 
useful to me... on the same note i have 
no clue what to do with the above code 
so if [[[anyone]]] could help me out 
please give me an email at 
[HELOCANE23@aol.com]
Fabio 
A.
Thanks In Advance For Those of 
you kind enough to help someone else in 
need..
Ps. thank you! :)
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
8/28/2000 9:07:48 AM:Khawja Ikram
Can u please send me a working example 
of this code. i tried but unable to 
grab the content of the site
It 
display me nothing, except that the 
output is like this:  blah blah
my 
email address is 
k_ikram@hotmail.com
Thanx in 
advance
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
8/28/2000 9:11:17 AM:Khawaja Ikram
i am unable to get the information in 
formated form, i get the pages, but i 
am unable to understand how to 
get/extract the information u required 
from the pages.
e.g: i want to get 
the query result in my own format from 
yahoo.com
can anybody send me the 
sample code using the above 
techniques
thanx in advance
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
10/31/2000 4:26:41 PM:Kennster
The author was not kind enough to point 
people to whatever ActiveX Control he 
used, where he probably pasted the 
sample code provided by the control, 
not realizing it wouldn't work without 
it. 
Either way, if you have 
Internet Explorer 5.0 or greater 
installed on your server, you can paste 
the following code into your script, 
and replace the part where he calls the 
external activex control with a call to 
the following function, which will grab 
the html from the page and return it as 
a string. 
<PRE>
Function 
HTTPGet(strURL) 'As String
    Dim 
strReturn ' As String
    Dim objHTTP 
'  As MSXML.XMLHTTPRequest
    If 
Len(strURL) Then
		Set objHTTP = 
Server.CreateObject("Microsoft.XMLHTTP")
		objHTTP.open "GET", strURL, 
False
		objHTTP.send   'Get 
it.
		strReturn = 
objHTTP.responseText
    End If
HTTPGet = strReturn   
End 
Function
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
8/25/2001 2:21:53 PM:Andrew
I like how you destroyed an object that 
you never ensantiated! (Set rWorldPop = 
Nothing) When Nathan Pond originally 
wrote that script, he used it to get 
the world's population from 
www.census.gov/cgi-bin/ipc/popclockw
Je
ez! If you are going to steal code, at 
least change the variable names, and 
don't destroy objects that you never 
even used!!! If you would like to see 
the REAL code; 
http://www.4guysfromrolla.com/webtech/04
0600-1.shtml
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
12/17/2001 11:04:16 AM:Marcio Coelho
Hi Kevin,
You said the tag can me 
more complex when I need to find what 
is int it.
My question to you is how 
more complex ?
Can I pass an Id 
?
Please help me and thaks in 
advance,
Marcio
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
7/3/2002 10:05:49 AM:skizmo
I'd like to know where I can get this 
'InetCtls.Inet' 
press ctrl-t in vb
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
7/9/2002 11:06:09 AM:vah
Hello, everybody. Can somebody tell me 
how to use this kind of code that I 
wrote earlier on my own to make a real 
time solution using ASP. I'd like to 
have a possibility to interrupt this 
process to restrict the time needed and 
to put out a result to a user.
I hope, 
it's clear what I mean.
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
Add Your Feedback!
Note:Not only will your feedback be posted, but an email will be sent to the code's author in your name.

NOTICE: The author of this code has been kind enough to share it with you.  If you have a criticism, please state it politely or it will be deleted.

For feedback not related to this particular code, please click here.
 
Name:
Comment:

 

Categories | Articles and Tutorials | Advanced Search | Recommended Reading | Upload | Newest Code | Code of the Month | Code of the Day | All Time Hall of Fame | Coding Contest | Search for a job | Post a Job | Ask a Pro Discussion Forum | Live Chat | Feedback | Customize | ASP/ VbScript Home | Site Home | Other Sites | About the Site | Feedback | Link to the Site | Awards | Advertising | Privacy

Copyright© 1997 by Exhedra Solutions, Inc. All Rights Reserved.  By using this site you agree to its Terms and Conditions.  Planet Source Code (tm) and the phrase "Dream It. Code It" (tm) are trademarks of Exhedra Solutions, Inc.