Skip to content

Instantly share code, notes, and snippets.

@colinodell
Created October 24, 2014 23:22
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 colinodell/a70c6f0cdcd8f3036da4 to your computer and use it in GitHub Desktop.
Save colinodell/a70c6f0cdcd8f3036da4 to your computer and use it in GitHub Desktop.
Google Inbox invite checker
<?php
$last = '';
while (true) {
$json = file_get_contents('https://www.reddit.com/r/google/comments/2k0kjr/google_inbox_invite_chain.json?sort=new&foo='.rand(1,500));
$json = json_decode($json, true);
$comment = $json[1]['data']['children'][0];
$msg = $comment['data']['author'] . ' - ' . $comment['data']['body'] . "\n";
if ($msg != $last) {
echo "\n" . $msg;
$last = $msg;
} else {
echo '.';
sleep(1);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment