Welcome to WebmasterWorld Guest from 54.205.36.165

Forum Moderators: ocean10000

Message Too Old, No Replies

Can you include a file from a different server (ie Domain)?

     
10:14 pm on Mar 2, 2004 (gmt 0)

New User

10+ Year Member

joined:Jan 28, 2004
posts:7
votes: 0


I am trying to utilize files from a different server (domain1) on a new site (domain2). Can you use these files as includes from one server to another? Like:
<!--#include file = "http://www.domain1.com/includes/somefile.asp"-->

I know what the obvious solution would be and that is to copy the files from one server to the other and use from there, but there is a method to my madness and would prefer to leave them on the original server.

Thanks for your help!
Kristib

10:24 pm on Mar 2, 2004 (gmt 0)

Junior Member

10+ Year Member

joined:Jan 6, 2003
posts:193
votes: 0


AFAIK that's not possible
10:25 pm on Mar 2, 2004 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Apr 12, 2002
posts:857
votes: 0


You can try an ASP component like ASPtear (free, I believe)
2:33 am on Mar 3, 2004 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Jan 16, 2003
posts:746
votes: 0


Do a search on google for "xmlhttp"

It should do the trick for you.

12:20 pm on Mar 3, 2004 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:June 13, 2002
posts:2162
votes: 0


Re asptear/xmlhttp

Can page scraping actually include asp code to execute? I though it just captured the page content as string.

If it was possible it would be very worrying...

3:55 pm on Mar 3, 2004 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Jan 16, 2003
posts:746
votes: 0


You can only fetch the rendered output, not the ASP code.
5:48 pm on Mar 3, 2004 (gmt 0)

Preferred Member

10+ Year Member

joined:Feb 27, 2003
posts:637
votes: 1


MrSpeed is correct, it will only get the rendered page output, not the actual code. Using xmlhttp is pretty neat especially if used within an application to get another page output from a different directory. Heck, you can even have all your variables in a single xml file and pull the variables that you want to be used in the page.

Mac

10:37 pm on Mar 3, 2004 (gmt 0)

New User

10+ Year Member

joined:Feb 3, 2004
posts:14
votes: 0


You can do it, using both XMLHTTP and the VBscript Execute statement. I wouldn't recommend it though as it creates substantial security risks.

A few links to get you started:
[4guysfromrolla.com ]
[msdn.microsoft.com ]
[4guysfromrolla.com ]

Also, for security, maybe do a hash or something similar on the code to ensure that when you receive the file it's the same as when it was sent.

Regards,
Eric

3:00 am on Mar 4, 2004 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Jan 16, 2003
posts:746
votes: 0


ebouwsema-
Do you mean you can execute ASP code remotely with the VBscript Execute statement? From what I understood in the articles you can simulate server.transfer and execute on the same machine.
3:39 am on Mar 4, 2004 (gmt 0)

New User

10+ Year Member

joined:Feb 3, 2004
posts:14
votes: 0


Mr. Speed,

The flow would work as follows:

  • Use the XMLHTTP object to retrieve the code from the remote server
  • Store the code in a string variable on the local server
  • Run the code from the string variable using the VBScript Execute statement, similar to as specified in the article above

    Note: the code on the remote server would have to use an extension other than ".asp" if the server is running IIS and it is setup to process the ASP files before outputting.

    Again I'd be quite concerned in regards to the security of using this method, the files would be easy to alter in transmission.

    I hope this answers your question.

    Eric

  •  

    Join The Conversation

    Moderators and Top Contributors

    Hot Threads This Week

    Featured Threads

    Free SEO Tools

    Hire Expert Members