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
- Host: GitHub
- URL: https://github.com/simison/wikimediacommonspotd
- Owner: simison
- License: mit
- Created: 2017-11-03T20:54:04.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2017-11-03T22:40:39.000Z (over 8 years ago)
- Last Synced: 2025-04-11T00:58:15.961Z (about 1 year ago)
- Topics: wikimedia, wikimedia-api, wikimedia-commons
- Language: PHP
- Size: 5.86 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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