SSI and PHP includes

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • crockett
    in a van by the river
    • May 2003
    • 76818

    #1

    SSI and PHP includes

    I'm trying to include a webpage file on some of my sites. The site hosting the file is on one server, but the site I want to include the file on is on another server.

    I've tried the standard SSI include of <!--#include file="http://www.myurl.com/includes/bahbahh.html"-->

    I've also tried setting up the page as a PHP page and using PHP includes for example.. <?php require("http://www.myurl.com/includes/bahbahh.html"); ?>

    neither seem to work.. I assume it's because the sites aren't on the same server. Is there anyway to make this work?
    In November, you can vote for America's next president or its first dictator.
  • Jakke PNG
    ex-TeenGodFather
    • Nov 2001
    • 20306

    #2
    <? @include("http://whateveryouwant.com"); ?>
    ..and I'm off.

    Comment

    • rickholio
      Confirmed User
      • Jan 2004
      • 1914

      #3
      Depending on your hosting, it's possible that you're firewalled against doing http requests out from your server. You may be able to talk to your host to get them to allow outgoing requests if that's the case.

      It should be easy to check that: Do an include of a known good site. If it doesn't work, chances are you're firewalled.
      ~

      Comment

      • crockett
        in a van by the river
        • May 2003
        • 76818

        #4
        Originally posted by TeenGodFather
        <? @include("http://whateveryouwant.com"); ?>
        humm that didn't work.. maybe it's what holio said..
        In November, you can vote for America's next president or its first dictator.

        Comment

        • mikeyddddd
          Viva la vulva!
          • Mar 2003
          • 16557

          #5
          Originally posted by crockett
          humm that didn't work.. maybe it's what holio said..
          That would appear to be the case. The example should work.

          Comment

          • Damian_Maxcash
            So Fucking Banned
            • Oct 2002
            • 12745

            #6
            Try using require instead of include

            Comment

            Working...