Don’t Use require() or include() to include dynamic pages from remote sources
Posted by simon at November 20th, 2007
I created a web statistics application a few years back, it was quite a big application and sometimes needed certain functionality on another server. To request this functionality I would use the PHP require() function to execute the remote file
require("http://www.remoteurl.com/generateStatsSummary.php?accountID=$ID&useDate=2007-11-20");
Then a few days back the main server this application is hosted on got hacked into and had to be rebuilt with new versions of MySQL and PHP installed. The application then decided to stop working, in the end I worked out that the more recent versions of PHP don’t allow you to pass query strings to remote files using the require() or include() functions; you must use file_get_contents() instead!

