Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

21 lines (19 sloc) 0.537 kb
<?php
require_once dirname(__FILE__) . "/lib/TwitterSearch.php";
echo("Starting PHP Worker101\n");
$payload = getPayload();
echo("We got following params\n");
print_r($payload);
echo("\nSearching Twitter\n");
$query = $payload->query;
$search = new TwitterSearch($query);
$results = $search->results();
print_r($results);
$file = 'output.txt';
echo("Writing to file");
file_put_contents($file, $results[0]->text);
$from_file = file_get_contents($file);
echo("Text from file\n");
print_r($from_file);
echo("\nWorker101 completed.");
?>
Jump to Line
Something went wrong with that request. Please try again.