Wednesday, June 27, 2007

first 10 fotos tagged as per ur search # same component in yahoo cities

<?php
require_once("phpFlickr.php");
// Create new phpFlickr object
$f = new phpFlickr("2d9926bbd0237c88d2a2f77c1e348f83");

$tag = $f->photos_search(array("tags"=>"kannur", "tag_mode"=>"any","per_page"=>7));
$total_flickrpage=$tag["pages"];
$tag =$f->photos_search(array("tags"=>"kannur", "tag_mode"=>"any","per_page"=>7,"page"=>rand(1,$total_flickrpage)));

$i=0;
while($i<(6))
$i=0;
while($i<20)
{

$farm=$tag["photo"][$i]["farm"];
$serv=$tag["photo"][$i]["server"];
$xid=$tag["photo"][$i]["id"];
$secre=$tag["photo"][$i]["secret"];

$p_url="http://farm".$farm.".static.flickr.com/".$serv."/".$xid."_".$secre."_s.jpg";
print $tag["photo"][i]["farm"];
$i=$i+1;
#print "<hr>http://farm{farm-id}.static.flickr.com/{server-id}/{id}_{secret}.jpg ";

print "<img border='0' src=".$p_url."> </img>";}


?>

--
regards

sajjad.c

2 comments:

  1. $tag = $f->photos_search(array("tags"=>"kannur", "tag_mode"=>"any"));
    $ph_len= sizeof($tag["photo"]);
    $j=mt_rand(0,$ph_len-8);
    $i=$j;
    while($i<($j+8))
    { ............................
    ................................
    .....................

    ReplyDelete
  2. download phpflickr from http://phpflickr.com/

    ReplyDelete