Example #1
0
// request any username with '?id='
if (empty($username)) {
    $username = '******';
    // <-- change this to your username!
} else {
    // Make sure username request is alphanumeric
    $username = ereg_replace("[^A-Za-z0-9]", "", $username);
}
$feedURL = 'http://v.t.sina.com.cn/widget/widget_blog.php?height=500&skin=wd_01&showpic=1&uid=' . $username;
$C = new Collection();
$C->url = $feedURL;
$C->startFlag = '<div id="content_all" class="wgtList">';
$C->endFlag = '<div id="rolldown" class="wgtMain_bot">';
$C->init();
$C->regExp = "|<p class=\"wgtCell_txt\">(.*)</p>(.*)<a href=\"(.*)\" title=\"\" target=\"_blank\" class=\"link_d\">|Uis";
$C->parse();
header("Content-type:application/xml");
?>

<rss version="2.0">
	<channel>
		<title>rssfeed</title>
		<link>rssfeed</link>
		<description>rssfeed</description>
		<language>zh-cn</language> 
<?php 
for ($i = 0; $i <= 9; $i++) {
    $tguid = $C->result[$i][3];
    $tcon = strip_tags($C->result[$i][1]);
    if (!empty($tcon)) {
        ?>