Example #1
0
// 新浪微博RSS Feed生成器草根用户版, 作者 @williamlong [ http://www.williamlong.info ]
$username = $_GET["id"];
// 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]);
Example #2
0
 /**
  * Test
  *
  * @return void
  */
 public function testInit()
 {
     $this->assertNull($this->object->init());
 }
Example #3
0
 /**
  * Test
  *
  * @return void
  */
 public function testInit()
 {
     $this->object->init();
     $layouts = $this->object->getLayouts();
     $this->assertTrue(count($layouts) >= 1);
 }
Example #4
0
 /**
  * Test
  *
  * @return void
  */
 public function testInit()
 {
     $this->object->init(true);
     $this->assertInternalType('array', $this->object->getRoles());
 }
Example #5
0
 /**
  * Test
  *
  * @return void
  */
 public function testInit()
 {
     $this->assertInstanceOf('Gc\\Module\\Collection', $this->object->init());
 }