<?php
$filename = $_SERVER["DOCUMENT_ROOT"].'/inc/pub/pub_array.inc';
$how_many_to_show = 4;
if ($fileContents = file($filename)) {
shuffle($fileContents);
for ($i = 0; $i < $how_many_to_show; $i++) {
print($fileContents[$i]. '<br />');
}
} else {
die('Could not get contents of: ' . $filename);
}
?>
|