I have a site (http://www.politicalcafe.us) that is supposed to display an article from a totally remote site (http://www.politicalcafe.org). The article to show is calculated based on a whole bunch of stuff. At the end of the calculations, a file number ($fnumber) is determined and the filename is chosen from an array.
$fname = $string[$fnumber];
I then want to include the remote file on the page so I set a variable to hold the entire URL of the file. (Note: $fileloc is determined earlier.)
$strfile = $fileloc."/".$fname;
include $strfile;
However, it won't display the file. On the other hand, I can use an include and it will do just fine. For example,
include "http://www.politicalcafe.org/archive/articles/040821_KerryAlzheimer.php";
includes the remote file just fine.
How do I get it to include the file from the variable name?