You mean I should create a special page to Call MediaWiki API?
Actually I want to find another way to call MediaWiki API.
I use curl to post parameters to MediaWikiAPI to edit page.
The post parameters are: $post =
"title=$page&action=edit&basetimestamp=$ts&starttimestamp=$sts&token=$token&text=$newtext"
. Then I use curl to post request.
But when the $newtext too long , this request will occur error. Http 500 internal error.
So I want to find another way to resolve it.
Could you please give me any help or suggestions? Thanks
-----Original Message-----
From: mediawiki-api-bounces(a)lists.wikimedia.org
[mailto:mediawiki-api-bounces@lists.wikimedia.org] On Behalf Of Roan Kattouw
Sent: 2009年6月11日 16:51
To: MediaWiki API announcements & discussion
Subject: Re: [Mediawiki-api] postAPI
2009/6/11 Nan Li <nan.li(a)glu.com>om>:
Thanks .I have add this into my class to edit page.
$params = new FauxRequest(array (
'action' => 'edit',
'title' => $page,
'basetimestamp' => $ts,
'starttimestamp' => $sts,
'token' => $token,
'text' => $newtext
));
$api = new ApiMain($params);
$api->execute();
$data = & $api->getResultData();
return $data;
and then add this
require_once('../../includes/WebRequest.php');
require_once('../../includes/api/ApiMain.php');
at the top of my class.
Instead of this, you should write your extension as a special page
<http://www.mediawiki.org/wiki/Manual:Special_pages>.
Roan Kattouw (Catrope)
_______________________________________________
Mediawiki-api mailing list
Mediawiki-api(a)lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-api