I am having some success with the method you suggested but...
It only seems to work if the script I want to include and view is in the same directory as the page that is running.
ie. I get the following warning:
Warning: file_get_contents(http://www.school.k12.wi.us/psi/jpgraph-2.2/src/Mygraphs/q_SEASON_COUNT.php) [function.file-get-contents]: failed to open stream: No such file or directory in /usr/local/www/htdocs/psi/querytest.php on line 118
...if I code it like so
$homepage = file_get_contents(http://www.school.k12.wi.us/psi/jpgraph-2.2/src/Mygraphs/_q_SEASON_COUNT.php');
ALSO, I get some kind of partially processed content (rather than the raw file content) UNLESS I PUT THE OUTPUT IN A TEXTAREA
ie. if it is coded like this:
echo "$homepage";
I get the following:
SetShadow(); // Use a "text" X-scale $graph->SetScale("textlin"); // Specify X-labels $graph->xaxis->SetTickLabels($seasons); // Set title and subtitle $graph->title->Set($title); // Use built in font $graph->title->SetFont(FF_FONT1,FS_BOLD); // Create the bar plot $b1 = new BarPlot($counts); //$b1->SetLegend("Temperature"); //$b1->SetAbsWidth(6); //$b1->SetShadow(); // The order the plots are added determines who's ontop $graph->Add($b1); // Finally output the image $graph->Stroke(); ?>
...but if it is coded like so,
echo "<textarea rows=\"20\" cols=\"80\">$homepage</textarea>";
...a textarea shows (even though it is not part of a form) that DOES show the raw file content...just as I want.
I'd love to use the highlight function...but can't seem to get it to show up on the page.