Hey, I was wondering if I could create some PHP which redirects to a random page or directory on a website. It would have to cover all of the files in the sub-directories as well. The only reason I ask this is because I don't want to have to list all the pages in the code because there will be a lot.
Yes but it needs to have a list of ages somewhere. Either list in a file, database or the code will need to search for and find pages each time it runs which is bad!
For dynamic sites though where the files themselves are not the URL, adding pages manually is ore ideal unless you create a script to read links from your pages and store them all (sort of like a spider).
Its 12:30am so im going to be really brief...
it is possible, all you have to do is list the directory with php functions, number them and then create a random number generation from 1 to the 'count' of the scripts inside that directory, then set the page url as a variable and put it into the header(); function or a alternate redirect html, java, watever tickles your fancy.