* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY * KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE * WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR * PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS * OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ ################################# ## User configurable variables ## ################################# # set tag to pull from flicker # (se setea por parametro desde la url) $phototag = $tag; # id flickr (nsid) del usuario del que queremos coger las fotos //$nsid="48600096824@N01"; //arkangel $nsid=$id; # set default value for number of pictures to show if ($mode=="random") { $num_items = 10; } else { if ($num=="") {$num_items = "1";} else {$num_items = $num;} } # set location of Magpie RSS files require_once('magpierss-0.61/rss_fetch.inc'); require_once('magpierss-0.61/rss_utils.inc'); ################################################################ ## End of user defined variables, except for some html cruft ## ################################################################ //define('RSS_URL',"http://www.flickr.com/services/feeds/photos_public.gne?tags=$phototag&format=rss_200"); define('RSS_URL',"http://www.flickr.com/services/feeds/photos_public.gne?tags=$phototag&id=$nsid&format=rss_200"); # get rss file $rss = fetch_rss(RSS_URL); if ($rss) { /* # HTML formatting of results Print '

'; Print "Recent $phototag photos posted to Flickr"; Print "


"; Print '
'; */ # specifies number of pictures $items = array_slice($rss->items, 0, $num_items); if ($mode=="random") { //sobreescribo el array $items con una foto aleatoria de las que había en el array original $numerodefoto=time() % count($items); //la "aleatoriedad" $items = array_slice($rss->items,$numerodefoto,1); } //Expresión regular busca-imagenes // $preg = '/([^<]*)]*>(.*)/'; $preg = '!\'"]*)(\'|")?\s?.*?>!is'; if ($debug!=1) {echo "";} } else { echo magpie_error(); } ?>