Jump to content

User:Bot1058/permalink.php

From Wikipedia, the free encyclopedia
<?php
/** permalink.php - Keep [[Wikipedia:Requested moves/Technical requests/Permalink]] up-to-date
 *  Version 1.1
 *
 *  (c) 2020 WBM - http://en.wikipedia.org/wiki/User:Wbm1058
 *
 *  This program is free software; you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation; either version 2 of the License, or
 *  (at your option) any later version.
 *
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with this program; if not, write to the Free Software
 *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 *   
 *  Developers (add yourself here if you worked on the code):
 *    WBM - [[User:Wbm1058]] - May 2020
 **/
set_time_limit(0);
ini_set("display_errors", 1);
error_reporting(E_ALL ^ E_NOTICE);
require_once 'botclasses.php';  // Botclasses.php was written by User:Chris_G and is available under the GNU General Public License
include("logininfo.php");

echo "Logging in...\n";
$objwiki = new wikipedia();
$objwiki->login($user, $pass);
echo "...done.\n";

while(1) {
	$contents = $objwiki->getpage("Wikipedia:Requested moves/Technical requests/Permalink");
	echo "\n$contents\n";
	$objwiki->edit("Wikipedia:Requested moves/Technical requests/Permalink","{{subst:REVISIONID:Wikipedia:Requested moves/Technical requests}}",
		"[[User:Bot1058|Task 7]]: Updating permalink",false,true);
	sleep (10);
}

?>