include('includes/shared/ez_sql_core.php'); include('includes/sql.php'); $db = new ezSQL_mysql('p9tvuser', 'c@bron', 'p9tvdb'); ?>
//mysql connection goes here
$flash_folder = $_SERVER["DOCUMENT_ROOT"]."/content/streams/";
//the following pulls a random file from the streams folder and adds it to the flash player
if ($handle = opendir($flash_folder))
{
$array_to_send = "";
while (false !== ($file = readdir($handle)))
{
if ($file != "." && $file != "..")
{
$array_to_send .= "$file,";
}
}
$array_to_send .= ")";
}
$array = str_replace(",)",")",$array_to_send);
$flash_array = explode(",",$array_to_send);
$count = count($flash_array)-1;
$file_to_pull = rand(0,$count);
$video = $db->get_results("SELECT * FROM programme_guide order by RAND() LIMIT 1");
foreach($video as $release){
$thisvideo = $release->filename;
}
?>
|
||||