//SLIDEjax.php
/* + Slurps the contents of the referring URL,
* + Extracts everything between
* and
* + Treats each
,, as the beginning of
* of a (leaves
and beyond alone)
* + Wraps S5 slide show classes and javascript around everything
*/
$ref = $_SERVER['HTTP_REFERER'];
$toppieces = split("/",$ref);
$mysite = $toppieces[3]."/".$toppieces[4]."/";
//$pieces = split('physix/302/',$ref);
$pieces = split($mysite,$ref);
if ($pieces[1] == ''){
die ("called from bad URL!");
}
$morepieces = split('/',$pieces[1]);
$thedir = $morepieces[0] ."/";
// Works on local machine
//$fcontents = join('',file('http://localhost/physix/100/'.$pieces[1]));
$fcontents = join('',file('http://www.goshen.edu/'.$mysite.$pieces[1]));
preg_match('/slide begin-->(.*)