SitePoint Sponsor |
|
User Tag List
Results 1 to 7 of 7
-
Mar 30, 2005, 12:44 #1
- Join Date
- Mar 2005
- Posts
- 16
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
parsing the contents from other webpages
Hi everyone,
I am doing a research on a project for my website. there is a web page which runs on a server other then my own server and i want to get some(not all) of the contents of that page and show it on my own page.Is there a way to do it with asp or asp.net????
rEgArDs,
star_wars
-
Mar 30, 2005, 13:04 #2
- Join Date
- Jan 2005
- Location
- Albany, NY
- Posts
- 151
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
This link should help:
ASPFAQ #2173: How do I read the contents of a remote web page?
Good luck...Join the EasyImage Affiliate Program!
• 30% commission on all sales
• Conversion rates as high as 20%
• Dedicated Affiliate Manager to help you succeed!
-
Mar 31, 2005, 00:14 #3
- Join Date
- Mar 2005
- Posts
- 16
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Originally Posted by csi95
i am going to look at it. i didnt know if it was possible.
regards
-
Mar 31, 2005, 05:52 #4
- Join Date
- Mar 2005
- Posts
- 16
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Originally Posted by csi95
I have tried to get some variable through xmlhttp object but i get the following error :S
The XML page cannot be displayed
Cannot view XML input using XSL style sheet. Please correct the error and then click the Refresh button, or try again later.
--------------------------------------------------------------------------------
A name was started with an invalid character. Error processing resource 'http://127.0.0.1/test/test4.asp'. Line 48, Positi...
else if (document.all&&document.readyState=="complete")
----------------------^
and the code is:
<html>
<head>
</head>
<body>
<%
Response.ContentType = "text/xml"
dim objXMLHTTP
set objXMLHTTP = Server.CreateObject("Microsoft.XMLHTTP")
objXMLHTTP.Open "GET", "http://127.0.0.1/test/test6.html?class=Template34TableTT", false
objXMLHTTP.SetRequestHeader "Content-type", "text/xml"
objXMLHTTP.Send
Response.Write objXMLHTTP.ResponseText
%>
<%
if Request.ServerVariables("HTTP_METHOD") = "GET" then
end if
%>
</body>
</html>
-
Mar 31, 2005, 07:43 #5
- Join Date
- Nov 2004
- Location
- Nelson BC
- Posts
- 2,310
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Do you get that same error if you load
http://127.0.0.1/test/test6.html?cla...plate34TableTT
directly in your browser?
Try changing
Response.Write objXMLHTTP.ResponseText
To
Response.Write "<textarea>" & objXMLHTTP.ResponseText & "</textarea>"
see if that throws an error
Also you don't need
objXMLHTTP.SetRequestHeader "Content-type", "text/xml"
But I doubt it's doing anything bad - try removing it though.
-
Apr 4, 2005, 07:28 #6
- Join Date
- Mar 2005
- Posts
- 16
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Originally Posted by jimfraser
thanx alot it did help but i get now another error:
The XML page cannot be displayed
Cannot view XML input using XSL style sheet. Please correct the error and then click the Refresh button, or try again later.
--------------------------------------------------------------------------------
A name was started with an invalid character. Error processing resource 'http://127.0.0.1/test/test4.asp'. Line 49, Positi...
else if (document.all&&document.readyState=="complete")
----------------------^
and this the area where this error is given:
else if (document.all&&document.readyState=="complete")
{
document.all.LayerTT.innerHTML=text
document.all.LayerTT.style.pixelLeft=event.clientX+document.body.scrollLeft+offsetx
document.all.LayerTT.style.pixelTop=event.clientY+document.body.scrollTop+offsety
document.all.LayerTT.style.visibility="visible"
}
else if (document.layers)
{
document.LayerTT.document.nstip.document.write('<b>'+text+'</b>')
document.LayerTT.document.nstip.document.close()
document.LayerTT.document.nstip.left=0
currentscroll=setInterval("scrolltip()",100)
document.LayerTT.left=e.pageX+offsetx
document.LayerTT.top=e.pageY+offsety
document.LayerTT.visibility="show"
}
}
i cant imagine whats going wrong
with regards
-
Apr 4, 2005, 08:51 #7
- Join Date
- Nov 2002
- Posts
- 423
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Bookmarks