Ad,
I've been meaning to reply to your email for the past two weeks, but I'm just now getting around to it.
I am curious what progress you've made on this. But I also have some information (see below) that may help if you need it.
Ad Strack van Schijndel writes:
https://www.mediawiki.org/wiki/API:Login#How_to_log_in it says "Note that logging in and remaining logged in requires correct HTTP cookie handling by your client on all requests. Typically your framework or HTTP request library will handle this for you."
So the question is, what framework or HTTP request library is that and how can it be used.
MediaWiki has a built-in HTTP client class[1], but if you're building this outside of the MediaWiki framework, you could use the Guzzle library[2].
I've written code using both of these, so if you need help, let me know and I'll try to provide a more speedy reply.
Mark.
Footnotes: [1] https://doc.wikimedia.org/mediawiki-core/master/php/classHttp.html
[2] http://docs.guzzlephp.org/en/latest/