Skip to content

Instantly share code, notes, and snippets.

@scottrobertson
Created October 18, 2013 12:34
Show Gist options
  • Save scottrobertson/7040864 to your computer and use it in GitHub Desktop.
Save scottrobertson/7040864 to your computer and use it in GitHub Desktop.
Really simple, and hacky PHP Script to check if Nexus 5 has been released.
<?php
$url = 'https://play.google.com/store/devices/details?id=nexus_5_32gb';
while(true) {
$time = date('h:i:s');
$contents = @file_get_contents($url);
$size = strlen($contents);
file_put_contents('/tmp/nexus.txt', $size);
$old_size = @file_get_contents('/tmp/nexus.txt');
if ($size != $old_size) {
exec('open ' . $url);
} else {
echo "$time - Not Released Yet :( \n";
}
sleep(10);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment