Skip to end of metadata
Go to start of metadata
You are viewing an old version of this page. View the current version. Compare with Current  |   View Page History

<?php

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * Description of Zend_Service_ZendTube
 *
 * @author angelos
 */
class Zend_Service_ZendTube {
     /*Youtube Video Player*/
    function YouTubePlayer($left,$top,$width,$height,$url)
    {
        $urlvideo=NULL;       
        $createurl=NULL;

        if(!empty($url)){
                         $first=strpos($url,'=');
                         $last=strpos($url,'&');
                            if($last!=false)

Unknown macro: {                                    $createurl=substr($url,$first+1,$last-($first+1));                            }

                            else
                           

Unknown macro: {                                 $createurl=substr($url,$first+1,strlen($url)-($first+1));                            }

    
                          $src="http://www.youtube.com/v/".$createurl;
                          $urlvideo="<object>".
                          "<embed style='margin-left:$left;margin-top:$top'"."src=$src   type=application/x-shockwave-flash  width=$width  height=$height></embed>".
                          "</object>";
                         }
              return $urlvideo;      
     }
    /*Metacafe Video Player*/
     function MetaCafePlayer($left,$top,$width,$height,$url){
        $urlvideo=null;
        if(!empty($url))

Unknown macro: {                            $newurl=strstr($url,"watch");                            $first=strpos($newurl,"/");                            $last=strrpos($newurl,"/");                            $createurl=substr($newurl,$first+1,$last-($first+1)).".swf";                            $src=htmlentities("http}

    
       return $urlvideo;   
    }
     /*DailyMotion  Video Player*/
    function DailyMotionPlayer($left,$top,$width,$height,$url){
        $urlvideo=null;
        if(!emtpy($url)){
            $first=strrpos($url,'/');
            $last=strpos($url,'#');
                                if($last!=false)

Unknown macro: {                                    $createurl=substr($url,$first+1,$last-($first+1));                                }

                                else
                               

Unknown macro: {                                    $createurl=substr($url,$first+1,strlen($url)-($first+1));                                }

    
                         $src="http://www.dailymotion.com/swf/".$createurl;
                         $urlvideo="<object>".
                         "<embed style='margin-left:$left;margin-top:$top'"."src=$src   type=application/x-shockwave-flash  width=$width  height=$height></embed>".
                         "</object>";
              }
    return $urlvideo;    
   }
   
    /*Vimeo  Video Player*/
   
   function VimeoPlayer($left,$top,$width,$height,$url){
       $urlvideo=null;
          if(!empty($url))

Unknown macro: {              $last=strrpos($url,"/");              $createurl=substr($url,$last+1,strlen($url)-($last+1));              $src="http}

      return $urlvideo;
   }
}

?>

Labels:
None
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.