ASP Hosting Top Header
Easy ASP Hosting Logo ASP.NET Hosting   Toll Free: (800) 579-1657
ASP Hosting Contact Information
Windows Hosting
         Home         Hosting         Domains         Support          Order Windows 2003 Hosting
Helm Hosting

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

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:


<Form Name="form1">
http:// <Input Type="text" Size="30" Name="URL2" Value=""><BR>
<Input Type="submit" Value="Tear URL">

<table bgcolor="red">
               If Len(Request("URL2")) > 0 Then
                    Const Request_POST = 1
                    Const Request_GET = 2

                    Set xobj = CreateObject("SOFTWING.ASPtear")
                    Response.ContentType = "text/html"

                    On Error Resume Next
                    ' URL, action, payload, username, password
                    strRetval = xobj.Retrieve("http://" & Request("URL2"), Request_GET, "", "", "")

                     If Err.Number <> 0 Then
                         Response.Write "<b>"
                              If Err.Number >= 400 Then
                                   Response.Write "Server returned error: " & Err.Number
                                   Response.Write "Component/WinInet error: " & Err.Description
                              End If
                              Response.Write "</b>"
                    End If

                    Response.Write strRetval
                    Response.Write "The Teared page will be displayed within this Red Frame."
               End If


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