I have coded in html/php/css, but have not done anything too elaborate. I was looking at a site that had a different image every time on reload. When looking at the source code for the site, I found the following code that was placing the background.
On every reload the "bg002.jpg" portion of the code would change. Can anyone explain a method or script that could be causing this? There is no other code on the page that would refer to an array that the background images are being caller from.
If there's no hint of anything in the page source, they're using a scripting language like PHP to randomly select the image filename before the page is rendered in your web browser.
It's the same as doing the following:
$myVar = "Hello";
When this script is executed and rendered in the browser, you would see only the text "Hello".
Similarly, the "bg002.jpg" portion of the page source you're looking at is being printed using some random value. You just can't see the code used to choose the image filename because that processing is done on the server side (before your browser receives a response from the web server); you just see the output of some echo statement.