Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 84a1b53855
Fetching contributors…

Cannot retrieve contributors at this time

23 lines (14 sloc) 0.525 kb
<?php
include("lib/IronMQ/IronMQ.class.php");
function getTweet($query) {
$results = file_get_contents("http://search.twitter.com/search.json?q=".$query."&rpp=1");
return $results["results"][0];
}
$config = parse_ini_file('config.ini', true);
echo "Searching for ".$config['twitter']['query']."...";
$tweet = getTweet($config['twitter']['query']);
print_r($tweet);
$mq = new IronMQ('config.ini', true);
$response = $mq->postMessage('', "TweetWorker", array("body" => $tweet["text"]));
print_r($response);
?>
Jump to Line
Something went wrong with that request. Please try again.