Created
February 7, 2021 12:04
-
-
Save BH4HPA/09294a9f5238eb54a9e1f11686c02690 to your computer and use it in GitHub Desktop.
return the latest bing pic
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function getBingPic(){ | |
$res = json_decode(file_get_contents("https://bing.com/HPImageArchive.aspx?format=js&idx=0&n=1"),true); | |
return $res["images"][0]["url"]; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment