title: pulling mentions from twitter with php
body: <p>I am trying to retrieve mentions from twitter using php.  The current code I have works fine to retrieve the user_timeline, however when I try to use the same code for the mentions I get an authentication error.  What is the best way to retrieve mentions with userid, pictures, text, etc included?</p>
  
  <p>if I change user_time to mentions I get an authentication error.</p>
  
  <p>Here is the code I use now to retrieve user_timeline with php.</p>
  
  <pre><code>&lt;?php
  
  $xmldata = "http://twitter.com/statuses/user_time/usernid.xml";
  
  $open = fopen($xmldata,'r');
  
  $content = stream_get_contents($open);
  
  fclose($open);
  
  $xml = new SimpleXMLElement($content); 
  
  $screenname = $xml-&gt;status[0]-&gt;user-&gt;screen_name;
  
  
  
  
  
  ?&gt;
  </code></pre>