OK, here is what I have so far - basically the same as what was posted before but this add support for captions and titles..plus some comments that might help. I plan on working on this some more, but for now here you go:
<?php
$baseURL = $_GET['baseURL'];
$parameters = array(
'album' => $_GET['album'],
'w' => $_GET['w'],
'h' => $_GET['h'],
's' => $_GET['s'],
'q' => $_GET['q'],
'sh' => $_GET['sh'],
'tw' => $_GET['tw'],
'th' => $_GET['th'],
'ts' => $_GET['ts'],
'tlw' => $_GET['tlw'],
'tlh' => $_GET['tlh'],
'tq' => $_GET['tq'],
'tsh' => $_GET['tsh'],
'pw' => $_GET['pw'],
'ph' => $_GET['ph'],
'aps' => $_GET['aps'] );
header('Content-type: application/xml');
$doc = new DOMDocument('1.0', 'iso-8859-1');
$sourceURL = $baseURL . "/images.php?" . http_build_query($parameters);
$doc->load( $sourceURL );
$images = array();
$xmlimages = $doc->getElementsByTagName( "img" );
foreach( $xmlimages as $xmlimage )
{
$images[] = array( 'id' => $xmlimage->getAttribute('id'), //Image catalog id
'src' => $xmlimage->getAttribute('src'), //Image url
'file' => $xmlimage->getAttribute('file'), //Image file name
'tn' => $xmlimage->getAttribute('tn'), //Thumbnail, hover
'tnsm' => $xmlimage->getAttribute('tnsm'), //Thumbnail, navigation
'dims' => $xmlimage->getAttribute('dims'), //Image dimensions, original
'fp' => $xmlimage->getAttribute('fp'), //Image focal point
'target' => $xmlimage->getAttribute('target'),
'link' => $xmlimage->getAttribute('link'),
'tags' => $xmlimage->getAttribute('tags'), //Image tags
'caption' => $xmlimage->getAttribute('caption'), //Image caption
'title' => $xmlimage->getAttribute('title')); //Image title
}
$dom = new DOMDocument('1.0', 'UTF-8');
$dom->formatOutput = true;
$r = $dom->createElement( "juiceboxgallery" );
$dom->appendChild( $r );
foreach( $images as $image )
{
$b = $dom->createElement( "image" );
$title = $dom->createElement( "title" );
$title->appendChild( $dom->createTextNode( $image['title'] ) );
$b->appendChild( $title );
$caption = $dom->createElement( "caption" );
$caption->appendChild( $dom->createTextNode( $image['caption'] ) );
$b->appendChild( $caption );
$b->setAttribute( "imageURL", $baseURL . "/p.php?a=" . $image['src'] );
$b->setAttribute( "thumbURL", $baseURL . "/p.php?a=" . $image['tn'] );
$b->setAttribute( "linkURL", $baseURL . "/p.php?a=" . $image['src'] );
$b->setAttribute( "linkTarget", $image['target'] );
$r->appendChild( $b );
}
echo $dom->saveXML();
$dom->save("config.xml")
?>
-N