Manual:Chris G's botclasses/pl

This page is a translated version of the page Manual:Chris G's botclasses and the translation is 5% complete.
Other languages:

Chris G's botclasses is a PHP MediaWiki bot framework (formerly?) hosted at the Toolserver. They are derived from the wikibot.classes used by ClueBot. Zobacz też w:User:RMCD bot/botclasses.php oraz



 * HelloWorldBot.php
 * This bot edits Wikipedia:Sandbox.

/* Setup my classes. */
include( 'botclasses.php' );
$wiki      = new wikipedia;
$wiki->url = "";
$wiki->setUserAgent( 'User-Agent: FooBot (' );
/* All the login stuff. */
$user = 'REMOVED';
$pass = 'REMOVED';
$wiki->login( $user, $pass );
/* Test edit. */
$page = 'Wikipedia:Sandbox';
$content = 'Hello, world!';
$summary = 'This is a sample bot edit.';
$wiki->edit( $page, $content, $summary );

Other bots