h3 {
}
h5 {
}
.content {
border:1px #BAE4FD solid;
background-color:#E8E8FF;
width:600px;
font-family:Microsoft Yahei;
margin-top:10px;
padding:2px;
}
#doe {
float:left;
width;96px;
height:96px;
img:url(logo.jpg);
}
function load_file($url) {
$ch = curl_init($url);
// Return http response in string
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$xml = simplexml_load_string(curl_exec($ch));
return $xml;
}
function cbTimeSet($cbtime)
{
date_default_timezone_set('Asia/Shanghai');
$pubDate = date('Y-m-d H:i:s', strtotime($cbtime));
return $pubDate;
}
$feedurl = 'http://localhost/rss/backend.xml';
$rss = load_file($feedurl);
?>
foreach ($rss->channel->item as $item) {
echo "
echo "
[".$item->category."]" . $item->title . "
".$item->pubDate."---".cbTimeSet($item->pubDate);echo "
echo "
" . $item->description . "
";echo "
}
echo $rss;
//
//date_default_timezone_set('Asia/Shanghai');
//$rfc822 = 'Mon, 16 Aug 2010 00:11:49 GMT';
//$i = date('Y-m-d H:i:s', strtotime($rfc822));
//echo $i;
?>