Results 1 to 6 of 6

Thread: HELP - Get Text Off Another Site

  1. #1

    Thread Starter
    PowerPoster Beacon's Avatar
    Join Date
    Jan 2001
    Location
    Pub Floor
    Posts
    3,188

    HELP - Get Text Off Another Site

    Hi Guys

    Our intranet is HTTPS:// now to show our share price we get the info from an external asp page run by another site which we dont have access too.
    Except we have access too it's output.

    How can i using ASP grab the output of that page and put it in a text file or display it in my aspx page without leaving the HTTPS zone.

    At the moment users get a warning about non secure content.

    any ideas
    cheers
    b

  2. #2
    Big D Danial's Avatar
    Join Date
    Jul 2000
    Location
    ASP.Net Forum
    Posts
    2,877
    Hi Beacon,
    I havent worked with HTTPS so dont know if my solution will work, but you can use MS XML HTTP Socket to connect to a remote site and get the output. I am sure you can parse the output to your need.

    Here is what i use to map IP to Domain name.

    Hope this helps.

    Danial

    VB Code:
    1. <%
    2. Server.ScriptTimeout = 90
    3.  
    4.  
    5. Private Function IPLookUP(IP)
    6.     dim URL
    7.     URL = "http://www.hexillion.com/samples/AspLookup.asp?addr=" & IP
    8.  
    9.     Dim objXMLHTTP
    10.     Dim ret
    11.  
    12.     Set objXMLHTTP = Server.CreateObject("Microsoft.XMLHTTP")
    13.  
    14.  
    15.         objXMLHTTP.Open "POST", URL, False
    16.  
    17.         objXMLHTTP.Send
    18.  
    19.         ret = objXMLHTTP.ResponseText
    20.  
    21.         IPLookUP = ParseText(ret)
    22.  
    23.  
    24.         Set objXMLHTTP = Nothing
    25.  
    26. End Function
    27.  
    28. function ParseText(txt)
    29.     Dim pos1
    30.     Dim pos2
    31.  
    32.     pos1 = InStr(1, txt, "canonical name")
    33.  
    34.     If pos1 > 0 Then
    35.         pos1 = InStr(pos1, txt, "<strong>")
    36.         pos2 = InStr(pos1 + 8, txt, "<")
    37.  
    38.  
    39.         ParseText = Mid(txt, pos1 + 8, pos2 - pos1 - 8)
    40.  
    41.     End If
    42. end function
    43. %>
    [VBF RSS Feed]

    There is a great war coming. Are you sure you are on the right side? Atleast I have chosen a side.

    If I have been helpful, Please Rate my Post. Thanks.

    This post was powered by :

  3. #3
    Big D Danial's Avatar
    Join Date
    Jul 2000
    Location
    ASP.Net Forum
    Posts
    2,877
    IF you want to put the returned out put to a text file, simply use FSO.

    VB Code:
    1. Dim fso, f1
    2. Set fso = CreateObject("Scripting.FileSystemObject")
    3. Set f1 = fso.CreateTextFile("c:\testfile.txt", True)
    4. f1.write (ret)
    [VBF RSS Feed]

    There is a great war coming. Are you sure you are on the right side? Atleast I have chosen a side.

    If I have been helpful, Please Rate my Post. Thanks.

    This post was powered by :

  4. #4

    Thread Starter
    PowerPoster Beacon's Avatar
    Join Date
    Jan 2001
    Location
    Pub Floor
    Posts
    3,188
    Hi Danial

    Thanks for your help.

    Error Type:
    (0x800C0005)
    /ARG/quote.asp, line 18

    Line 18 is:

    objXMLHTTP.Send

    I dont need to send any data to it?

    cheers
    b

  5. #5

    Thread Starter
    PowerPoster Beacon's Avatar
    Join Date
    Jan 2001
    Location
    Pub Floor
    Posts
    3,188
    ok got it working thanks Danial.

    Perfect

  6. #6
    Big D Danial's Avatar
    Join Date
    Jul 2000
    Location
    ASP.Net Forum
    Posts
    2,877
    Originally posted by Beacon
    ok got it working thanks Danial.

    Perfect
    You are welcome, gald it worked for you
    [VBF RSS Feed]

    There is a great war coming. Are you sure you are on the right side? Atleast I have chosen a side.

    If I have been helpful, Please Rate my Post. Thanks.

    This post was powered by :

Posting Permissions

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



Click Here to Expand Forum to Full Width