public static function twitter_imageEngine($term, $maxImages, $url, $type)
 {
     $re = array();
     $json = twitpic_yfrog::twitter_search($term, $maxImages);
     //var_export($json);
     foreach ($json->results as $r) {
         $tweet = $r->text;
         preg_match_all("/http:\\/\\/{$url}\\/([a-zA-Z0-9]*)/", $tweet, $results);
         twitpic_yfrog::helperLoop($results[1], $type, $re);
     }
     return $re;
 }
Esempio n. 2
0
<?php

//
// Author: Robert Banh
// Date: 8/1/2009
//
// load library
require_once 'twitpic_yfrog.php';
// ================
// Please define your settings here
// ================
// twitter api allows a max of 100 items per page
$maxImages = '50';
// performs a twitter search for twitpic images
$twitpic = twitpic_yfrog::twitter_imageEngine('twitpic', $maxImages, 'twitpic.com', 'twitpic');
// performs a twitter search for yfrog images
$yfrog = twitpic_yfrog::twitter_imageEngine('yfrog', $maxImages, 'yfrog.com', 'yfrog');