//Open photocast feed and parse to get image info, details and links
$xml = "";
$f = fopen( 'https://www.partecipa.org/photocast/bergamo/seminario-internazionale-bilancio-partecipativo/index.rss', 'r' );
//$f = fopen( 'https://www.partecipa.org/photocast/marzabotto/20071213/index.rss', 'r' );
while( $data = fread( $f, 4096 ) ) { $xml .= $data; }
fclose( $f );
preg_match_all( "/\
- (.*?)\<\/item\>/s",
$xml, $pcastblocks );
echo ("
");
foreach( $pcastblocks[1] as $block )
{
preg_match_all( "/\
(.*?)\<\/title\>/",
$block, $title );
preg_match_all( "/\(.*?)\<\/link\>/",
$block, $link );
preg_match_all( "/\(.*?)\<\/guid\>/",
$block, $guid );
preg_match_all( "/\(.*?)\<\/itunes:subtitle\>/",
$block, $subtitle );
preg_match_all( "/\(.*?)\<\/thumbnail\>/",
$block, $thumbnail );
preg_match_all( "/\(.*?)\<\/description\>/",
$block, $description );
echo ("");
}
echo (" ");
?>