jrws Posted December 20, 2008 Share Posted December 20, 2008 Hey, I am not wanting anyone to program this as such, rather I wish to know how I go about it. So here is my idea. I am sure you guys have seen the random ad scripts? Where you have images in an array and it selects them at random? Well I was thinking would it be possible so you didn't need to name the file? What I mean is you just point php to the folder that stores all the images and then it selects one at random. If this is possible there is no reason that you couldn't then add it so that you have adverts uploaded via the website instead of FTP but that is what I want to know how to go about it. I am thinking I will need to have PHP look for the file extensions that are common to pictures (.jpg, .gif etc) So what else would I need to do? Quote Link to comment https://forums.phpfreaks.com/topic/137771-how-would-i-go-about-this/ Share on other sites More sharing options...
.josh Posted December 20, 2008 Share Posted December 20, 2008 glob and array_rand Quote Link to comment https://forums.phpfreaks.com/topic/137771-how-would-i-go-about-this/#findComment-720079 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.