Listet alle Kategorien, die nicht genau eine "{{Quelle" Angabe enthalten.
<?php
$s = unserialize(file_get_contents('http://de.guttenplag.wikia.com/api.php?action=query&list=categorymembers&cmtitle=Kategorie:Quelle&format=php&cmlimit=500'));
$s = $s['query']['categorymembers'];
$i = 0;
$pageids = '';
$entries = array();
foreach($s as $cat) {
$pageids .= $cat['pageid'].'|';
if(++$i === 49) {
$i = 0;
$e = unserialize(file_get_contents('http://de.guttenplag.wikia.com/api.php?action=query&prop=revisions&rvprop=content&format=php&pageids='.$pageids));
$entries = array_merge($entries, $e['query']['pages']);
$pageids = '';
}
}
$e = unserialize(file_get_contents('http://de.guttenplag.wikia.com/api.php?action=query&prop=revisions&rvprop=content&format=php&pageids='.$pageids));
if(isset($e['query']['pages']))
$entries = array_merge($entries, $e['query']['pages']);
foreach($entries as $entry) {
if(preg_match('/{{Quelle/', $entry['revisions'][0]['*']) !== 1) {
print '* [['.$entry['title'].']]'."\n";
}
}