Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Including files from external servers??

Status
Not open for further replies.

RoKKos

Programmer
Feb 3, 2003
50
SE
Hi
I have files on 2 diffrent servers.
Server A is my webserver.
Server B is a server I cannot login to and only use there HTM/ASP pages with the HTTP protocol.

The problem I have is that i want to include a file from server B in a page that is on server A.

Code:
-------------------------------------------------
|               <#include file on A>             |
-------------------------------------------------
|                       |                        |
|                       |                        |
|<#include file on A>	|<#include file from B>  |
|                       |                        |
|                       |                        |
-------------------------------------------------
(i know that the syntax is wrong, just a bit simpifies)

can I do this with a simple include or a server.execute. Or is this impossible without creating a viritul catalog from server B??
 
I have tried that but I cant get it to work have also tried
Code:
<!--#include file=&quot;[URL unfurl="true"]http://www.aserver.com/myfile.htm&quot;-->;[/URL]
as I think would be then correct syntax
 
You can't include files from another server like this.

I seem to remember someone posting another technique a while ago but am having trouble finding it at the moment. Don't think it was that easy though...

--James
 
I have seen some posts here about this topic but none of them had a good answar to the question, most of then created a virituel directory and stuff like that, and I cant do that since I do not have access to that server.
 
As long as the content is only HTML or some other fixed type o content, you could use the XMLHttp control to request that content and then reuse it in your page. This will not work like an include because your receiving the content exactly as if you were the client browser requesting a page from the remote server. (Which is why it would work for static pages, but not dynamic pages)

-Tarwn

01010100 01101001 01100101 01110010 01101110 01101111 01101011 00101110 01100011 01101111 01101101
29 3K 10 3D 3L 3J 3K 10 32 35 10 3E 39 33 35 10 3K 3F 10 38 31 3M 35 10 36 3I 35 35 10 3K 39 3D 35 10 1Q 19
Get better results for your questions: faq333-2924
Frequently Asked ASP Questions: faq333-3048
 
Have tried to find tutorial about XMLHttp control to do requests, but have not found any... Do U know of any good pages were I can find some more extensive info about this??
 

-Tarwn

01010100 01101001 01100101 01110010 01101110 01101111 01101011 00101110 01100011 01101111 01101101
29 3K 10 3D 3L 3J 3K 10 32 35 10 3E 39 33 35 10 3K 3F 10 38 31 3M 35 10 36 3I 35 35 10 3K 39 3D 35 10 1Q 19
Get better results for your questions: faq333-2924
Frequently Asked ASP Questions: faq333-3048
 
Sever Side Include can work with the same server(web). This is not possible to include any files from another server into your asp file using the SSI technique.

You can Use Frames for this purpose. Alternatively you can use iframe like
<iframe src=&quot; name=&quot;Iframe1&quot; width=&quot;200&quot; height=&quot;200&quot; scrolling=&quot;yes&quot;></iframe>


Good Luck
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top