Topic: Reading config.php from external website
Hi there. I am using Juicebox on our new website(s) since some months. I used the config.php file (see below) to generate dynamic slideshows. On my first site it works all right and on my second site too, as long as all content is located on the same server. In this situation, whenever I have to upload new content , I have to upload it to both servers. So, I tried to make the embedded code on (one page of) my second website point to the juicebox folder on my first website but then the page on which the slideshow should show, says: "Juicebox Error: Config XML file not found." Can you please help me? What am I doing wrong here?
Embed code on first website (http://www.hendriksschoenmode.nl/yaktrax.htm):
<!--START JUICEBOX EMBED-->
<script src="juicebox/Yaktrax/jbcore/juicebox.js"></script>
<script>
new juicebox({
baseUrl : 'juicebox/Yaktrax/',
configUrl : 'config.php',
containerId: "juicebox-container",
etc.
Embed code on second website (http://www.hendriksschoenmode.com/yaktrax.htm):
<!--START JUICEBOX EMBED-->
<script src="http://www.hendriksschoenmode.nl/juicebox/Yaktrax/jbcore/juicebox.js"></script>
<script>
new juicebox({
baseUrl : 'http://www.hendriksschoenmode.nl/juicebox/Yaktrax/',
configUrl : 'http://www.hendriksschoenmode.nl/juiceb … config.php',
containerId: "juicebox-container",
etc.
CONFIG.PHP looks like this:
<?php
header("Content-type: application/xml");
function GetDirArray($folder)
{
$handle=opendir($folder);
while ($file=readdir($handle))
{
if ($file!="." && $file!="..")
{
$ret[count($ret)]=$file;
}
}
closedir($handle);
sort($ret);
return $ret;
}
$gallery=GetDirArray('images');
echo '<?xml version="1.0" encoding="UTF-8"?>';
echo '<juiceboxgallery title="Juicebox Gallery">';
for ($i=0; $i<sizeof($gallery); $i++)
{
echo '<image imageURL="images/'.$gallery[$i].'" thumbURL="images/'.$gallery[$i].'" linkURL="" linkTarget="">';
echo '<title></title>';
echo '<caption></caption>';
echo '</image>';
}
echo '</juiceboxgallery>';
?>