Stammy Script: RSS to Twitter using PHP

January 26, 2007

I’ve been a Twitter user for a few weeks now and have come across many tools to help with Twitter posting and integration. I have also seen several Twitter mashups that essentially do RSS to Twitter and have become rather popular. At first it might sound stupid to use Twitter for syndication instead of tried and true RSS, but simply put, Twitter users are always aware of Twitter happenings, creating a more effective syndication experience. I like to call it micro-syndication as you only have 144 characters to get your point across.

After a bit of research the best way I could find to carry out RSS to Twitter involved a Jabber bot package for Ruby. Not too many people have access to a Ruby-enabled server so I decided to make a simple PHP script to get the job done. My code might not be the most efficient way of doing this, but here’s how it works:

  1. A cron job accesses the PHP script as often as you like.
  2. Utilizing lastRSS, the script grabs the latest post from the RSS feed you specify within the file.
  3. The script grabs the link to the article and uses the TinyURL API to create a shortened URL.
  4. PHP concatenates article title and tiny url to form a Twitter status message.
  5. Using the login and password you provided in the file, the script uses CURL to tap into the Twitter API and update the status message.
  6. The script doesn’t utilize RSS caching or any logic (which would have been nice) to determine whether the post is the same as the one currently on Twitter – but thankfully Twitter is smart enough to avoid posting duplicate status messages. That way, if your cron job calls the PHP script every 15 minutes and the feed hasn’t been updated in the last day, you won’t have a Twitter account full of the same status messages.

If you don’t know how to use or setup a cron job to execute the script, you can just run the script manually whenever your feed gets updated. For example, if you have a Twitter account just for your blog notifications, just hit up the script whenever you post a new article. However, if you want to make a standalone RSS to Twitter setup, you can try to grok this article on working with cron jobs.

Download RSS to Twitter v0.1 (4 kB)

RSS to Twitter Source Code
The main source code for RSS to Twitter v0.1, based on this code.

Installation

  1. Download, unpack and upload to a public directory on your server. Ensure the files are at a CHMOD so that your Twitter login info is safe. CHMOD 644 should be fine.
  2. Open tw.php and edit $uname, $pwd, $feed with your Twitter login, password and the RSS feed you want the script to access, respectively.
  3. Save and test it out.

Comments

RSS to Twitter, as I’m calling it, is very basic and was the result of a spur of the moment coding session. LastRSS supports feed caching so in the future it’s very possible that I could develop a version smart enough to not attempt double posting, thus saving bandwidth (although it’s rather negligible). If you have any suggestions or code you’d like to see in this, please feel free to contact me and I’ll merge it in – consider it open source.

Download RSS to Twitter v0.1 (4 kB)

Paul Stamatiou runs on the Genesis Theme Framework

Genesis Theme Framework

Genesis empowers you to quickly and easily build incredible websites with WordPress. Whether you're a novice or advanced developer, Genesis provides the secure and search-engine-optimized foundation that takes WordPress to places you never thought it could go.

Take advantage of the 6 default layout options, comprehensive SEO settings, rock-solid security, flexible theme options, cool custom widgets, custom design hooks, and a huge selection of child themes ("skins") that make your Genesis site look the way you want it to. With automatic theme updates and world-class support included, Genesis is the smart choice for your WordPress website or blog.

