Forum Moderators: phranque
Maybe this is a stupid question, but I have been told that the only stupid question is the one you don't ask...
I have seen a great deal of discussion about using SSI in place of iFrames.
In my experience, I tried this, and it didn't work. The thing about frames is that they are a complete, self-contained Web page, with context, different validations, etc. You can cram anything, from anywhere, into a frame.
SSI, on the other hand, is an include of an HTML source file. You can use the virtual modifier to execute it as an HTML output, but I have never had success in SSI-ing files from outside the server's domain.
Am I wrong? Is this possible? I would dearly love it to be so. I can't deal with frames, so my answer to the particular conundrum at hand is "can't get there from here."
Is it possible to have an SSI like this?
<!--#include virtual="http://www.someserver.com/index.html" -->
That "http://" part is the killer. I am pretty sure that you cannot SSI off of a server domain for obvious security reasons.
If this is the case, then it is not a reasonable suggestion to say that an <iframe can be replaced with an <!--#include
If you are interested in doing more with server-side technology you may want to have a look at some of your options. PHP, for example, makes this real, real easy.
What would I do to accomplish the following? (This is the specific example of what am not able to do now):
I have a PHP-based database engine that allows searches of a database, and displays the results in a Web page.If I know that the results were to be displayed as only a part of a Web page (such as in a <div> or a <table><tr><td>), then I would pipe the output from the part of the program that has not had the HTML and template wrappers applied. This could easily be done by having an "embedded=1" flag in the request URI.
If I could do this, then I could provide the DB as a service to other Webmasters who could do a callout to it in their own PHP, and they would not have to use frames.
I can call this from code on the same server (as I do now), but I am not aware of the PHP required to render this code as an HTTP transaction. I will study this later tonight, but I would certainly appreciate any tips.
<html><head><title>Title</title></head><body>
<?php
include [php.net] 'http://www.example.com/index.php?embedded=1';
?>
</body></html>