So the other day someone was looking for a quick php script that would load a random image from a folder (rotating banner script) and display it on their website. There are already a ton of scripts out there that do this but of course, this was an excuse to build something for fun. So, I decided to create a script that would do just this but with the least amount of code lines still keeping it efficient (again, just for fun). This is what I came up with:

span class=”st0″>’dir’‘Not Valid’‘/(.png)|(.gif)|(.jpg)/i’‘Content-type: image/’‘Not Valid’‘/’?‘/’

Read the rest of this entry »

Tags: , , , , , , ,