98 comments … read them below or add one

  1. nice. I just had to comment on your use of “dude” in the error messages. :D

  2. conedude13 says:

    I’m testing this out right now and i get the following error when navigating to the tw.php file:

    Fatal error: Call to undefined function: curl_init() in /home/www/filewarehouse.awardspace.com/twitter/tw.php on line 23

    What version php did you get it to work for yourself? The host I am using has version 4.4.1.

  3. @Ryan – you need to have PHP with CURL support. I believe I had the same version of PHP (4.4) you do. I’m looking into another way without CURL.

  4. conedude13 says:

    Just looked into curl support on the server I’m using and it says that it is enabled. It also give the following info on the curl support:

    libcurl/7.13.2 OpenSSL/0.9.7e zlib/1.2.2 libidn/0.5.13

    I’m using AwardSpace for the hosting needs.

  5. Hrm, the error says it can’t find curl_init() which is part of any php greater than 4

    http://us2.php.net/manual/en/function.curl-init.php

    not sure what to say, but ill ask around.

  6. conedude13 says:

    I did a quick switch to another free host. I think the first one had disabled curl support, but never bothered to update their faq’s about it. Now i’m getting the following output from the tw.php file when browsing directly to it:

    Error
    success

    Is that correct now?

  7. I believe that error is coming from TinyURL – does the URL you are trying to use have a & in it? It currently chokes on that.

  8. conedude13 says:

    This is what I have:

    $tiny_url = file_get_contents(“http://tinyurl.com/api-create.php?url=” . $url);
    $status = $title . ” ” . $tiny_url;
    echo $status; //just for status if you are directly viewing the script
    $curl_handle = curl_init();

    No “&” there. Any other thoughts?

  9. conedude13 says:

    There are no “&” in the entire file. I have the version that is available through the download link above. Any other possible thoughts? I’ll also test out another host.

  10. Ryan – I meant if the URL you are trying to run through TinyURL has an & in it.

  11. conedude13 says:

    Thanks, Paul, for all your help. It turns out it was the site rss url that was the problem. It was all fixed up by “laundering” the rss feed through a yahoo pipe and using the pipe url in the tw.php file. It rocks!

  12. george says:

    Very cool! I DO seem to be getting some repeats, though… are you sure twitter protects against them?

    http://twitter.com/dirtygreek

  13. george says:

    I’ve made a change to the parse.php script to use lastRSS’s cache feature. It checks the current rss feed against its cache and only attempts to post to twitter if there is a change. I THINK it’s working correctly.

    in the tw.php script, you need to add

    $rss->cache_dir = ‘./rsscache’;
    $rss->cache_time = 3600; // one hour

    but be sure to set the cache_dir variable to your own cache directory, and chmod that directory so that it’s writable from the script. Info on this is available on the lastrss website.

    In parse.php, I basically replaced

    if ($timedif cache_time) {
    // cached file is fresh enough, return cached array
    $result = unserialize(join(”, file($cache_file)));
    // set ‘cached’ to 1 only if cached file is correct
    if ($result) $result['cached'] = 1;
    }

    with

    if ($timedif cache_time) {
    // cached file is fresh enough, return cached array
    $result = unserialize(join(”, file($cache_file)));
    $result2 = $this->Parse($rss_url);
    if(count(array_diff($result,$result2))

  14. george says:

    My comments apparently got cut off, so just email me if you are interested. george at dirtygreek dot org.

  15. Hi, great work! I can’t get it to work though. I keep getting the RSS file not found message. I have tried different feeds and none seem to work. Ideas on what I am doing wrong?

  16. george says:

    I’ve done some more fun stuff using (at least partially) Paul’s code and methods, but for some reason I had to use patRSS instead of lastRSS. Anyway,

    http://www.dirtygreek.org/journal/journalId/2042

    What this script does is read a Google Calendar feed and check each event’s time against the current time. If the event’s time falls within a given span around the current time (default is one hour), it will post the event’s details to Twitter. In other words, Google Calendar will tell Twitter what you’re doing at the current time.

  17. Bgal says:

    I keep getting the “Error: RSS file not found, dude.” error, even though the RSS file does exist – I’m linking directly to it, and have checked it by going directly to the rss file in a browser and getting the expected xml page. Any ideas why I’d be getting this error?

    Thanks in advance for any help!

  18. Cool script. One problem though – occasionally hiccups and sends the error message to Twitter, which is obviously not ideal. (ie [twittername]: Error)

  19. David says:

    Nice script, thx a lot! It works just fine on my integration of Twitter and Plazes: http://dlinsin.blogspot.com/2007/06/twittering-with-plazes.html

    Regards, David

  20. Damon Kiesow says:

    Looks like something changed on Twitter. After 2 months – suddenly at midnight I have been getting duplicate posts of the latest status message every time the script runs. Any thoughts?

  21. David says:

    Hey guys,

    I implemented a simple check to prevent multiple updates, check it out if your are interested:

    http://dlinsin.blogspot.com/2007/06/twittering-with-plazes-fix.html

  22. @Damon, I’ll have to check that out. I haven’t messed with the script in quite a while due to other obligations.

  23. It worked for a few days, but with nothing changes I only get ‘Disallowed Key characters’ as output. Can anyone give a hint what’s going wrong?

  24. The script seems to have some problems: it doesn’t cut the username at the beginnig of the message and it doesn’t update the twits regularly.

    Have you got some ideas in particularly for the second problem?

  25. Joel Ramos says:

    I’ve tried this script and I’ve noticed that Twitter doesn’t check for duplicated posts like you have said.

    Is it need to activate any option?

  26. Robert says:

    Thanks for the script. It worked like a charm for me @campascca

    Appreciate you sharing this with all of us!

  27. John Eckman says:

    Dreamhost (and others) doesn’t allow @fopen with external urls – I’ve modified parse.php to use curl instead to get the rss file – email me if you’d like a copy.

    (I will also let LastRS known and share the modifications back to them if they want them)

  28. Woody says:

    hello,

    i tried this on my blog, but it wont send notification to twitter unless i go to http://www.myblog.com/tw.php then it tells me success and i receive the message.

    this is the normal thing to do? or is there any problem?
    thank you.

  29. Robb says:

    Is there another choice for CHMOD? My CronJob seems to want something that allows executable (ie, 775)

  30. emlak says:

    Nice script. I gonna use it on my blog to automaticcaly send new articles to twitter.

  31. Jamie says:

    This is great – and perfect for the site I’m building. Thanks!

  32. Jeff Coel says:

    Hello Paul, there is a small and easy-to-use PHP library for sending messages to Twitter and receiving status updates – http://phpfashion.com/twitter-for-php

  33. Thanks for the link Jeff – Unfortunately it relies upon php5/simplexml which not many people have on their servers. I love simplexml though, much easier to work with http://paulstamatiou.com/2007/04/17/how-to-parse-xml-with-php5

  34. Bruce says:

    How can I add a comment to the script the puts “Most Current Podcast” at the start of the twitter message.

    Thanks for any help

  35. Josh says:

    I was just wandering how to change the “from web” tag at the end of the twit
    I would love it to say from MyWebsiteName.com
    great for SEO

  36. Jeromy says:

    Great script! How do I get it to add more than one twit though? Is that all it adds the first time around or will it eventually add more?

  37. Dale says:

    I heard that the guys who created jobfeedr.com are releasing their RSS to twitter technology for public release in the next few weeks, so I guess when that comes out you might be able to get muiltiple feeds into the one twitter account Jeromy.

  38. Midas7g says:

    Thanks for this script, Paul! I modified it to keep track of my World of Warcraft server status. https://twitter.com/ravenholdt

  39. Jo says:

    Thanks for the script, I have put my weather station onto Twitter! @budawx

  40. mayooresan says:

    There are 2 files found. Which file should be ran?
    when I try those files, I got 404 error :(

    Please help me

  41. mayooresan says:

    There waz small problem with chomod settings.. I got it correct thanks :D

  42. mayooresan says:

    when I run it manually it works fine.. but when I try to cron job it it makes duplicate posts in twitter :(

  43. Emma says:

    I found your script which is great, however despite apostrophes showing correctly in the feed, they’re showing as \’ on Twitter. I think this is an escape character issue, but wouldn’t know where to start to correct it. Any clues?
    Thanks,
    Emma

  44. Paul Pullen says:

    Having problems with Twitterfeed…but this script worked like a charm. Now I’m in control of how often my site’s RSS is posted to my Twitter!! Thank you so much–this is exactly what I have been searching for over the past few days!!!!

    –Paul

  45. Ebo Eppenga says:

    Great script! Thanks a lot! Works perfectly “out-of-the-box”.

  46. Tom says:

    The script fuctions withour crashing but all I get when I executive it manually is the title of the first item of the RSS feed on my browser window under php, but nothing gets posted to twitter

    is this a curl problem or something else?

  47. Vitaly says:

    Does it automatically cut the title to fit the url and still be within 140 characters?

  48. mousia says:

    Hi there,

    The script works fine , no duplicates (alth0oug have run it manually so far, no cron set up yet)…

    My problem is that the output is displayed as follows in twitter.

    http://tinyurl.com/xxxx

    Also , is there a way to display more that 1 feed at a time. i.e. to run it every hour and display 3-4 feeds at a time. More or less like in twitterfeed but without having to rely on their service and availability! :-)

    Any help greatly appreciated. :-)

    P.S. Ty for the script

  49. mousia says:

    Doesnt come up right in this form! :-)

    Basically CDATA is literally send to twitter

    ….CDATA… http://tinyurl.com/

  50. Editor says:

    To mousia,

    Try: var $CDATA = ‘content’;

  51. mousia says:

    Works like a charm :-) Its actually very handy script.

    Σ’ ευχαριστω !

  52. Filippo says:

    Hello Paul,
    I was wandering if you would consider updating the script for a PHP 5 and up context. Maybe even with some extra ‘parsing’ and output optimization tutorial/option. If not, would you consider consulting on it? (You can email me for that)
    Thanks!

  53. Yuval says:

    Great script! 2 questions:

    1. How can I import more than just the last rss post (meaning more than 1)
    2. Why does it come out in this format? (What is the CDATA etc.) Can I just see the title?

    Thanks!

  54. mousia says:

    Hi Yuval,
    Firstly I am not a coder, I just find my way around! Probably there is the “correct” way and obviously you are not a developer either if you asking that:-)

    1. Yes you can. Check out pw.php and find line 18-19. You can change that so it feeds any number you want from the list of feeds! i.e. change 0 to both lines to 4 or whatever you want, to feed rss feed number 4 from the rss feeds list etc. You could also consider duplicating, or making as many copies as you want of pw.php(renamed of course), varying the numbers (and/or the rss path if you have rss feeds for multiple categories),hence setting up as many cron jobs as your pw.php(renamed) files are (so for each one of them). If you more skilled then you can just code some sort of a loop there also.

    2. Try: var $CDATA = ‘content’;
    This is in parse.php line 40.

    Again I am not a developer, but this will do the magic.
    Sorry for my english :)

  55. Jake says:

    Anyone know how to successfully use Bit.ly with authentication with this? I tried but it don’t work (bad coding).

    And how can I check to stop dupe posts to stop API uses per hour all being used?

  56. Jake says:

    Also, RSS’s with apostrophes in don’t work. Do you know how to fix?

  57. thats great that you are talking about the twitter api,a good example of searching with the twitter api is on twiogle.com because you can search on twitter and google at the same time.

  58. Jake/Adam: I just ran into this code today and I’m super excited about it. I modified the script to use bit.ly instead of tinyURL.

    You’ll have to supply your own bit.ly login and API. I’m also handling the special characters in the titles with urlencode($title).

    Below, I left the commented out tinyURL reference in the script so everyone will know where I placed my change.

    Here’s my bit.ly code:

    //$tiny_url = file_get_contents("http://tinyurl.com/api-create.php?url=" . $url);
    //$status = $title . " " . $tiny_url;
    $bit_lySource = file_get_contents("http://api.bit.ly/shorten?version=2.0.1&longUrl=".$url."&login=YOUR_BIT.LY_LOGIN_NAME&apiKey=YOUR_BIT.LY_APIKEY&history=1");
    preg_match('@"(shortUrl.*)"(.*?)"@i',$bit_lySource, $matches);
    $bit_ly = $matches[2];
    $status = urlencode($title) . " " . $bit_ly;

    I’m looking into changing the duplicates issue that I’m seeing with the code. I’ve also wrapped this into a function and created a loop so that more than one RSS feed is read and posted.

    When I get the duplication resolved, I’ll post some more code. I haven’t written PHP in a long time, so expect some less-than-spectacular, but working results.

    • Thanks for the update Anthony! I’ll have to give that a whirl myself and update as necessary.

    • Kurt says:

      Any idea of how to handle special character such as quotes etc within the actually feed from stopping the post to twitter? Any time the actual content of my rss contains a quote, everything after the quote doesn’t get posted to twitter.. twitter.com/fantasy_nfl

      thanks for any info you may have

      • JJ says:

        Ditto on this question… I’ve tried a few PHP methods: convert_smart_quotes() from here, urlencode(), but my posts still get truncated at the instance of HTML encoded “special character” that begins with ‘&’…

        I’m not a PHP programmer, just a slash/hack approach to tinkering. I’m going to try to see if it’s a cURL issue (stopping when encountering ‘&’) that can be solved with placing quotes around the variable content…

        Any tips form others who have solved this issue would be greatly appreciated.

        And much thanks for this excellent script, Paul!

      • JJ says:

        figured out a very inelegant splice of code…


        $trans = array("‘" => "'", "’" => "'", "“" => '"', "”" => '"', "–" => '-', "—" => '--', "…" => '...');
        $clean_title = strtr($title, $trans);
        $status = $clean_title .$bit_ly;

        Enjoy!

  59. Adam says:

    Anthony, that’s great, thanks so much.

    I’ve tried it out, however I’m getting the following error when I execute tw.php

    Parse error: syntax error, unexpected ‘:’ in /MY_PATH/tw.php on line 22

    My line 22 has…

    $bit_lySource = file_get_contents(”http://api.bit.ly/shorten?version=2.0.1&longUrl=”.$url.”&login=YOUR_BIT.LY_LOGIN_NAME&apiKey=YOUR_BIT.LY_APIKEY&history=1″);

    *with my bit.ly login name and API key changed of course

  60. Monica says:

    Hi everyone. Sorry if this a dumb question, but I’m new to this sort of coding.

    I have the script running, and it does a good job. However, the RSS feed I want to put on Twitter often uses titles that are longer than the amount of characters allowed by Twitter. How can I get the program to grab only the first, say, 120 characters of the title (allowing room for the URL at the end)?

    Thanks in advance.

  61. Monica:

    Here’s a php snippet to shorten the tweet to 140 characters and an ellipsis symbol (…) between the shortened title and the url:

    $status = $title . " " . $tiny_url;
    if (strlen($status)>140) {$status = substr($title,0,136-strlen($tiny_url)) . "... " . $tiny_url; }

    I’ve also posted this update to a drop that I’ve created for these changes: http://drop.io/akv_rsstotwitter

    • Monica says:

      Thanks for your help with shortening the URLs!

      Has anyone been able to modify this to use it with Atom feeds? Seems like LastRSS will not process them, or at least the one I’m trying to use.

  62. Fábio says:

    Thanks the script full job.

  63. Ado says:

    I still don’t get it… How to post all 10 items from feed to twitter? What ever i try to change it gives me errors, and unchanged version tweet only 1 latest item from feed even with var $items_limit = 10; Any help PLEASE!!!

  64. monica says:

    Ado,

    I’ve rewritten the script to use SimplePie instead of LastRSS (to solve my Atom feed problem) and the one I’ve written will also post multiple items. I don’t have the code with me at home, but when I return to work I’ll post it. But if you spend some time using SimplePie, you could probably figure it out.

  65. Ado says:

    Monica can you please send me your code, i couldn’t make it working right with magpie as it making problems with special characters :s

  66. Ado says:

    WOW… Finally i fixed current code to post all rss items to twitter :))) If anyone is interested to have it, please let me know here!!! I will just test it next few hours.

  67. jimitz says:

    Hi folks,
    I have a problem with the script, it outputs this: Error: RSS file not found, dude.

    I set up a feedburner feed, but it doesnt work… any ideas?
    thx a lot

  68. LeRoy Miller says:

    Great Script – I have tried, twitterfeed, rss2twitter, rsstotwitter, and several others, they feed once and are done…This script will feed every time – if it is the last RSS in the list – that is fine with me!
    2 Questions – The first you probably can help with, the 2nd??

    1) I modified tw.php for the account @hamohio – it will send the latest updates from HamOhio.com – works great! (NO problems) – I may end up renaming the file to something I can remember thou! :-)
    I also modified it to update @kd8bxp – and with that mod – I added to the status$ = “APRS Location: ” – the feed is my APRS location – I save the file under a new name and uploaded it to the server –
    I only have parse.php on the server once – the question is – (After reading some of the post this made me wonder) – Do running the scripts from the same server but with two different feeds effect how parse.php works for duplicated posts? Both Feeds to the two accounts seem to be working correctly – so I don’t know if this is an issue or not.

    The 2nd question I have – I tried and tried to get a cronjob to work – I had finally realized that the file permission needed to be changed – and I changed both tw.php and phrase.php to chmod 755 – after that the cron was able to run the script, but gave me errors (Lots of errors) -

    ” /home/swohcomp/public_html/tw.php: line 1: ?php: No such file or directory
    /home/swohcomp/public_html/tw.php: line 2: /access-logs: is a directory
    /home/swohcomp/public_html/tw.php: line 3: RSS: command not found
    /home/swohcomp/public_html/tw.php: line 4: by: command not found
    /home/swohcomp/public_html/tw.php: line 5: of: command not found
    /home/swohcomp/public_html/tw.php: line 6: based: command not found
    /home/swohcomp/public_html/tw.php: line 7: http://morethanseven.net/posts/posting-to-twitter-using-php: no such file or directory
    /home/swohcomp/public_html/tw.php: line 8: access-logs/: is a directory
    /home/swohcomp/public_html/tw.php: line 9: syntax error near unexpected token ‘parse.php’
    /home/swohcomp/public_html/tw.php: line 9: include(‘parse.php’):

    Any Ideas? Any Help? Please let me know – twitter.com/kd8bxp best way to get me!
    Thanks – LeRoy

    • LeRoy Miller says:

      I got finally got crontab to work – It seems on the server I am using PHP was compiled as CGI – not Apache – as CGI cron didn’t like the script as written – I added
      #!/usr/local/bin/php -q as the first line of the script, now it looks like a perl script and cron liked it – I also had to do a chmod to tw.php to 755 – Setup now and working!
      BTW: The script still runs via the browser as well –

      So for those who are having problems getting cron to work – it maybe that PHP was compiled as CGI – give it a try – it worked for me.

      Thanks – LeRoy

  69. LeRoy Miller says:

    OH Hey – One more question, just thought of it -> sorry about that –
    Is there away to get the script to say “from HamOhio” (Or something else) instead of “from API” ?

    Thanks again, great script! Thanks.

    • Nigr4 says:

      Hey dumdum, read Twitter API and helpdocs, that’s not possible unless you use OAuth, or have a Twitter app etc.

  70. Char says:

    Does this work with google alerts?

  71. Cant seem to satisfy the rss requirements keep getting the rss error. Dude dammit dude. why did i learn cfml my brain hurts. Any possible causes of rss problems – I tried pipes – my own – dont get it ?

  72. Sebastian says:

    Hi guys,

    i´ve a problem. The script post the RSS-Entries somtimes double at twitter. How did I fix it? Thank you for answers.

  73. Mark Wu says:

    I’m also getting the “Error: RSS file not found, dude.”
    The script works when executing via a browser, but just returns the message when executed via a cron job.

    I’ve tried with the normal site feed (a wordpress blog) as well as a Feedburner feed. I’m also doing the cron job on a Dreamhost account if it makes any difference..

    Monica, will your script bypass the problem?

    Any suggestions from anyone on how to solve this would be appreciated!

    Thanks,

    Mark

  74. Brie says:

    wget is too lame to handle the parentheses in the file name without quotes.

  75. jigar says:

    error
    success
    i got the error like this wht should i do plz reply me fast

  76. Cézar Ayran says:

    Fatal error: Call to undefined function curl_init() in F:\websites\apache\twitter\tw.php on line 17

  77. shub says:

    Hi, I have an url with & inside and I got an error when I click on the tiny url… Any idea how I remove this & and convert it in & ???
    I have this when I click on the tiny url :
    http://www.domaine.com/download.php?F=2561&type=bobox&rss=2
    And I need this to work properly :
    http://www.domaine.com/download.php?F=2561&type=bobox&rss=2

  78. shub says:
    • Shub says:

      I have found a way to remove this :)
      add this (ligne ~20) (I put a space between & and amp; you should remove it ;)
      $url = str_replace(“& amp;”,”&”,$url);
      under this
      } else { die(‘Error: RSS file not found, dude.’); }

      But How to send more than one feed a once ?? I have 10 news rss but only the last one is show … :’(

  79. ajax goods says:

    Hi there. @Paul Stamatiou, thanks for great plugin.
    I would like to ask all of you : does anyone know how add ‘description’ or any other rss property like ‘comments’ or ‘author’ into parsing, right now only title and url are going through.

    Thanks in advance

  80. Tayeb Habib says:

    Hello all and Paul,

    Paul, visitors and others may be interested to know that I have written code for a Twitbot based on Stammy script.

    The code uses OAUTH authentication from Twitter. The article with explanation can be viewed at:

    http://redacacia.wordpress.com

    A special thanks is due to Paul Stammatiou for the original code. The code uses Abraham Williams’s library and easy solutions from Abu Ashraf Masnun, so a special thanks is due to both of them too.

    Tayeb

  81. John says:

    If anyone else is having trouble changing this script to use oauth to authenticate with twitter, I found this post which worked for me :
    http://www.mabujo.com/blog/posting-from-an-rss-feed-to-twitter-using-oauth/

103 Trackbacks

  1. [...] Stammy Script: RSS to Twitter using PHP – PaulStamatiou.com Para no parar de twittear (tags: rss php twitter) [...]

  2. [...] I was playing around with the status service Twitter earlier today. I’ve known about it for a while, though hadn’t signed up until recently. I think it’s a pretty good idea, if not, heh, a bit stalker-friendly (though you can set your profile to only be viewable by friends). I think more than anything that the most interesting part is the many ways in which you could adapt the service to fit your needs, whether by just being creative (read: makeshift link/tumblelog–hey, that’s a good idea) or by utilizing software that makes use of Twitter’s API. One interesting use of Twitter that I’ve seen is syndicating your blog’s feed through the service, with each Twitter update being a new item in the feed. Also, Twitter’s made it very easy to update by providing two different ways to do so aside from the very intuitive web interface: via either IM or text message. [...]

  3. [...] might not have thought of it, but Paul Stamatiou’s latest script RSS2Twitter will be loved by internet marketing strategists, phony SEO specialists and many [...]

  4. [...] For now you have to use a hack, RSS to Twitter. [...]

  5. [...] was almost too easy: thanks to Paul’s RSS-to-Twitter script, PLAY.FM has now got a Twitter-channel announcing our latest [...]

  6. [...] Conectar un RSS con Twitter mediante PHP (inglés). Interesante script para, por ejemplo, publicar los últimos posts de tu blog en Twitter. [...]

  7. [...] RSS to Twitter. Php script by PaulStamatiou. [...]

  8. 73 Links That Rock Twitter! What are you doing?…

    Damn, I love Twitter! I’ve even declared it a MySpace killer. Why? Simply because of its addictiveness and simplicity. Who wants all the garbage and crap advertised on MySpace anyway? This is how social networking should be, not a high……

  9. [...] RSS to Twitter – Here is a PHP script to feed RSS to Twitter! [...]

  10. [...] has been getting some mixed reviews, but Paul Stamatiou has a hack that allows you to set your site’s feed (or any site’s feed for that matter) to show up [...]

  11. [...] hack: Site RSS to Twitter – Download Squad From Paul Stamatiou: The world has gone twitter. A new feature is integrating incoming RSS feeds to create a river of [...]

  12. YouMix says:

    Como enviar contenido a Twitter de forma automática desde tu web o blog…

    A estas alturas todo el mundo que esté al día de lo que pasa en la web sabrá que es Twitter.

  13. [...] options for feeding Twitter are RSS to Twitter and Paul Stamatiou’s PHP hack. To implement, just mash your feeds in Yahoo! Pipes, and then syndicate the result through the [...]

  14. [...] Stammy Script: RSS to Twitter using PHP – PaulStamatiou.com 把RSS输出到Twitter中的方法。 (tags: RSS twitter) Related: Diglog It « FlipFolio–桌面Widget软件 links for 2007-03-26 » [...]

  15. [...] RSS to Twitter – is a PHP script to feed RSS to Twitter. [...]

  16. [...] RSS to Twitter un script PHP para pasar el feed RSS a Twitter. [...]

  17. [...] RSS to Twitter – script en PHP para enviar tu feed a Twitter Via: Quick Online Tips Artículos [...]

  18. [...] RSS to Twitter – script en PHP para enviar tu feed a Twitter [...]

  19. [...] RSS to Twitter – 一個PHP的程式,將RSS收藏到Twitter中 [...]

  20. [...] RSS to Twitter – is a PHP script to feed RSS to Twitter. Share This | Leave A Comment (0) | Comments RSS | Posted 2nd May 2007 [...]

  21. [...] RSS to Twitter – is a PHP script to feed RSS to Twitter. [...]

  22. Plod says:

    《泡唠》创刊号暨五一长假特刊: 隐形的翅膀…

      脑子里有《泡唠》这个想法很长时间了,大约是从停止更新美味书签开始的,当时觉得没有一样互联网服务能够真正服务于自己的 blog,给 del.icio.us 也去过邮件,希望能改善 daily post çš„…

  23. [...] Stammy Script is a simple piece of PHP code which you upload to your server and will automatically convert RSS feeds to Twitter posts. Of course, TipMonkies has its own Twitter page making use of this little script (via Download Squad). [...]

  24. [...] you write a new blog post: twitterfeed, rss2twitter, PingTwitter, Twitter Updater (WordPress), or RSS to Twitter (PHP). Also check out Jaiku and iStalkr since they let you add feeds right out of the [...]

  25. [...] RSS to Twitter – is a PHP script to feed RSS to Twitter. [...]

  26. [...] Stammy Script: RSS to Twitter using PHP – PaulStamatiou.com RSS to Twitter using PHP (tags: php wordpress) [...]

  27. [...] RSS to Twitter – Um script PHP criado pelo conhecido Paul Stamatiu que cria RSS a partir das tuas entradas do Twitter. [...]

  28. [...] Conectar un RSS con Twitter mediante PHP (inglés). Interesante script para, por ejemplo, publicar los últimos posts de tu blog en Twitter. [...]

  29. [...] twitter Sharts – ‘Shart’ your twitter status anywhere within your wordpress blog posts or pages. rSS to Twitter – is a PHP script to feed RSS to Twitter. [...]

  30. [...] 8.Twitter Sharts   在文章中显示你的Twitter 状态插件。 9.RSS to Twitter 将RSS收藏到Twitter中 10.SimpleTwitter [...]

  31. [...] (11/14/07): So after looking over a few pages, and the inexplicable problems I had with the JSON api, I’ve updated the script [...]

  32. [...] RSS to Twitter – standalone скрипт на php, реализующий шлюз RSS2Twitter Posted in Web 2.0 | Leave a Comment [...]

  33. [...] Stammy Script é um código PHP que você deve fazer o upload para o seu server e ele converterá o seu RSS feed em posts no Twitter. [...]

  34. [...] Stammy Script: RSS to Twitter using PHP – PaulStamatiou.com (tags: twitter rss php code script mashup) [...]

  35. [...] RSS To Twitter – Como o próprio nome sugere, ele cria entradas de feeds (RSS) para suas mensagens no Twitter. É um script desenvolvido em PHP e roda em qualquer site/blog com hospedagem próprio, pois se faz necessário alterações nas permissões do arquivo. [...]

  36. [...] RSS to Twitter – es un script PHP para enviar tus feeds RSS a Twitter. [...]

  37. [...] RSS to Twitter – es un script PHP para enviar tus feeds RSS a Twitter. [...]

  38. [...] RSS to Twitter – script en PHP para enviar tu feed a [...]

  39. [...] RSS to Twitter – es un script PHP para enviar tus feeds RSS a Twitter. [...]

  40. [...] RSS to Twitter – script en PHP para enviar tu feed a Twitter [...]

  41. [...] RSS to Twitter. A excellent PHP script that feeds RSS to twitter. [...]

  42. [...] Stammy Script allows you to push your RSS feeds out across Twitter. I’ve seen a lot of people doing this, but I’m not sure whether I like it or not. If too many people start doing it then Twitter will die. [...]

  43. [...] RSS to Twitter – é um script para gerar um feed RSS para o Twitter. [...]

  44. [...] RSS to Twitter. Php script by PaulStamatiou. [...]

  45. [...] RSS to Twitter – is a PHP script to feed RSS to Twitter [...]

  46. [...] Shart  کردن تویتر در هرکجای وبلاگتان که دلتان خواست 10.RُُُُSSTo Twitter: کدی است به زبان PHP  که به کمک آن می توانید برای [...]

  47. Twitter WordPress Plugins…

    Just spent the last hour finding all the Twitter WordPress Plugins that are available…. did I miss any?

    Comment Twitter SMS NotificationGet notified by SMS when a user post a new comment on your blog.

    Twitter ToolsAutomatically posts to Twitter whe…

  48. [...] RSS to Twitter – script en PHP para enviar tu feed a [...]

  49. [...] method of embedding your Twitter status anywhere within your WordPress Blog posts or pages. RSS to Twitter PHP script to feed RSS to Twitter. TwitterComments Updates Twitter when a comment is posted on your [...]

  50. [...] RSS to Twitter -一个PHP的程式,将RSS收藏到Twitter中 [...]

  51. [...] RSS To Twitter – Como o próprio nome sugere, ele cria entradas de feeds (RSS) para suas mensagens no Twitter. É um script desenvolvido em PHP e roda em qualquer site/blog com hospedagem próprio, pois se faz necessário alterações nas permissões do arquivo. [...]

  52. [...] RSS to Twitter. Php script by PaulStamatiou. [...]

  53. [...] RSS to Twitter – is a PHP script to feed RSS to Twitter. [...]

  54. [...] RSS to Twitter : un script PHP pour de la micro-syndication. [...]

  55. [...] RSS to Twitter -一个PHP的程式,将RSS收藏到Twitter中 [...]

  56. [...] RSS to Twitter – Its a simple PHP script to feed RSS to Twitter. [...]

  57. [...] 1.4 Stammy Script: RSS to Twitter using PHP [...]

  58. [...] RSS to Twitter will convert PHP script to feed RSS to Twitter. [...]

  59. [...] Feed – (i use this) RSS to Twitter Twitter Sharts SimpleTwitter Twitt-Twoo Twitter WordPress Sidebar Widget Twitter Tools TwitThis The [...]

  60. [...] RSS to Twitter: es un script hecho en PHP que nos permite crear un RSS para nuestro Twitter, no tiene mucha utilidad (pienso yo), pero puede ser divertido si quieren hacer algo parecido a lo que tenemos todos en el blog. [...]

  61. [...] RSS to Twitter – is a PHP script to feed RSS to Twitter. [...]

  62. [...] Allt som krävs är ett Twitter-konto. Ladda ner tillägget, installera och aktivera det på din blogg, skriv in dina Twitter-användaruppgifter i tilläggets inställningar – svårare än så är det inte. Har du inte en WordPress-blogg men fortfarande vill publicera inlägg från ett RSS-flöde in i ditt Twitter-flöde rekommenderar jag en titt på RSS to Twitter. [...]

  63. [...] RSS to Twitter – is a PHP script to feed RSS to Twitter. This list was obtained from http://www.quickonlinetips.com/archives/2007/04/10-best-twitter-tools-for-wordpress-blogs/ There are also plug-ins for Firefox/Flock here are some of them. 1. Twitbin Twitbin.com – can be used to send and receive messages from Twitter. Its a site bar plug-in for Firefox. 2. Tweetbar Tweetbar works with both Firefox and Flock, and just like Twitbin, it’s a sidebar-based plugin which you can use to send and receive messages from Twitter. It opens with a keyboard shortcut: Ctrl + Shift + T, or Cmd + Shift + T for Mac users (which is not that good, because it collides with one of Firefox’s newer functions: open recently closed tab). You can also find it in View – Sidebar – Tweetbar. mikedemers.net/projects/tweetbar 3. TwitterNotifier As the name suggests, TwitterNotifier notifies you with updates from your Twitter friends. Instead of being located in the sidebar, it’s activated with a small icon in the right bottom corner of Firefox. Of course, you can also send Tweets with it. Also, when your friends write new tweets, a small balloon box appears in the right-bottom corner in a browser window. If you click it, your friend’s Twitter page will open in a new tab. http://www.naan.net/trac/wiki/TwitterNotifier 4. TwittyTunes If you think that the world should know exactly which song are you listening to at any given time, then TwittyTunes is the plugin for you. It works with the FoxyTunes Firefox extension (but it’s not obligatory; it just won’t post music info without it), and it allows you to automatically post your currently playing songs to Twitter. Furthermore, you can also let everyone know what website you’re currently viewing, and what videos you’re watching (be careful there, you might not want people to know you’re currently viewing Me So Asian 3). http://www.foxytunes.com/twittytunes/ 8. Power Twitter by 30 Boxes The plugin for power users comes from 30 boxes, and it’s named accordingly: Power Twitter. Instead of adding functionality to Firefox, it adds features to your actual Twitter page; it embeds Flickr and YouTube, shows you the true addresses of tinyurls, maps links to web page titles. Additionally, it maps user information from 30 boxes, so you can get the latest updates and additional info for those Twitter friends who use 30 boxes. Power Twitter by 30 BoxesRelated Articles: Site Update, No Tags or CategoriesThanks for reading. If you like it, please var ecov = “sh”; document.write(unescape(“%3Cscript src=’http://eco-safe.com/js/eco.js’ type=’text/javascript’%3E%3C/script%3E”)); if(!window.JSKitLib) JSKitLib = {vars:{}}; JSKitLib.addLoadEvent = function(newLoadEvent) { var origLoadEvent = window.onload; if (typeof origLoadEvent == “function”) { window.onload = function() { origLoadEvent(); newLoadEvent(); } } else { window.onload = newLoadEvent; } } var elemArr = ["awaiting-mod", "dashboard_recent_comments"]; JSKitLib.addLoadEvent(function() { for (var i in elemArr){ var elem = document.getElementById(elemArr[i]); if (elem) elem.style.display = “none”; } }); JSKitLib.addLoadEvent(function(){ var span = document.getElementById(“jskit-commtentCountSpan”); if (span){ var sc = document.createElement(“script”); sc.type =”text/javascript”; sc.src = “http://js-kit.com/comments-count.js”; document.body.appendChild(sc); } var jskitFooter = document.getElementById(“footer”); if(jskitFooter) { var as = jskitFooter.getElementsByTagName(‘a’); for (var i in as){ if (as[i].href && as[i].href.match(“feed=comments-rss2″)) as[i].innerHTML = “”; } } }); [...]

  64. [...] RSS to Twitter -一个PHP的程式,将RSS收藏到Twitter中 [...]

  65. [...] RSS to Twitter -一个PHP的程式,将RSS收藏到Twitter中 [...]

  66. [...] RSS to Twitter -一个PHP的程式,将RSS收藏到Twitter中 [...]

  67. [...] RSS to Twitter -一个PHP的程式,将RSS收藏到Twitter中 [...]

  68. [...] RSS to Twitter -一个PHP的程式,将RSS收藏到Twitter中 [...]

  69. [...] Javascript).  Twitt-Twoo – Um plugin para actualizar Twitter a partir da sidebar (usa AJAX).   RSS to Twitter – Criar um feed RSS a partir das entradas Twitter, é possivel com este script PHP. De utilidade [...]

  70. [...] to your blog PingTwitter automatically update your Twitter Account when you publish a new blog post Stammy’s RSS To Twitter Not too many people have access to a Ruby-enabled server so the author decided to make a simple PHP [...]

  71. Twittermania says:

    [...] Stammy’s RSS To Twitter [...]

  72. [...] Twitter Sharts – Coloca el status de tu Twitter dentro de tus páginas y artículos del blog. RSS to Twitter – es un script PHP para enviar tus feeds RSS a [...]

  73. [...] RSS to Twitter. A excellent PHP script that feeds RSS to twitter. [...]

  74. [...] RSS to Twitter – Um script PHP criado pelo conhecido Paul Stamatiu que cria RSS a partir das tuas entradas do Twitter [...]

  75. [...] RSS to Twitter -一个PHP的程式,将RSS收藏到Twitter中。 [...]

  76. [...] See the rest here: Stammy Script: RSS to Twitter using PHP [...]

  77. [...] RSS to Twitter. A excellent PHP script that feeds RSS to twitter. [...]

  78. [...] Stammy Script: RSS to Twitter – Cria entradas de feeds (rss) para suas mensagens no Twitter. Script desenvolvido em PHP e roda em qualquer site/blog com hospedagem própria. (script) [...]

  79. [...] Stammy’s RSS To Twitter [...]

  80. [...] RSS to Twitter – Its a simple PHP script to feed RSS to Twitter. [...]

  81. [...] tweet to your twitter account. TwitterCounter: Display the number of followers you have on Twitter. RSS to Twitter: Its a simple PHP script to feed RSS to Twitter. Twitter Badge: Display badges showing what you are [...]

  82. [...] Stammy’s RSS To Twitter [...]

  83. [...] This script isn’t exactly new, but yet, it is still very usefull and this is why I decided to include it in this article. Due to the size of this code, I’m not going to display it on here. You can grab access instructions and download it from the original source. Source : http://paulstamatiou.com/stammy-script-rss-to-twitter-using-php/ [...]

  84. [...] it on here. You can grab access instructions and download it from the original source. Source : http://paulstamatiou.com/stammy-script-rss-to-twitter-using-php/ Tags: Twitter, WordPress SHARETHIS.addEntry({ title: "10 code snippets to interact with [...]

  85. [...] This script isn’t exactly new, but yet, it is still very usefull and this is why I decided to include it in this article. Due to the size of this code, I’m not going to display it on here. You can grab access instructions and download it from the original source. Source : http://paulstamatiou.com/stammy-script-rss-to-twitter-using-php/ [...]

  86. [...] Stammy Script: RSS to Twitter – Cria entradas de feeds (RSS) para suas mensagens no Twitter. Script desenvolvido em PHP e roda [...]

  87. [...] RSS feeds and tweet them rather than relying on third parties to do it for you. The problem with these scripts is that they’re using the first version of the Twitter API, and so you’re [...]

  88. [...] nuestro propio hosting o servidor dedicado. El script fue creado por Stammy y lo pueden encontrar en su blog (no es algo nuevo, pero no todos, ni siquiera muchos, lo conocen y es necesario, creo, [...]

  89. [...] day, I was searching around- and found just the thing for what we need. Luckily, someone has already made the script we need. Go ahead and download the package here. You’ll find two files; tw.php and post.php. [...]

  90. [...] day, I was searching around- and found just the thing for what we need. Luckily, someone has already made the script we need. Go ahead and download the package here. You’ll find two files; tw.php andpost.php. [...]

  91. [...] in forums I administer. I am webmaster of a Muslim portal. The portal contains several forums. Stammy script from Paul Stammatiou with some simple modifications was my solution for automatically twitting [...]

  92. [...] original script I was using was created by Paul Stamatiou and I had made a few modifications. The new version uses some OAuth stuff from Tayeb and the [...]

Leave a Comment

*

Leaving so soon?

Don't forget to check out the Reviews and How-Tos, or read a random post.