<?php /* Stand-alone script that interacts with Posterous API. It is called with an XHR and does not reside in the Indexhibit context. */ // process XHR // error_reporting(E_ALL); define('SERVICE', 9999); require 'feed.common.php'; $posterous = new ApiRequest('http://posterous.com/api/readposts', array('num_posts' => 10, 'page' => 1, 'site_id' => null, 'hostname' => null, 'tag' => null), array('path' => null, 'timeout' => 3600 * 24)); // echo $posterous->buildQuery(); echo $posterous->fetchResult();
<?php /* Stand-alone script that interacts with DeviantArt RSS API. It is called with an XHR and does not reside in the Indexhibit context. */ // process XHR // error_reporting(E_ALL); define('SERVICE', 9999); require 'feed.common.php'; // TODO hard coded $da = new ApiRequest('http://backend.deviantart.com/rss.xml', array('q' => 'gallery:'), array('path' => null, 'timeout' => 6 * 3600), false); // echo $da->buildQuery(); header('Content-Type: text/html; charset=utf-8'); echo $da->fetchResult();
<?php /* Stand-alone script that interacts with Twitter API. It is called with an XHR and does not reside in the Indexhibit context. */ // process XHR // error_reporting(E_ALL); define('SERVICE', 9999); require 'feed.common.php'; $twitter = new ApiRequest('http://api.twitter.com/1/statuses/user_timeline.xml', array('user_id' => null, 'screen_name' => null, 'count' => 10, 'page' => 1, 'trim_user' => true, 'include_rts' => false, 'include_entities' => true), array('path' => null, 'timeout' => 3 * 3600)); // echo $twitter->buildQuery(); echo $twitter->fetchResult();