/ Published in: PHP
ability to save files as well
Expand |
Embed | Plain Text
<?php $json = 'http://api.flickr.com/services/rest/?format=json&method=flickr.photos.search&api_key=#&tags=handbags&sort=relevance&page=1'; $json = json_decode( $json, true ); 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'; } ?>
You need to login to post a comment.
