Simple Twitter to RSS PHP Script

This is a script that creates an RSS feed of a user's tweets or your home timeline. Here's a sample feed.


Once upon a time, Twitter actually had this feature built-in. Then one day they took it away, and several third-party apps that restored the functionality have come and gone. So I decided to write my own self-contained script, with the aim to make it as simple as possible for others to install for themselves if they like.


You can view the code or download the script.


You need the following if you want to use this script on your own server:

Place feed.php on your web server and add your Twitter API keys to the top section. To obtain Twitter API keys, follow steps 1-3 in this StackOverflow post.

Try it out by navigating to http://yoursite/path/to/feed.php?user=UserName. Use ?user=home to get your own home timeline.

Why can't I use your copy?

Twitter tends to shut down these sorts of apps when they become too popular. As much as I'd love to allow anyone to obtain a feed using a copy of the script on this site, it would eventually get blocked if too many people started using it. So, I must leave it up to you to provide your own hosting and API keys.

License / Credits

This script is released under the MIT License. Included in the script is the twitter-api-php library by James Mallison.