|
-
Mar 8th, 2004, 11:07 PM
#1
Thread Starter
PowerPoster
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
-
Mar 8th, 2004, 11:57 PM
#2
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:
<%
Server.ScriptTimeout = 90
Private Function IPLookUP(IP)
dim URL
URL = "http://www.hexillion.com/samples/AspLookup.asp?addr=" & IP
Dim objXMLHTTP
Dim ret
Set objXMLHTTP = Server.CreateObject("Microsoft.XMLHTTP")
objXMLHTTP.Open "POST", URL, False
objXMLHTTP.Send
ret = objXMLHTTP.ResponseText
IPLookUP = ParseText(ret)
Set objXMLHTTP = Nothing
End Function
function ParseText(txt)
Dim pos1
Dim pos2
pos1 = InStr(1, txt, "canonical name")
If pos1 > 0 Then
pos1 = InStr(pos1, txt, "<strong>")
pos2 = InStr(pos1 + 8, txt, "<")
ParseText = Mid(txt, pos1 + 8, pos2 - pos1 - 8)
End If
end function
%>
[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 : 
-
Mar 9th, 2004, 12:04 AM
#3
IF you want to put the returned out put to a text file, simply use FSO.
VB Code:
Dim fso, f1
Set fso = CreateObject("Scripting.FileSystemObject")
Set f1 = fso.CreateTextFile("c:\testfile.txt", True)
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 : 
-
Mar 9th, 2004, 12:53 AM
#4
Thread Starter
PowerPoster
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
-
Mar 9th, 2004, 02:38 AM
#5
Thread Starter
PowerPoster
ok got it working thanks Danial.
Perfect
-
Mar 9th, 2004, 08:55 AM
#6
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|