Do you want a faster way to navigate the web? Then check out SiteLauncher for Chrome. It's free and awesome.

RSS to Twitter PHP Script

RSS to Twitter PHP Script

This PHP Script will go through your RSS feed and post an item from it to your Twitter every X minutes (X interval in configurable).

The script is smart enough to not post the same RSS feed item more than once.

It will also include a random hashtag with each tweet from a list of hashtags you enter in the config file.

The script uses the Twitter API.

Installation

1. Go to https://apps.twitter.com/ and click "Create New App" to get your consumer key, consumer secret, oauth token and oauth secret .

2. Edit the file rss_to_twitter/src/cron.php to add your consumer key, consumer secret, oauth token, oauth secret, list of hashtags you want to use and your RSS feed URL.

3. Upload the contents of rss_to_twitter/src/ to a location somewhere on your server.

4. Make sure server has write permissions to the file already_posted.txt by running the following command:

chown www-data:www-data /[path you uploaded to]/already_posted.txt

(usually www-data is the right username but if not replace each occurrence of www-data with your server's user id)

5. Point your browser to cron.php (wherever you uploaded it to) to test the script.

6. If it's not working contact [email protected], if it is working continue to step 7.

7. Use the command:

crontab -e

to edit your crontab file and add the following line:

*/15 * * * * wget -O- http://[your website]/[server directory you uploaded to]/cron.php > /dev/null

Replace 15 with the number of minutes you want between each tweet

8. That's it, you're done. If you have any problems don't hesitate to contact [email protected]

Most Popular Articles

Receive a free copy of DoneSmart's exclusive ebook, 90+ Growth Hacks to Supercharge your Startup when you sign up for our newsletter

The newsletter has a very low frequency of emails but when we do send an email out you can be sure it will be packed full of exclusive superhuman knowledge articles on wealth creation, programming, web development, marketing, search engine optimization, productivity enhancement and many other integral disciplines. You'll also receive exclusive free software from DoneSmart designed to help you work smarter and generate more income.

Close popup