2009/5/10 Rezuan Asrah rezuan7@gmail.com:
I would like to use action=opensearch rather than action=query action=opensearch seems to return me a short result of the query if I specify with limit=1, rather than action=query. Why does action=opensearch returns nothing after being called by unserialize() function?
Because action=opensearch does not obey the format directive. In order to comply with the OpenSearch specification, the information is returned in JSON format. Use json_decode() to get the data.
I'm not quite sure what you'll be using OpenSearch for, though...
In answer to to your first question, there are also several frameworks written in PHP that implement the MediaWiki API. All the ones I know of are listed at http://en.wikipedia.org/wiki/Wikipedia:Creating_a_bot#PHP
Sam