User:Cakemix/Tests/Signatures/Code

(c) Cakemix

<?PHP Set_time_limit(0); //So it doesn't stop after 30 seconds of loading Require 'bot.classes.php'; //Need the classes $Stuff = Array('Username' => 'JSBot', 'Time' => time, 'Extra' => Array('PWNFS' => Null, 'UTWSC' => Null, 'PI' => Null)); /* * PWNFS : Pages with no fore Sig [Signature/*|Sig/* * UTWSC : User Talks with Sig Category * PI   : Page Info */ Include('pass.php'); //Cbf giving out my password $Bot = new wikipedia('http://callofduty.wikia.com/api.php'); //Starting up a new thread $Bot->login($Stuff['Username'], $pass); //Loging in I guess? Unset($pass); //Destroying the password var Foreach ($Bot->categorymembers('Category:Templates/Signatures') as $Name): $Continue = False; If (Substr($Name, 0, 10) == 'User talk:'): $Stuff['Extra']['UTWSC'][$Name] = True; $Continue = True; EndIf; If ((Substr($Name, 0, 13) != 'Template:Sig/') && (Substr($Name, 0, 20) != 'Template:Signatures/')): $Stuff['Extra']['PWNFS'][$Name] = True; $Continue = True; EndIf; If ($Continue) Continue;

$Page = $Bot->getPage($Name); $Stuff['Extra']['PI'][$Name] = Array('Contains Break lines' => StrTF($Page, "\n"), 'Contains ' => StrTF($Page, " ")); EndForEach;

Print_r($Stuff);

Function StrTF($Page, $Text) { //Made to keep the string, well not so big Return !Strpos($Page, $Text) ? 'False' : 'True'; }