Until and unless someone else can find you a more suitable solutions,
here's my two cents worth.
One way would be to fetch the pages from your server and them embed
them into your HTML. This method has some drawbacks which I have
listed below. It is essentially the very first step in making a
content management system. If you control all of the sites that feel
these portals, I'd consider a real content management system. Some
can be found for very cheap or even for free.
The obvious problems with fetching HTML from other sites and embedding
it it in your pages are:
1. Cookies will not work without some tricky manipulation since your server is
always requesting pages, not the client's browser.
2. You will need a page caching mechanism to avoid needless URL retrieval.
3. Your main page will have multiple <html> and <body> tags. I checked and this
is okay for IE 6.0, but may not work on other browsers. If not, you'll need
to strip out those tags after you fetch the URL.
4. Some JavaScript from sites outside of your control will likely not work.
5. All relative images and links will be broken. Only fully-qualified image
and link URLs will work in the pages that you embed this way. Linked
stylesheets and script files will also be broken unless their URLs are fully
qualified.
A page utilizing this approach would look something like this:
<%
' this is the source for http://www.otherwebsite.com/xyz.asp
%>
<html>
<head>
</head>
<body>
<table>
<tr>
<td><%= GetHtmlPageSource("www.indiaeducation.info/abc.asp") %></td>
<td><%= GetHtmlPageSource("www.indiaeducation.info/another.asp") %></td>
</tr>
<tr>
<td><%= GetHtmlPageSource("www.othersite.gov/info.html") %></td>
<td><%= GetHtmlPageSource("www.anothersite.com/somepage.htm") %></td>
</tr>
</table>
</body>
</html>
<%
Function GetHtmlPageSource(ByVal URL As String)
' function courtesy of http://www.devx.com/vb2themax/Tip/19342
Dim objHTTP As New XMLHTTP
' add the http:// in case it isn't already present in the specified URL
If Left$(URL, 7) <> "http://" Then URL = "http://" & URL
' open the page in sync mode
objHTTP.open "GET", URL, False
objHTTP.send
' check the result of the operation
If objHTTP.Status = "200" Then
GetHtmlPageSource = objHTTP.responseText
End If
End Function
%> |