Exemplo n.º 1
0
 public function go()
 {
     if (in_array($this->type, $this->commands)) {
         $func = $this->type;
         $content = $this->{$func}();
     } else {
         $content = "Cannot interpret that command";
     }
     // Passer ce publish parametre dans une list particuliere
     SMOBTemplate::header($this->publish, $this->reply_of, $this->type == 'map');
     print $content;
     SMOBTemplate::footer();
 }
Exemplo n.º 2
0
             return;
         }
         $link_attributes = $xml->channel->link->attributes();
         if ($link_attributes['rel'] == 'hub') {
             $hub_url = $link_attributes['href'];
         }
         $callback_url = urlencode(SMOB_ROOT . "callback");
         $feed = urlencode($remote_user_feed);
         $result = SMOBTools::do_curl($hub_url, $postfields = "hub.mode=unsubscribe&hub.verify=async&hub.callback={$callback_url}&hub.topic={$feed}");
         // all good -- anything in the 200 range
         if (substr($result[2], 0, 1) == "2") {
             error_log("DEBUG: Successfully unsubscribed to topic {$remote_user_feed} using hubsub {$hub_url}", 0);
         }
         error_log("DEBUG: Server answer: " . join(' ', $result), 0);
         //print "<a href='$remote_user'>$remote_user</a> was deleted from your following list and your subscription was removed";
         SMOBTemplate::footer();
     }
     header("Location: " . SMOB_ROOT . "{$t}s");
 } elseif ($t == 'rss_owner') {
     header("Content-type: text/xml");
     //$tweet = new SMOBFeed();
     //$tweet->rss();
     error_log("DEBUG: rssfilepath: " . FEED_FILE_PATH);
     if (!file_exists(FEED_FILE_PATH)) {
         error_log("DEBUG: initial RSS file does not exists", 0);
         SMOBTools::initial_rss_file();
     }
     $rssfile = fopen(FEED_FILE_PATH, 'r');
     $rss = fread($rssfile, filesize(FEED_FILE_PATH));
     fclose($rssfile);
     echo $rss;
Exemplo n.º 3
0
 public function go()
 {
     SMOBTemplate::header('');
     print $this->core();
     SMOBTemplate::footer();
 }