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
class Zend_Service_ZendTube {
/*Youtube Video Player*/
function YouTubePlayer($left,$top,$width,$height,$url)
{
$urlvideo=NULL;
$newurl=NULL;
if(!empty($url)){
$first=strpos($url,'=');
$last=strpos($url,'&');
if($last!=false)

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

else

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

$src="http://www.youtube.com/v/".$newurl;
$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;
$newurl=null;
if(!empty($url))

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

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

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

else

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

$src="http://www.dailymotion.com/swf/".$newurl;
$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;
$newurl=null;
if(!empty($url))

Unknown macro: { $last=strrpos($url,"/"); $newurl=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.