/ Published in: PHP
                    
                                        
ability to save files as well
                
                            
                                Expand |
                                Embed | Plain Text
                            
                        
                        Copy this code and paste it in your HTML
<?php
$json = 'http://api.flickr.com/services/rest/?format=json&method=flickr.photos.search&api_key=#&tags=handbags&sort=relevance&page=1';
foreach( $json['photos']['photo'] as $i => $d ) {
$url = 'http://farm' . $d['farm'] . '.static.flickr.com/' . $d['server'] . '/' . $d['id'] . '_' . $d['secret'] . '_b.jpg';
// $image=file_get_contents( $url );
// file_put_contents('dl2/' . $d['secret'] . '.jpg', $image);
// echo $d['secret'] . '.jpg';
echo '<img src="' . $url . '" />';
}
?>
Comments
 Subscribe to comments
                    Subscribe to comments
                
                