What is the best way to programmatically get the attribution text for
creative commons images? I was told that the category containing the license
would contain the attribution text, but found many images dont follow that
process. Some images, for example, Max_Planck.png have some attribution
requirements buried inside the description - but that is hard to extract and
automate. Any suggestions?
As of Monday Feb 15, passing a User-Agent header is mandatory for
*all* HTTP requests to Wikimedia sites. This includes the API. If your
client doesn't provide a User-Agent header, it'll receive HTTP 403
errors with the text "Please provide a User-Agent" or something along
those lines. This was announced in a (now rather lengthy) thread on
Ideally, your User-Agent header should identify your client in such a
way that Wikimedia staff are able to figure out who to contact if your
client is somehow engaging in disruptive behavior. Putting in an
e-mail address works well for this, but mentioning your wiki username,
the name of the wiki page of the tool (with wiki prefix, so they know
on which of the 812 wikis to look) or a URL to a page about you or
your tool are fine too, provided that they lead to a functional way of
Please don't take this as "if I set a User-Agent my client will
potentially be blocked". If it's being disruptive, it'll be blocked
anyway; if you set a User-Agent header, you'll be informed
immediately, or better, get a chance to fix your client without having
Roan Kattouw (Catrope)
Mediawiki-api-announce mailing list
I am stuck with image uploading from file system
I have a path c:\images\abc.jpg
This image I want to upload on wiki
but it doesnt work
sample code looks like
$file = "c:\\images\\D4215_0_0.jpg";
$data = "action=upload&filename=$file&token=%2B%5C";
$path = "/mediawiki/api.php";
echo "socket opened";
fputs($fp, "POST $path HTTP/1.1\r\n");
fputs($fp, "Host: $host\r\n");
fputs($fp, "Content-type: multipart/form-data \r\n");
fputs($fp, "Content-length: ". strlen($data) ."\r\n");
can you please help me whats wrong here?
View this message in context: http://old.nabble.com/Image-uploading-tp27544560p27544560.html
Sent from the WikiMedia API mailing list archive at Nabble.com.
Is it possible to know using the MediaWiki API when an article was
added to a given category?
More specifically, I'm looking for the dates when featured articles
where labeled as featured.
If this turns out to be impossible via the API, how can this
information be obtained otherwise?
Thanks in advance for your comments,