Skip to content

Instantly share code, notes, and snippets.

@oquno
Created July 22, 2009 20:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save oquno/152258 to your computer and use it in GitHub Desktop.
Save oquno/152258 to your computer and use it in GitHub Desktop.
<?php
$users = split("\n", file_get_contents('friends.txt'));
$yes = 0;
$no = 0;
foreach($users as $user)
{
$xml = simplexml_load_string(file_get_contents('http://search.twitter.com/search.atom?q=from%3A'.$user));
if($xml->entry)
{
$yes++;
echo $user.": yes\n";
}
else
{
$no++;
echo $user.": no\n";
}
}
echo "yes: ".$yes."\n";
echo "no: ".$no."\n";
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment