PDA

View Full Version : One Page on Multiple Sites - Without Frames?



usabilityfreak
09-07-2003, 07:44 PM
I have been trying to figure out how to reuse articles from one site to the next without using frames. Let's say I write an article on Email Virus' (virii, really) and do not want to use frames to place the artricle on 2 other sites I have.

I also do not want to have to remember that I have three copies of this article on 3 different sites and hunt it down for updating.

Ideas on how to implement this? I'd think it would be pretty easy somehow especially since I use ASP.

redcircle
09-07-2003, 11:14 PM
asp or php.

it would be very easy to do that with the help of a database also

orvadotech
09-07-2003, 11:40 PM
If your server is running Adv. Server 2000 and you have the Microsoft XML component installed (is it installed by default?), you can pull a page from any server. Try this code on your server to test it out.

<%
dim Htp, x, Out

set Htp = Server.CreateObject("Msxml2.ServerXMLHTTP")
x = Htp.open ("GET", "http://www.google.com/", false)
Htp.send()
out = Htp.responseText

%>
<html>
<head>
</head>
<body>
<H2>Server.XMLHTTP Test</H2>

<XMP>
<%= Out %>
</XMP>
</body>
</html>

GooMoo
09-08-2003, 10:41 AM
Yeah try using asp includes. Single out only the article text, maybe even make two files if you have like an article title and image that the top that can't be put in the same place as the article itself. if the text formatting is dictated by your css rather than inline with the text it should look fine on whatever page you put it in.

swstyles
09-08-2003, 11:39 AM
See if the site you are grabbing content from has webservices. If it does then that site can feed you only the content you desire.

usabilityfreak
05-25-2005, 08:34 PM
Thank you all for your answers.

Simple answer years later. I could not get ASP includes to pull pages from other domains, don't want to be limited to using (or understanding) Windows Advanced Server, and do not want to be limited to a database.

The answer it turns out, only one among many came in the form of a PHP include. The target content should be unformatted HTML with no <HTML>, <HEAD> or <BODY> tags, and pictures need to have full paths. The code is simple:

<? include "http://www.articleresideshere.com/article.xyz"; ?>