ASPTear COM Object Sample
What about a simple component for "tearing" web pages from a server? AspTear allows you to retrieve web pages from servers easily with a bunch of features. More information can be found at http://www.alphasierrapapa.com/IisDev/Components/AspTear
The following is a working sample of how this component
works on Active Server hosting accounts. There are literally thousands
of other combinations, colors, methods, etc that could be used to
accomplish the same function. Please note that we do not provide
support for this sample. It is only provided as a guide to help
you get started.
All the ASP code is documented. What is not documented is the plain HTML tables which were added for aesthetic purposes.
This is what the ASP code looks like:
http:// <Input Type="text" Size="30" Name="URL2" Value=""><BR>
<Input Type="submit" Value="Tear URL">
If Len(Request("URL2")) > 0 Then
Const Request_POST = 1
Const Request_GET = 2
xobj = CreateObject("SOFTWING.ASPtear")
Response.ContentType = "text/html"
Error Resume Next
' URL, action, payload, username, password
strRetval = xobj.Retrieve("http://" & Request("URL2"), Request_GET, "", "", "")
If Err.Number <> 0 Then
If Err.Number >= 400 Then
Response.Write "Server returned error: " & Err.Number
Response.Write "Component/WinInet error: " & Err.Description
Response.Write "The Teared page will be displayed within this Red Frame."
And this is what it looks like in a web browser:
|Home | Hosting | Resellers | About Us | Testimonials | Site Map | Contact Us | Data Center | Helm | Support | Announcements | Order|