title: limit to only posts that are tagged using PHP
body: <p>I am trying to only get the posts that are tagged on a tumblr blog. I can get each post depending on what type of post it is (regular, link, photo, etc) but instead, I want to get each post that has a certain tag on it. For example, only get the posts that are tagged 'file'</p>
  
  <p>Here is my code so far:</p>
  
  <pre><code>&lt;?php
      $xml = simplexml_load_file('http://stocklamp.tumblr.com/api/read');
      $posts = $xml-&gt;xpath("/tumblr/posts/post[@type='photo']");
      foreach($posts as $post) {  
  
          }
      ?&gt;
  
      &lt;ul&gt;
          &lt;li&gt; &lt;a href="&lt;?php echo $post['url-with-slug']; ?&gt;"&gt;Post 1(PHP should be here)&lt;/a&gt;&lt;/li&gt;
      &lt;/ul&gt;
  </code></pre>
  
  <p>and here is tumblrs API <a href="http://www.tumblr.com/docs/en/api/v2" rel="nofollow">http://www.tumblr.com/docs/en/api/v2</a></p>