Forum Moderators: coopster
Warning: preg_match() [function.preg-match]: Compilation failed: nothing to repeat at offset 551 in /home2/gtanatio/public_html/terrazza2/libraries/simplepie/simplepie.php on line 13264
Warning: preg_match() [function.preg-match]: Compilation failed: nothing to repeat at offset 497 in /home2/gtanatio/public_html/terrazza2/libraries/simplepie/simplepie.php on line 13352
Warning: preg_match() [function.preg-match]: Compilation failed: nothing to repeat at offset 497 in /home2/gtanatio/public_html/terrazza2/libraries/simplepie/simplepie.php on line 13418 if (!$pcre)
{
$wsp = '[\x09\x20]';
$fws = '(?:' . $wsp . '+|' . $wsp . '*(?:\x0D\x0A' . $wsp . '+)+)';
$optional_fws = $fws . '?';
$day_name = $this->day_pcre;
$month = $this->month_pcre;
$day = '([0-9]{1,2})';
$hour = $minute = $second = '([0-9]{2})';
$year = '([0-9]{2,4})';
$num_zone = '([+\-])([0-9]{2})([0-9]{2})';
$character_zone = '([A-Z]{1,5})';
$zone = '(?:' . $num_zone . '|' . $character_zone . ')';
$pcre = '/(?:' . $optional_fws . $day_name . $optional_fws . ',)?' . $optional_fws . $day . $fws . $month . $fws . $year . $fws . $hour . $optional_fws . ':' . $optional_fws . $minute . '(?:' . $optional_fws . ':' . $optional_fws . $second . ')?' . $fws . $zone . '/i';
}
if (preg_match($pcre, $this->remove_rfc2822_comments($date), $match))
{
static $pcre;
if (!$pcre)
{
$space = '[\x09\x20]+';
$day_name = $this->day_pcre;
$month = $this->month_pcre;
$day = '([0-9]{1,2})';
$year = $hour = $minute = $second = '([0-9]{2})';
$zone = '([A-Z]{1,5})';
$pcre = '/^' . $day_name . ',' . $space . $day . '-' . $month . '-' . $year . $space . $hour . ':' . $minute . ':' . $second . $space . $zone . '$/i';
}
if (preg_match($pcre, $date, $match))
{
static $pcre;
if (!$pcre)
{
$space = '[\x09\x20]+';
$wday_name = $this->day_pcre;
$mon_name = $this->month_pcre;
$day = '([0-9]{1,2})';
$hour = $sec = $min = '([0-9]{2})';
$year = '([0-9]{4})';
$terminator = '\x0A?\x00?';
$pcre = '/^' . $wday_name . $space . $mon_name . $space . $day . $space . $hour . ':' . $min . ':' . $sec . $space . $year . $terminator . '$/i';
}
if (preg_match($pcre, $date, $match))
{
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<title>google news feed</title>
</head>
<body>
<div>
<?php
//>
define('NL', "\r\n"); //defining line feeds for code formatting
$feedUrl = 'http://news.google.com/news?pz=1&cf=all&ned=us&hl=en&geo=chester+county+pa&output=rss';
$xml = @simplexml_load_file($feedUrl); //just in case, suppress error messages by using the '@'
if ($xml !== false) {
$channel = $xml->channel; //the 'channel' element of the rss feed
echo '<h3>'.$channel->title.'</h3>'.NL; //the channel's 'title' element's nodeValue
$items = $channel->item; //an array (because there's more than one of the 'item' elements,
//else it would be a SimpleXMLElement object) of all the rss 'channel' element's 'item' elements as SimpleXMLElement object's
foreach ($items as $item) { //
//echo '<p><a href="'.$item->link.'">'.$item->title.'</a></p>'.NL;
echo $item->description.NL;
}
}
?>
</div>
</body>
</html>
Warning: simplexml_load_file() [function.simplexml-load-file]: http://news.google.com/news?pz=1&cf=all&ned=us&hl=en&geo=chester+county+pa&output=rss:20: parser error : Opening and ending tag mismatch: meta line 4 and head in /home2/gtanatio/public_html/pcre/rss.php on line 16
Warning: simplexml_load_file() [function.simplexml-load-file]: </head> in /home2/gtanatio/public_html/pcre/rss.php on line 16
Warning: simplexml_load_file() [function.simplexml-load-file]: ^ in /home2/gtanatio/public_html/pcre/rss.php on line 16
Warning: simplexml_load_file() [function.simplexml-load-file]: http://news.google.com/news?pz=1&cf=all&ned=us&hl=en&geo=chester+county+pa&output=rss:21: parser error : AttValue: " or ' expected in /home2/gtanatio/public_html/pcre/rss.php on line 16
Warning: simplexml_load_file() [function.simplexml-load-file]: <body text=#000000 bgcolor=#ffffff> in /home2/gtanatio/public_html/pcre/rss.php on line 16
Warning: simplexml_load_file() [function.simplexml-load-file]: ^ in /home2/gtanatio/public_html/pcre/rss.php on line 16
Warning: simplexml_load_file() [function.simplexml-load-file]: http://news.google.com/news?pz=1&cf=all&ned=us&hl=en&geo=chester+county+pa&output=rss:21: parser error : attributes construct error in /home2/gtanatio/public_html/pcre/rss.php on line 16
Warning: simplexml_load_file() [function.simplexml-load-file]: <body text=#000000 bgcolor=#ffffff> in /home2/gtanatio/public_html/pcre/rss.php on line 16
Warning: simplexml_load_file() [function.simplexml-load-file]: ^ in /home2/gtanatio/public_html/pcre/rss.php on line 16
Warning: simplexml_load_file() [function.simplexml-load-file]: http://news.google.com/news?pz=1&cf=all&ned=us&hl=en&geo=chester+county+pa&output=rss:21: parser error : Couldn't find end of Start Tag body line 21 in /home2/gtanatio/public_html/pcre/rss.php on line 16
Warning: simplexml_load_file() [function.simplexml-load-file]: <body text=#000000 bgcolor=#ffffff> in /home2/gtanatio/public_html/pcre/rss.php on line 16
Warning: simplexml_load_file() [function.simplexml-load-file]: ^ in /home2/gtanatio/public_html/pcre/rss.php on line 16