photos->photo; $i=0; //parsing XML album foreach($photos as $photo){ //get photo attributes foreach($photo->attributes() as $a => $b){ $p[$a]=$b; } $i++; $img[$i]['url'] ='http://farm'.$p['farm'].'.static.flickr.com/'.$p['server'].'/'.$p['id'].'_'.$p['secret'].'.jpg'; // if you prefer bigger size uncomment the line below //$img[$i]['url'] ='http://farm'.$p['farm'].'.static.flickr.com/'.$p['server'].'/'.$p['id'].'_'.$p['secret'].'_b.jpg'; $img[$i]['square'] ='http://farm'.$p['farm'].'.static.flickr.com/'.$p['server'].'/'.$p['id'].'_'.$p['secret'].'_s.jpg'; $img[$i]['title'] = $p['title']; // if necessary (depedning of you page encoding) $img[$i]['title'] = utf8_decode($img[$i]['title']); } //if we have images we print the gallery if(count($img)){ if($randomize) shuffle($img); ?>
Script by aSeed © webdesign and photography