It's actually pretty easy, as D-Mac said.
Basically the rand($x,$y) command gives you a random number between $x and $y eg rand(1,10) would give you a number between (and including) 1 and 10.
At the simplest level you could use the code:
PHP Code:
$x = number_of_pages;
$page = rand(1,$x);
switch($page){
case 1:
header("Location: page1.php");
break;
case 2:
header("Location: page2.php");
break;
etc...
}
You just need to assign the number of pages to $x, and then do a case statement for each number from 1 to $x, and put your page names in the header() command.
This will redirect to the page corresponding to the randomly generated number.
If you have a list of all your pages in the database, with a CMS for example, there is an sql RANDOM command that will pull a random record from a table.
UPDATE: Oops, D-Mac beat me to it lol