I want to make an app system like Facebook. I just need to know how to include remote files.
Like, for example:

require "top.php";
require "side-left.php";
//Start include (sanitize with ob_start();)
require "http://blah.com/bla1/bla2.php";
//End include
require "footer.php";

I'd like to figure out how to get a file list from the remote server, but it's ok if it is impossible.

Don't you just do this?


//includes remotefile.php
include_once 'remotefile.php';


I'm not sure if thats right though because when I try to link to my remote pages from index.php I get this page:

Not Found

The requested URL /FB/myapplications/remotefile.php was not found on this server.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.