Skip to content

Instantly share code, notes, and snippets.

@robbiet480
Forked from dennistang/FLV.php
Created January 24, 2011 07:52
Show Gist options
  • Select an option

  • Save robbiet480/792953 to your computer and use it in GitHub Desktop.

Select an option

Save robbiet480/792953 to your computer and use it in GitHub Desktop.
<?
$dir=opendir("/path/to/your/flv/folder/");
$i=0;
while($flvfile=readdir($dir))
{
if ($flvfile != "." && $flvfile!="..")
{
$flvarray[$i]=$flvfile;
$i++;
}
}
closedir($dir);
$rand=rand(0,count($flvarray)-1);
if($rand >= 0)
{
echo '<html><body style="background: #000;"><h1>
<object width="100%" height="100%">
<param name="movie" value="gahhh.swf">
<embed src="'.$flvarray[$rand].'" width="100%" height="100%">
</embed>
</object>
</h1></body></html>';
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment