PHP Classes

File: index.php

Recommend this page to a friend!
  Classes of Virgilio lino   w3v   index.php   Download  
File: index.php
Role: Example script
Content type: text/plain
Description: example of usage you need videos to try
Class: w3v
Embed a video player in Web pages
Author: By
Last change:
Date: 12 years ago
Size: 707 bytes
 

Contents

Class file image Download
<?php
  
require_once('w3v.php');
  
//this example loads every video on video directory
  
$d = dir("video/");
  
$idx=0;
   while (
false !== ($entry = $d->read())) {
     if(
$entry!='.'&&$entry!='..') {
      
$w3v[]=new w3v('video'.$idx,$d->path.$entry);
      
$idx++;
     }
   }
  
$d->close()
?>
<html>
<body>
   <h1>This is an example of w3v library, it loads every file on video directory</h1>
     <?php for($i=0;$i<count($w3v);$i++) { ?>
<div>
    <?=$w3v[$i]->display();?>
</div>
    <?php } ?>
</body>
 <?php for($i=0;$i<count($w3v);$i++)echo $w3v[$i]->getScript(); ?>
<script type="text/javascript">
     <?php for($i=0;$i<count($w3v);$i++)echo $w3v[$i]->load(); ?>
</script>
</html>