/WikimediaCommonsPotd

Get URL for Wikimedia Commons picture of the day

Primary LanguagePHPMIT LicenseMIT

Wikimedia Commons Picture Of The Day URL 🖼

Get URL for today's Wikimedia Commons picture of the day.

Utilises great Wikimedia Commons' Redirect/file tool.

Usage:

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 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 -plugin (yep, that's a mouthful!).

License

MIT