Created
November 10, 2018 18:09
-
-
Save jahidulsaeid/e7897e2226d0ba7ce6be9dd4fa04230e to your computer and use it in GitHub Desktop.
Everytime refresh background change
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 | |
$backgrounds = array | |
( | |
array | |
( | |
'image' => 'images/42.png', | |
'url' => 'http://google.se' | |
), | |
array | |
( | |
'image' => 'images/56.jpg', | |
'url' => 'http://disney.com' | |
) | |
); | |
$choice = $backgrounds[array_rand($backgrounds)]; | |
$image = $choice['image']; | |
$url = $choice['url']; | |
?> | |
<body style="background:url('<?php echo $image; ?>'); background-size: cover;" onclick="window.location = '<?php echo $url; ?>' "> | |
</body> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment