Menu

[r34]: / trunk / bot-example.php  Maximize  Restore  History

Download this file

21 lines (17 with data), 462 Bytes

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
<?php
require 'bgbot.php';
$wiki = 'XX';
$user = 'USERNAME';
$pass = 'xxxxxxxx';
$sleep_time = 60; // sleep 60 secs between edits
$bot = new Bgbot($wiki, $user, $pass);
$pages = array('page_1', 'page_2', 'page_3');
foreach ($pages as $page) {
if ( $bot->edit($page, $wiki, false) ) {
$content = $bot->page_content;
// do something to $content
$summary = 'my summary for this edit';
$bot->submit($content, $summary, $wiki);
sleep($sleep_time);
}
}
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.