Here is one example:
I assume you will keep the blocks of code in external files and have 5 pages numbered 1.html thru 5.html in the same directory (you can adapt the $files variable for your purpose).
The script will pick one file at random and display the contents. That's it.
PHP Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>test</title>
</head>
<body>
<?php
srand((float) microtime() * 10000000); // randomize seed - not needed starting from PHP 4.2.0 and up
$files = array("1.html", "2.html", "3.html", "4.html", "5.html");
$random_file = array_rand($files); // pick one entry at random
include ($files[$random_file]); // display contents of the selected file
?>
</body>
</html>