PHP - Random bg Script Generator

Selects a background url at random. Refresh a few times for a demo.
Enter your urls below.

Thats all folks!
copy to clipboard
<html>
<head>
<style>
<?php
#construct the backs Array
$backs=array("{{url1}}","{{url2}}","{{url3}}","{{url4}}","{{url5}}","{{url6}}","{{url7}}","{{url8}}","{{url9}}","{{url10}}","{{url11}}","{{url12}}","{{url13}}","{{url14}}","{{url15}}");

#constuct the random file selector
$n=count($backs);
$num=rand(0, ($n-1));
$back=$backs[$num];

#send the back to the browser
print "body {
background-image: url($back);
}";
?>
</style>
</head>
<body>
</body>
</html>
Christmas Card
Riverdrift.com   
2000 - 2024 Hand Made in the U.S.A