XML - No actualiza fuente RSS

 
Vista:

No actualiza fuente RSS

Publicado por Titoworld (1 intervención) el 09/07/2008 13:47:32
Buenas!! Estoy integrando unas fuentes RSS en un fichero SWF (flash). Cada X tiempo refresco el contenido (ya que son unas fotos aleatorias y cada vez salen unas distintas). Con firefox no tengo problemas, pero con internet explorer me carga todas las veces las mismas fotos, como si se quedara en caché.

El fichero de rss es este:

<?php

define('IN_COPPERMINE', true);
define('INDEX_PHP', true);
require('include/init.inc.php');

//How many items you want to show in RSS feed
$thumb_per_page = 2;

$thumb_count = 2;
$lower_limit = 15;

if(isset($_GET['album'])){
$album = $_GET['album'];
}

//If it is a numeric album get the name and set variables
if ((is_numeric($album))){
$album_name_keyword = get_album_name($album);
$CURRENT_CAT_NAME = $album_name_keyword['title'];
$ALBUM_SET = "AND aid IN (".(int)$_GET['album'].")".$ALBUM_SET;
//Set the album to last uploaded
$album = 'lastup';
}

//If the album is not set set it to lastup - this is the default
if(!isset($album)){
$album = 'random';
}

if ((isset($_GET['cat']) && $_GET['cat'] < 0)){
$cat = - $_GET['cat'];
$album_name_keyword = get_album_name($cat);
$CURRENT_CAT_NAME = $album_name_keyword['title'];

$ALBUM_SET = "AND aid IN (".$cat.")".$ALBUM_SET;
}


//Changes these to point to your site if the following is not giving correct results.
$link_url = $CONFIG['ecards_more_pic_target']."displayimage.php?pos=-";
$image_url = $CONFIG['ecards_more_pic_target']."albums/";

$data = get_pic_data($album, $thumb_count, $album_name, $lower_limit, $thumb_per_page);

header ("content-type: text/xml");
//maybe you must change the encoding to iso-8859-1.
$rssHeader = <<<EOT
<?xml version="1.0" encoding="iso-8859-7"?>
<rss version="2.0"
xmlns:content="http://purl.org/rss/1.0/modules/content/"
xmlns:wfw="http://wellformedweb.org/CommentAPI/"
>
<channel>
<title>$CONFIG[gallery_name]</title>
<link>$CONFIG[ecards_more_pic_target]</link>
<description>$CONFIG[gallery_description] - $album_name</description>
<generator>http://www.oixalia.gr/gallery/rss.php</generator>
EOT;
echo $rssHeader;

foreach($data AS $picture) {

$thumb_url = "$image_url$picture[filepath]$CONFIG[thumb_pfx]$picture[filename]";
$keywords = explode(" ",trim($picture[keywords]));
$category_string = "";
foreach($keywords as $keyword){
// $category_string .= "<category>$keyword</category>";
}
$pubDate = gmdate("D, d M Y H:i:s", $picture[ctime]);

$description = '<center><a href="' . $link_url . $picture['pid'] . '"><img src="' . $thumb_url . '" border="1" hspace="2"> <align="center" ></a><br><br><br><br><br>'.bb_decode($picture[caption]).bb_decode($picture[caption_text]);
$description = htmlspecialchars($description);

$item = '<item>
<title>'.$picture[title].'</title>
<link>' . $link_url . $picture[pid] . '</link>
<pubDate>' .$pubDate.' EST</pubDate>

<description>'.$description.'</description>
</item>';

echo $item;
}

$rssFooter = <<<EOT
</channel>
</rss>
EOT;

echo $rssFooter;

?>
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder