Skip to content

Instantly share code, notes, and snippets.

@Arsenalist
Last active December 22, 2015 04:19
Show Gist options
  • Save Arsenalist/6416573 to your computer and use it in GitHub Desktop.
Save Arsenalist/6416573 to your computer and use it in GitHub Desktop.
A PHP script to check whether the Mesut Ozil signing has been announced on the Arsenal.com RSS feed.
<?php
while (true) {
$contents = file_get_contents('http://feeds.arsenal.com/arsenal-news');
if (stripos($contents, 'mesut') !== FALSE) {
echo date(DATE_RFC822) . ": It's official!\n";
mail('PUTYOUREMAIL@HERE.COM', 'Arsenal signed Ozil', '');
exit(0);
} else {
echo date(DATE_RFC822) . ": Nothing doing.\n";
sleep(10);
}
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment