Basically, using cURL, you can bring in the RSS feed or XML feed. The RSS feed only includes date and status, and the XML feed will give you additional information including profile information (website, bio, etc).
I wrote a simple custom function which I’ve used in other examples here on the site called send_request(). This calls the request for the RSS file.
This function can be on the same script or in a include file. Next we need to assemble the querystring to send to our function. The function will return the XML which we parse with simplexml_load_string(). I should mention that this script will work with PHP compiled with simplexml and have cURL extension. If you’re using PHP4, you’ll need to use a different method to parse XML using DOM.
$rssUrl = ‘http://twitter.com/statuses/user_timeline/’.$username.‘.rss’‘: ‘,”‘ – ‘‘
It looks through the RSS result and displays the contents to the browser. Let me know if you have any suggestions with this script or if you have any problems. I’ll be more than happy to help.