View Full Version : RSS Feeds
tyanque
07-26-2007, 05:36 PM
Hey, Ive made a PHP RSS feed when i add new items to it, it updates in Firefox but not in IE which is a bit of a problem since most of the users on my site use IE, do anyone know what or why this is happening?
Thanks
Tyanque
Alex Vincent
07-26-2007, 11:35 PM
We can't really help you without some source code to work with...
tyanque
07-27-2007, 12:09 PM
<?php require_once('Connection/hanwell.php'); ?>
<?php
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
{
$theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
$theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
switch ($theType) {
case "text":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "long":
case "int":
$theValue = ($theValue != "") ? intval($theValue) : "NULL";
break;
case "double":
$theValue = ($theValue != "") ? "'" . doubleval($theValue) . "'" : "NULL";
break;
case "date":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "defined":
$theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
break;
}
return $theValue;
}
}
mysql_select_db($database_hanwell, $hanwell);
$query_Recordset1 = "SELECT * FROM News ORDER BY NewsID DESC";
$Recordset1 = mysql_query($query_Recordset1, $hanwell) or die(mysql_error());
$row_Recordset1 = mysql_fetch_assoc($Recordset1);
$totalRows_Recordset1 = mysql_num_rows($Recordset1);
?>
<?php header('Content-type: text/xml'); ?>
<rss version="2.0">
<channel>
<title>Hanwell Village News Feed</title>
<link>
http://www.hanwellvillage.com/</link>
<description>Hanwell Village Community Website</description>
<?php do { ?>
<item>
<title><?php echo $row_Recordset1['NewsTitle']; ?></title>
<link>http://i2.hanwellvillage.com/longdesc.php?recordID=<?php echo $row_Recordset1['NewsDate']; ?></link>
<description><?php echo $row_Recordset1['NewsLongDescription']; ?></description>
<pubDate><?php echo $row_Recordset1['NewsDate']; ?></pubDate>
</item>
<?php } while ($row_Recordset1 = mysql_fetch_assoc($Recordset1)); ?>
</channel>
</rss>
<?php
mysql_free_result($Recordset1);
?>
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.