如果你想要阅读中文版本,请点这里。
Developer is a Chinese and his English is poor, so there may be some errors in this document. If U want help me translate this document, please open an issue to tell me.
Are U puzzled by how to use Bing Daily Picture in your website or any other purpose? Now U can use Laji Bing Daily Picture API to do that!
It's a PHP program to get Bing Daily Picture. You can use it on many place, such as set Bing Daily Picture to your wallpaper with Wallpaper Engine automatically when you wake your computer up.
- There are only 2 PHP files in core part. Including annotations, totaling only 43 lines of code.
- Just give user a HTTP 302 respones to Bing:
- Very fast.
- Very little data traffic.
- U needn't worry about too much pictures use too much storage space.
- It use a magical JSON API, U can even get tomorrow's picture after 16 o'clock in the day!
- Update speed is fast also. U can also check updates easily!
- And more features are waiting you to explore...
- A web server, such as Apache, Nginx, IIS or any other web server which support PHP.
- PHP 5.2.0 + with JSON extension
- Download it here and extract it to your www root.
- Rename
settings.php.example
tosettings.php
and edit it. - Navigate to
http://your-domain.com/bingpic.php
in your browser and check if it returns an error. - That's OK! Your API is working now.
You can add your API URL(http://your-domain.com/bingpic.php
) to your program which support add pictures with URL, it will return Bing Daily Picture. Such as HTML <img>
code:
<img src="http://your-domain.com/bingpic.php" />
Or Markdown:
![Bing Daily Picture](http://your-domain.com/bingpic.php)
You can add daysago
query to your API URL to get pictures which is past's. You can even set -1
to this query to get tomorrow's picture after 16 o'clock!
e.g. <img src="http://your-domain.com/bingpic.php?daysago=1" /> // Get yesterday's picture
e.g. <img src="http://your-domain.com/bingpic.php?daysago=-1" /> // Get tomorrow's picture
You can even set Bing Daily Picture to your wallpaper with Wallpaper Engine automatically when you wake your computer up!
You can navigate to http://your-domain.com/check-update
to check updates since v1.3 release.
You can custom update source in settings.php
since update checker v1.2.
If there is a new version, you need download the new version here and extract it to your wwwroot to replace files.
Test version is the developing version. It update faster than release version but it is still developing. You should think carefully before you install test version on your server.
Copyright (c) 2017 @Little_Qiu - Released under the GNU General Public License v3.0.