<?php
$feedURL = 'http://########.tumblr.com/api/read/';
$xml = simplexml_load_file($feedURL);
// $posts = $xml->xpath("/tumblr/posts/post");
foreach($xml->posts->post as $post){
$post= $xml->posts->post->{'photo-url'};
}
echo "<pre>";
print_r($post);
echo "</pre>";
?>
This is the script that I have made. I am able to fetch only the first post, but I want all posts to be displayed and the post image is not showing up.
I’ve got it working using
But its only showing a couple image not all of them any ideas ?