By Daniel15 (dan.cx) This is a very simple Twitter autoresponder bot. It requires PECL OAuth extension to be installed (run "pecl install oauth", or if on Windows, grab php-oauth.dll. If using cPanel you can install it via WHM). The authentication is designed for command-line usage, it won't work too well via a web browser. You'll have to sign up for an application on Twitter's site to get the consumer key and secret.
Could be modified to be more advanced (match regular expressions to answer questions, etc.)
Questions? See my blog post - http://dan.cx/blog/2011/06/twitter-autoreply-bot-dbznappa
Modified 2013-06-13 - Twitter API 1.0 discontinued, modified to use Twitter API 1.1
@OmgedOsman Good edits. I've made some major edits to your modified version. Allows for keyword filtering. If keyword is present tweet will be ignored.
$badstrings is a string array.
Usage: $twitter->addReply('Search for', 'Reply with', $badstrings)
Filtering isn't necessary, this will work too: $twitter->addReply('Search for', 'Reply with')