473,516 Members | 3,456 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

asp include files from different server

1 New Member
Does anyone know if you can include files from another server/domain?

ie: <!-- #include file="http://www.someotherdomain.com/file.inc" -->

Thank you
May 26 '06 #1
2 6421
Niheel
2,456 Recognized Expert Moderator Top Contributor
I don't think that can be done. Code files are interpreted on the local server, so the display would be blank. Not only that; there would definitely be some security issues involved with that.
May 26 '06 #2
johnnyc3po
1 New Member
Does anyone know if you can include files from another server/domain?

ie: <!-- #include file="http://www.someotherdomain.com/file.inc" -->

Thank you

Yes, you have to use XMLHTTP

Something like this..

<%
Response.Buffer = True
Dim objXMLHTTP, xml

' Create an xmlhttp object:
Set xml = Server.CreateObject("Microsoft.XMLHTTP")
' Or, for version 3.0 of XMLHTTP, use:
' Set xml = Server.CreateObject("MSXML2.ServerXMLHTTP")

' Opens the connection to the remote server.
xml.Open "GET", "http://pathToIncludeOnDifferentserver", False

' Actually Sends the request and returns the data:
xml.Send

'Display the HTML
Response.Write xml.responseText


Set xml = Nothing
%>
Dec 18 '06 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

11
2975
by: Yannick Turgeon | last post by:
Oups! I did a typing error in my last post. Fixed. ----------- Hello all, We are currently changing our web server and, in the process, updating PHP version from 4.3.0 to 4.3.5. The problem we've got is that our way to include some files in other ones is no more working properly. The message we are getting looks like: "PHP Warning:...
6
4646
by: JStrummer | last post by:
I have a question regarding paths and the include() statement in PHP. I develop in a Windows environment and will be publishing to a Linux server. I would like to do the following: 1. Setup my include references in such a way that I don't have to change them all every time I have to publish to the production server 2. Setup above in...
2
1879
by: Marcus | last post by:
Hello, I am having problems with an include statement. I'm setting a session variable flag and then including a file, and in that include file I have a check at the top to make sure that the session variable is set, otherwise I stop executing and redirect. My problem is that this works if I use a relative path to the include file, but...
2
1497
by: \A_Michigan_User\ | last post by:
Ok, I give up. I need to #include the same 1 file (IncludeThis.asp) into 3 different asp files. 1> C:\MyDir\ThisFile.asp 2> D:\MyDir\AASubSub\ThatFile.asp 3> E:\MyDir\CCSub\DDSubSub\AnotherFile.asp On another server... those same 3 files... need to include
5
2495
by: David Mathog | last post by:
One thing that can make porting C code from one platform to another miserable is #include. In particular, the need to either place the path to an included file within the #include statement or to very carefully define the order in which paths are searched with command line options on the compiler. Both can cause problems, especially when...
2
1491
by: Bill Roper | last post by:
Did you know that the #include directive when using angle brackets works substantially differently in VC7 than it did in VC6? It used to be that the reference for the additional include directories that you specify for the project started from the project directory. Now it appears to start from the directory that you're including the file...
6
2094
by: tshad | last post by:
In my User control, I tried to do this: *************************************************************************** <Script runat="server"> Public ClientName As String = "<!-- #include file = ...\includes\StaffingHeaders.inc -->" </Script> <%=ClientName%> ****************************************************************************
5
4044
by: Viken Karaguesian | last post by:
Hello all, I've used the SSI Include command successfully in the past to include frequently used files that are based within my own site. However, what if I was to use a file located in a differnt location - a different site altogether? I've Googled different variations of "how to insert an URL using #include" but all of the sites that...
111
4555
by: Nate | last post by:
Hello, I am looking for a method to automatically declare variables in C. I'm not sure if there is a good way to do this, but I had something like this in mind... int i; for(i = 1; i < 4; i++){
5
3808
by: rockdale | last post by:
Hi, all: Hope somebody can solve this problem for me. We are migrating 3 asp website into IIS 6.0 on a server 2003. we do not want to create 3 website since we do not want to acquire different ports or ip for these websites. SO we create 3 virtual directory under the default website, but we got problems because the asp pages include...
0
7273
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7182
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7405
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
1
7136
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
5712
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5106
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
4769
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3252
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
823
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.