public function getposts() { $url = 'http://twitter.com/statuses/home_timeline.json'; $userpwd = $this->user . ':' . $this->pass; $res = SMOBTools::do_curl($url, '', $userpwd, 'GET'); $tweets = json_decode($res[0]); foreach ($tweets as $tweet) { $id = $tweet->id; $username = $tweet->user->screen_name; $uri = "http://twitter.com/{$username}/status/{$id}"; if (!SMOBStore::ask("<{$uri}> a sioct:MicroblogPost")) { echo "LOADING {$uri}<br/>"; $this->load_tweet($tweet); } } }