Last active
August 29, 2015 14:09
-
-
Save Southparkfan/db847516333b38fc2d08 to your computer and use it in GitHub Desktop.
Orain inactivity checker
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$wikis = array('insert all the wikis'); | |
foreach ($wikis as $wiki) { | |
$connec = mysqli_connect('10.131.243.243', 'mediawiki', 'dbpass', $wiki) or die('Could not connect - ' . mysqli_connect_error($connec)); // prod3 | |
$query = mysqli_query($connec, 'SELECT rc_timestamp FROM recentchanges WHERE rc_timestamp > 20141010000000 LIMIT 1'); // check for RC entries in the last 30 days | |
# No RC entries found in the last 30 days | |
if (mysqli_num_rows($query) == 0) { | |
echo 'No RC entries in the last 30 days found for wiki ' . $wiki; | |
} | |
mysqli_close($connec); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment