An open API service indexing awesome lists of open source software.

https://github.com/simison/wikimediacommonspotd

Get URL for Wikimedia Commons picture of the day
https://github.com/simison/wikimediacommonspotd

wikimedia wikimedia-api wikimedia-commons

Last synced: about 1 year ago
JSON representation

Get URL for Wikimedia Commons picture of the day

Awesome Lists containing this project

README

          

# Wikimedia Commons Picture Of The Day URL 🖼

Get URL for today's [Wikimedia Commons picture of the day](https://commons.wikimedia.org/wiki/Commons:Picture_of_the_day).

Utilises great Wikimedia Commons' [Redirect/file tool](https://commons.wikimedia.org/wiki/Special:Redirect/file).

Usage:
```php
require_once( 'wikimedia_commons_potd.class.php' );

$wikimediaCommonsPotd = new WikimediaCommonsPotd();

echo $wikimediaCommonsPotd->get( 1024 );

// → https://commons.wikimedia.org/wiki/Special:FilePath/Wien_Zentralfriedhof_Kirche_Innenraum_SO-Seite_01.jpg?width=1024
```

⚠️ Please remember that this class won't cache anything and that you should [link back](https://commons.wikimedia.org/wiki/Commons:Reusing_content_outside_Wikimedia) to awesome Wikimedia folks when using their content.

# WP Plugin
I'm using this class (with little modifications) for [Wikimedia Commons Picture of The Day for WP Login](https://github.com/simison/WikimediaCommonsPotdWpLogin) -plugin (yep, that's a mouthful!).

# License
MIT