Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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
You can’t perform that action at this time.