Adding to my post, above, re
URL file-access is disabled in the server configuration:
I found this is because my server has the PHP option
allow_url_fopen disabled, thus preventing accessing the file via http. For importing static html, the solution in the above post was fine.
But one of my import files was a php file that generated some variable text depending on the date. When accessing this directly instead of as an http import, all I got was the static php code, not the RESULT of running the php code.
The support folks at the server suggested using their installed cURL library in place of get_file_contents(). The following modification to this hack in forumdisplay.php is now working for me:
PHP Code:
Replace:
$mycustomheader = file_get_contents("http://www.mydomain.com/forums/filename.php"):
With:
$ch = curl_init();
$timeout = 5; // set to zero for no timeout
curl_setopt ($ch, CURLOPT_URL, 'http://www.mydomain.com/forums/filename.php');
curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt ($ch, CURLOPT_CONNECTTIMEOUT, $timeout);
$mycustomheader = curl_exec($ch);
curl_close($ch);
If you're having the same problem, check with your host as to whether they have the cURL library available.