Forum Moderators: coopster
<?php
$pages = array(
'videos/1.php', 'videos/2.php');
shuffle($pages);
include($pages[0]);
?>
<?php
$pages = array(
'videos/1.php', 'videos/2.php', 'videos/3.php');
//If loading for the first time
if( !isset($_GET['load']) ){
shuffle($pages);
$load = 0;
}
include($pages[$load]);
$vid = $load-1;
if($vid < 0) echo "Previous";
else echo "<a href=\"./?load=$vid\">Previous</a>";
$vid = $load+1;
if( $vid > sizeof($pages) ) echo "Next";
else echo "<a href=\"./?load=$vid\">Next</a>";
//Sorry for being a little messy :P
//This way you can load videos directly as well, by links on your site
//---AG47
?>