ASPTear component..urgent

Results 1 to 2 of 2

Thread: ASPTear component..urgent

  1. #1
    Join Date
    Dec 1969

    Default ASPTear component..urgent

    Hey guys did anybody use ASPTear component, if so i need a faveor like i wanted to know what exactly can we do with that component.<BR>Thanks for the help in advance.<BR>Tracy

  2. #2
    Skippie Guest

    Default ASPTear component example

    I find the component useful because I can grab all the HTML text<BR>from another web page to a string. Then I can extract information<BR>from the string to display some information on my web page.<BR><BR>For example: Suppose you want to display the current weather<BR>for New York City, and you know where is it located<BR>on some weather web site. You grab the info to a string, extract the weather information to another string, then display it on <BR>your page.<BR><BR>For simplicity, I created a function that you can easily use.<BR><BR>Below is the function description, the function itself, and an <BR>example on using the function.<BR><BR><BR><BR><BR>Function URLToString(URL)<BR> This function returns all the HTML from a web page<BR> to a string. If there is an error, then the string<BR> will begin with the text "FAILURE:"<BR> Before useing the function, you have to register the<BR> ASPTear.dll file.<BR><BR><BR><BR>&#060;%<BR><BR> Function URLtoString(URL)<BR> Dim xobj, s <BR><BR> Const Request_GET = 2<BR><BR> Set xobj = CreateObject("SOFTWING.ASPtear")<BR> s = xobj.Retrieve(URL, 2, "", "", "")<BR><BR> If Err.Number &#060;&#062; 0 Then<BR> If Err.Number &#062;= 400 Then<BR> s = "FAILURE: Server returned error: " & Err.Number<BR> Else<BR> s = "FAILURE: Component/WinInet error: " & Err.Description<BR> End If<BR> End If<BR> URLToString = s<BR> End Function<BR><BR><BR><BR> URLString = URLToString("")<BR><BR> Response.Write(URLString)<BR>%&#062;<BR><BR><BR><B R><BR>-- Skippie<BR><BR><BR><BR><BR><BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts