コード例 #1
0
ファイル: SMOB.php プロジェクト: anukat2015/smob
 private function data()
 {
     $post = new SMOBPost(SMOBTools::get_post_uri($this->uri, 'post'));
     return $post->raw();
 }
コード例 #2
0
ファイル: pub.php プロジェクト: anukat2015/smob
<?php

require_once dirname(__FILE__) . "/../lib/smob/SMOB.php";
require_once dirname(__FILE__) . "/../config/config.php";
// TODO: Check authentication to avoid hijacking
$content = $_GET['content'];
$location = $_GET['location'];
$location_uri = $_GET['location_uri'];
$twitter = $_GET['twitter'];
$sindice = $_GET['sindice'];
$mappings = $_GET['lod'];
$reply_of = $_GET['reply_of'];
if ($content) {
    if (get_magic_quotes_gpc()) {
        $content = stripslashes($content);
    }
    $post = new SMOBPost();
    $post->set_data(date('c'), $content, $reply_of, $location, $location_uri, $mappings);
    print "<h2>Publishing your message...</h2>\n";
    print "<ul>\n";
    $post->save();
    $post->add2rssfile();
    $post->notify();
    if ($twitter) {
        $post->tweet();
    }
    if ($sindice) {
        $post->sindice();
    }
    print "</ul>\n";
}