views:

18

answers:

1

Hi, I have an html page where I put in a text box an animal species. So I would extract from wikipedia an image of it and load in a

How I can do it?

Thanks.

A: 

Wikipedia has an API, which you can see here: http://en.wikipedia.org/w/api.php

Documentation: http://www.mediawiki.org/wiki/API

However, since they don't seem to have support for the JSONP format, so you'll need to do the API calls server side. You can do this using cURL (there are wrappers in pretty much every language you would want to use).

Then you would want to send off a call to something like

curl http://en.wikipedia.org/w/api.php?action=query&prop=images&titles=Jaguar&format=xml

Jamie Wong