Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Include external file on web page

Status
Not open for further replies.

flo55y

Programmer
Aug 6, 2003
21
GB
Hi Folks,

I've been sent here via the HTML and Apache forums. Please bear with me as I don't know PHP at all.

I want to be able to include content from a file in a webpage. I'm currently using SSI Include and that is working great when the file to be included is on the server where the web page lives.

However, I have a requirement to include content from a file held on another server. The SSI Include command doesn't appear to support this. When I try virtual or file in the include statement, it won't resolve to a file outside of this server.

It has been suggested that this can be done via PHP.

Does anyone know of a way to do this? It's really driving me up the wall - such a simple thing to want to do.

Many thanks, Graham.


One day we'll look back on this, laugh nervously and change the subject...
 
You see. The PHP forum is where all the clever people have been hanging out!

Thanks a lot thedaver for this. It's just what I'm looking for.

I'll have a play and get back to you with the results.

Thanks once again.
Graham.

One day we'll look back on this, laugh nervously and change the subject...
 
Hi Folks,

Everything is working beautifully now. Thank you.

Just to let you know and anyone else that's looking to do this sort of thing how I resolved it.

I made use the following code (I didn't need to copy over the files as suggested by thedaver)...

Code:
<?php
include "[URL unfurl="true"]http://example.com/directory/file.ext";[/URL]
?>

and dropped this into my webpage.html code. I then renamed wegpage.html to webpage.php and it worked a treat!

Thanks once again.
Graham.

One day we'll look back on this, laugh nervously and change the subject...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top