Skip to content

Instantly share code, notes, and snippets.

@aniruddha-adhikary
Created July 29, 2012 09:40
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aniruddha-adhikary/3197075 to your computer and use it in GitHub Desktop.
Save aniruddha-adhikary/3197075 to your computer and use it in GitHub Desktop.
Bing Wallpaper Fetcher
<?php
system("wget -q http://www.bing.com -O bing");
$dump = file_get_contents("bing");
system("rm bing");
$chunks = explode("g_img=", $dump);
$temps = explode("'", $chunks[1]);
$url = "http://www.bing.com/".$temps[1];
system ("wget -q $url -O /home/".'$USER'."/Pictures/bing.jpg");
system ("gsettings set org.gnome.desktop.background picture-uri file:///home/".'$USER'."/Pictures/bing.jpg");
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment