-
- } else {
- common_server_error('Couldn\'t find any statuses.', $code = 503);
- }
-
- exit();
- }
-
- function show_xml_timeline($notice) {
-
- header('Content-Type: application/xml; charset=utf-8');
- common_start_xml();
- common_element_start('statuses', array('type' => 'array'));
-
- if (is_array($notice)) {
- foreach ($notice as $n) {
- $twitter_status = $this->twitter_status_array($n);
- $this->show_twitter_xml_status($twitter_status);
- }
- } else {
- while ($notice->fetch()) {
- $twitter_status = $this->twitter_status_array($notice);
- $this->show_twitter_xml_status($twitter_status);
- }
- }
-
- common_element_end('statuses');
- common_end_xml();
- }
-
- function show_rss_timeline($notice, $title, $id, $link, $subtitle) {
-
- header("Content-Type: application/rss+xml; charset=utf-8");
-
- $this->init_twitter_rss();
-
- common_element_start('channel');
- common_element('title', NULL, $title);
- common_element('link', NULL, $link);
- common_element('description', NULL, $subtitle);
- common_element('language', NULL, 'en-us');
- common_element('ttl', NULL, '40');
-
-
- if (is_array($notice)) {
- foreach ($notice as $n) {
- $entry = $this->twitter_rss_entry_array($n);
- $this->show_twitter_rss_item($entry);
- }
- } else {
- while ($notice->fetch()) {
- $entry = $this->twitter_rss_entry_array($notice);
- $this->show_twitter_rss_item($entry);
- }
- }
-
- common_element_end('channel');
- $this->end_twitter_rss();
- }