Skip to content

Instantly share code, notes, and snippets.

@rummelonp
Created September 6, 2010 03:42
Show Gist options
  • Save rummelonp/566616 to your computer and use it in GitHub Desktop.
Save rummelonp/566616 to your computer and use it in GitHub Desktop.
<?php
$url = "http://(id):(password)@stream.twitter.com/1/statuses/sample.json";
$stream = fopen($url, 'r');
while ($json = fgets($stream)) {
$status = json_decode($json);
if (preg_match('/[ぁ-ヶ]|[亜-黑]/', $status->text)) {
echo '@'.$status->user->screen_name.PHP_EOL;
echo $status->text.PHP_EOL;
echo PHP_EOL;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment