= DATE_SUB(curdate(), INTERVAL 18 MONTH) GROUP BY year, month ORDER BY year DESC, month DESC"; $newsArchives = mysql_query($query_newsArchives, $ivpro) or die(mysql_error()); $row_newsArchives = mysql_fetch_assoc($newsArchives); $totalRows_newsArchives = mysql_num_rows($newsArchives); $maxRows_Recordset1 = 30; $pageNum_Recordset1 = 0; if (isset($_GET['pageNum_Recordset1'])) { $pageNum_Recordset1 = $_GET['pageNum_Recordset1']; } $startRow_Recordset1 = $pageNum_Recordset1 * $maxRows_Recordset1; mysql_select_db($database_ivpro, $ivpro); if(!$_REQUEST['month'] && !$_REQUEST['year']) { $query_Recordset1 = "SELECT * FROM fcnews WHERE (visibleOn = 'b' || visibleOn = 's') AND date2 >= DATE_SUB(curdate(), INTERVAL 1 MONTH) order by id desc"; } else { $query_Recordset1 = "SELECT * FROM fcnews WHERE (visibleOn = 'b' || visibleOn = 's') AND month = $_REQUEST[month] AND year = $_REQUEST[year] order by id desc"; } $query_limit_Recordset1 = sprintf("%s LIMIT %d, %d", $query_Recordset1, $startRow_Recordset1, $maxRows_Recordset1); $Recordset1 = mysql_query($query_limit_Recordset1, $ivpro) or die(mysql_error()); $row_Recordset1 = mysql_fetch_assoc($Recordset1); if (isset($_GET['totalRows_Recordset1'])) { $totalRows_Recordset1 = $_GET['totalRows_Recordset1']; } else { $all_Recordset1 = mysql_query($query_Recordset1); $totalRows_Recordset1 = mysql_num_rows($all_Recordset1); } $totalPages_Recordset1 = ceil($totalRows_Recordset1/$maxRows_Recordset1)-1; $queryString_Recordset1 = ""; if (!empty($_SERVER['QUERY_STRING'])) { $params = explode("&", $_SERVER['QUERY_STRING']); $newParams = array(); foreach ($params as $param) { if (stristr($param, "pageNum_Recordset1") == false && stristr($param, "totalRows_Recordset1") == false) { array_push($newParams, $param); } } if (count($newParams) != 0) { $queryString_Recordset1 = "&" . htmlentities(implode("&", $newParams)); } } $queryString_Recordset1 = sprintf("&totalRows_Recordset1=%d%s", $totalRows_Recordset1, $queryString_Recordset1); ?> United States Foreclosure News

load($xml); //get elements from channel $channel=$xmlDoc->getElementsByTagName('channel')->item(0); $channel_title = $channel->getElementsByTagName('title')->item(0)->childNodes->item(0)->nodeValue; $channel_link = $channel->getElementsByTagName('link')->item(0)->childNodes->item(0)->nodeValue; $channel_desc = $channel->getElementsByTagName('description')->item(0)->childNodes->item(0)->nodeValue; //output elements from channel /* echo("

Foreclosure News"); echo("
"); echo("

"); */ //get and output item elements $x=$xmlDoc->getElementsByTagName('item'); for ($i=0; $i<=5; $i++) { $item_title=$x->item($i)->getElementsByTagName('title')->item(0)->childNodes->item(0)->nodeValue; $item_link=$x->item($i)->getElementsByTagName('link')->item(0)->childNodes->item(0)->nodeValue; $item_desc=$x->item($i)->getElementsByTagName('description')->item(0)->childNodes->item(0)->nodeValue; echo ("

" . $item_title . ""); echo ("
"); echo ($item_desc . "


"); } ?>