-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathglobal-userpage.php
More file actions
29 lines (18 loc) · 867 Bytes
/
global-userpage.php
File metadata and controls
29 lines (18 loc) · 867 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
<?php
include '/home/soxred93/wikibot.classes.php';
$wpapi = new wikipediaapi;
$wpq = new wikipediaquery;
$wpi = new wikipediaindex;
$http = new http;
$text = $wpq->getpage('User:X!/globaluserpage');
$wikis = array('ar.wikipedia', 'de.wikipedia', 'dv.wikipedia', 'es.wikipedia', 'fi.wikipedia', 'it.wikipedia', 'no.wikipedia', 'pt.wikipedia', 'ru.wikipedia', 'species.wikipedia', 'test.wikipedia');
foreach ($wikis as $wiki) {
$wpi->indexurl = 'http://'.$wiki.'.org/w/index.php';
$wpapi->apiurl = 'http://'.$wiki.'.org/w/api.php';
$wpq->queryurl = 'http://'.$wiki.'.org/w/query.php';
$wpapi->login('User:X!', file_get_contents('/home/soxred93/.pass2'));
$wpi->forcepost('User:X!', $text, 'Posting userpage from [[m:en:User:X!/globaluserpage|global userpage]]');
$http->post('http://'.$wiki.'.org/w/api.php?action=logout', array());
sleep(10);
}
?>