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

<?php
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.

Recommended Answers

All 3 Replies

Don't you just do this?

<?php

//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.

Thanks

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.