Hi,

I'm trying to include an external page on a site without using an iframe. I've tried using include but that only gives the 'URL file-access is disabled in the server configuration' error so is not an option.

I've also tried using file_get_contents but that would require going through each line of the page and updating links code such as <script type="text/javascript" src="./js/jquery-1.2.6.min.js"></script> to lead to the correct external file.

Is anyone able to help with an alternative option or am I stuck with either an iframe as the 'best' option?

    Any non-frame solution, whether it's include, file_get_contents(), or using [man]cURL[/man] would still require the changing of relative links to full URLs. Alternatively, you could use a <base> element and set it to that remote page's URL. This would then require that all files on your site be referenced via full URLs.

    And, of course, this is assuming that you have a legal right to grab this remote content and display it on your site as if it were yours? (I.e.: do you have permission from the content owner to do this?)

      Yes I have permission but they supply it via an iframe whereas I would prefer to serve it through another option if possible. I'm guessing I'll have to go through the content and alter the code to fit the remote urls if there's no other option.

        Write a Reply...