Results 1 to 6 of 6
  1. #1
    All Around Web Guy Cursal's Avatar
    Join Date
    January 18th, 2005
    Posts
    829
    Include page/code (SSI)
    Wondering if any body has tried this....

    What I would like to do is add a page into another page across a several sites so I only have to update the one page and have the update displayed at each place I put the coding.

    I was thinking about this in terms of ssi.

    <!--#include file="copyright.html" --> is used when the file called is in the same directory.

    <!--#include virtual="/test/copyright.html" --> is used when the file call is NOT in the same directory.


    Now what do I use to call the ssi from a different website?
    I do not want to use iframes to do this and wonder if anybody has a solution to this problem.

    I tried using abolute paths to the file I wanted to call like this:

    <!--#include virtual="http://www.Mysite.com/test/copyright.html" -->
    that did NOT work
    <!--#include virtual="www.Mysite.com/test/copyright.html" -->
    NO go there either


    Edit to add: If this can be done using php or another language I am open to suggestions.

    Thanks for any input you may have
    --Brian

    Oregon Publishing: Web Development, Graphic Design, Domains & Marketing
    Deluxe Banners Bartender's Guide Cooking Jobs

  2. #2
    ABW Veteran Mr. Sal's Avatar
    Join Date
    January 18th, 2005
    Posts
    6,795
    How about something like this:

    <script language="JavaScript"
    src="http://www.Mysite.com/test/copyright.html"> </script>
    ...

  3. #3
    All Around Web Guy Cursal's Avatar
    Join Date
    January 18th, 2005
    Posts
    829
    Sal,

    That may work, but I need the page to be seen by the SE and get indexed.

    Sorry I should have mentioned that.

    Anything else up your sleave
    Oregon Publishing: Web Development, Graphic Design, Domains & Marketing
    Deluxe Banners Bartender's Guide Cooking Jobs

  4. #4
    ABW Veteran Mr. Sal's Avatar
    Join Date
    January 18th, 2005
    Posts
    6,795
    Anything else up your sleave
    Yes, indeed.

    I'm also trying to get the GoldenCAN script to do what I want.

    Don't tell anybody about this, ok?

    ----------
    You know that if we put the GoldenCAN script on a page, when people search or click on any of those links, that the page will come back with the results on the same page, right?

    The problem I see with that is that whether you click on a category or do a search on the search box, the results are displayed on the same page you have the script, that might not be too bad if that page is just a page with the GoldenCAN script alone, but if you put that script on a page with some other content on it, every time that the people do a new search or click on a new category or click on a next page #, the same original content will also be displayed on that page and that looks ugly.

    So I am experimenting with the SSI and the JavaScript's too, in order to have it my way.

    I use the FDSE on my site and on every page on my site a have a search box. Every time that my visitors do a search from any page, they will get the results on a page that only have the site heading and the search results.

    That's what I am trying to do with the GoldenCAN script search box. I just don't want the search results to be displayed on the same page from where the search was made.

    If I figured out, I will PM you.

    In the meantime let's burn our brains.

    Sal.
    ...

  5. #5
    Full Member c4's Avatar
    Join Date
    January 18th, 2005
    Posts
    488
    Hi,

    SSI does the job but it won't work for multiple sites, only within 1 account.

    It's quite easy in PHP though, but your PHP installation must have "allow_url_fopen" set to 1 (On) - it does by default. Try using:

    <?php include('http://www.domain.com/copyright.html'); ?>

    everywhere you want that to be displayed.

    One thing though: the page where you place this code must be named .php and not .html. It can be a simple HTML file, just rename it to "test.php" and insert the above code where you want the copyright to be displayed.
    [URL=http://www.hesk.com]Help desk software[/URL]

  6. #6
    ABW Veteran Mr. Sal's Avatar
    Join Date
    January 18th, 2005
    Posts
    6,795
    One thing though: the page where you place this code must be named .php and not .html. It can be a simple HTML file, just rename it to "test.php" and insert the above code where you want the copyright to be displayed.
    Not necessarily,

    All of my pages end with .html and I use a lot of SSI on many .html pages and it works.

    Since I included this line: AddType text/x-server-parsed-html .html on my .htaccess file, I don't have to have any page ending with .php any longer.

    On any .html that I want to include any SSI, all I do is this: <!--#include virtual="any-page.html" --> or <!--#include virtual="any-page.txt" --> and it always works fine.

    Sal.
    ...

  7. Newsletter Signup

+ Reply to Thread

Similar Threads

  1. what php include code do you use and...why?
    By Adrian in forum Programming / Datafeeds / Tools
    Replies: 23
    Last Post: February 28th, 2007, 01:03 PM
  2. AE - How to include synopsis in details page
    By Alannah in forum Cusimano.com Scripts
    Replies: 2
    Last Post: April 5th, 2006, 10:26 AM
  3. SSI to detail page?
    By bsnrjones in forum Cusimano.com Scripts
    Replies: 1
    Last Post: February 5th, 2003, 08:07 AM
  4. ssi include not showing
    By icicle in forum Programming / Datafeeds / Tools
    Replies: 2
    Last Post: September 22nd, 2002, 07:56 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •