PHP code example of telekommander / bingdailyphoto
1. Go to this page and download the library: Download telekommander/bingdailyphoto library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
// Fetches two images of the day in high resolution from the American Bing portal
// Composer autoloader first
ges();
// Fetches three images of the day in low resolution, starting yesterday from the French Bing portal
// Composer autoloader first
h ($bing->getImages() as $image) {
printf('<img src="%s">', $image['url']);
}
// Output the image of the day as an image in high resolution
// Composer autoloader first
e-DE', BingPhoto::RESOLUTION_HIGH);
$current = $bing->getImage();
$info = getimagesize($current['url']);
header("Content-type: " . $info["mime"]);
readfile($current['url']);
die();
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.