Código PHP:
$URL = "http://api.tumblr.com/v2/blog/luxury-boobs.tumblr.com/posts/?api_key=fuiKNFp9vQFvjLNvx4sUwti4Yb5yGutBN4Xh10LXZhhRKjWlV4¬es_info=true&type=photo&offset=##DESDE##";
$A = json_decode(file_get_contents($URL),true);
foreach($A['response']['posts'] as $P){
$rawContent = file("datost.txt"); //Abrimos el archivo datos.txt
$content = implode(" ",$rawContent);//Ya tenemos la cadena en memoria
//Verificamos que el id no exista
if (preg_match($P['id'],$content,$arrMatches)){
echo "el id de la imagen ya existe <br/>\n";}
else {
$data =$P['photos'][0]['original_size']['url'];
echo $data"<br/>\n"; // Muestra el resultado
$file = fopen("datost.txt", "a"); // si no existe almacena el id
fwrite($file, PHP_EOL . $P['id']);
fclose($file);}
}
Lo que busco es obtener una url y su id unicamente. y almacenar el id para no repetir la misma imagen. Gracias