function embed($link) {
$site = get_sname($link);
$site = strtolower($site);
$movielink = "<a href='$link' rel='nofollow'>$site Link</a><br/><br/>";
switch ($site) {
case "movshare.net" :
preg_match("#http://(?:www\.)?movshare\.net/video/([_\-a-z0-9]+)#i", $link, $matches);
if(!empty($matches))
{
$embed="<div align='center'><iframe style='overflow: hidden; border: 0; width:720px; height: 340px;' src='http://www.movshare.net/embed/".$matches[1]."/?width=720&height=306&c=5ad' scrolling='no'></iframe></div>";
}
return $embed.$movielink;
break;
case "videoweed.com" :
preg_match("#http://(?:www\.)?videoweed\.com/([a-z]{4}|[a-z]{5})/([_\-a-z0-9]+)#i", $link, $matches);
if(!empty($matches))
{
$embed="<div align='center'><iframe width='600' height='480' frameborder='0' src='http://embed.videoweed.com/embed.php?v=".$matches[2]."&width=600&height=480' scrolling='no'></iframe></div>";
}
return $embed.$movielink;
break;
case "novamov.com" :
preg_match("#http://(?:www\.)?novamov\.com/video/([_\-a-z0-9]+)#i", $link, $matches);
if(!empty($matches))
{
$embed="<div align='center'><iframe style='overflow: hidden; border: 0; width: 600px; height: 480px' src='http://embed.novamov.com/embed.php?width=600&height=480&v=".$matches[1]."&px=1' scrolling='no'></iframe></div>";
}
return $embed.$movielink;
break;
case "divxstage.net" :
preg_match("#http://(?:www\.)?divxstage\.net/video/([_\-a-z0-9]+)#i", $link, $matches);
if(!empty($matches))
{
$embed="<div align='center'><iframe style='overflow: hidden; border: 0; width: 600px; height: 400px' src='http://embed.divxstage.net/embed.php?v=".$matches[1]."&width=600&height=400' scrolling='no'></iframe></div>";
}
return $embed.$movielink;
break;
case "megavideo.com" :
preg_match("#http://(?:www\.)?megavideo\.com/\?v=([_\-a-z0-9]+)#i", $link, $matches);
if(!empty($matches))
{
$embed="<div align='center'><object width='740' height='470'><param name='movie' value='http://www.megavideo.com/v/".$matches[1]."'></param><param name='allowFullScreen' value='true'></param><embed src='http://www.megavideo.com/v/".$matches[1]."' type='application/x-shockwave-flash' allowfullscreen='true' width='740' height='470'></embed></object><br />There is a 72 minute viewing limit for megavideo <a href='http://streamscene.me/page/megavideo-time-limit-bypass' target='_blank'>CLICK HERE</a> to bypass<br/><br/><a href='$link' rel='nofollow'>Movie Link</a></div>";
}
return $embed.$movielink;
break;
case "loombo.com" :
preg_match("#http://(?:www\.)?loombo\.com/([_\-a-z0-9]+)#i", $link, $matches);
if(!empty($matches))
{
$embed="<div align='center'><iframe style='overflow: hidden; border: 0; width: 655px; height: 360px' src='http://loombo.com/embed-".$matches[1]."-640x318.html' scrolling='no'></iframe></div>";
}
return $embed.$movielink;
break;
case "veehd.com" :
preg_match("#http://(?:www\.)?veehd\.com/video/([0-9]{7})#i", $link, $matches);
if(!empty($matches))
{
$embed="<div align='center'><iframe src='http://veehd.com/embed?v=".$matches[1]."&w=720&h=405&t=2&s=1&p=divx' style='overflow:hidden ;border:0; width:720px; height:405px' scrolling='no' frameBorder='0'></iframe></div>";
}
return $embed.$movielink;
break;
case "vidxden.com" :
preg_match("#http://(?:www\.)?vidxden\.com/([a-z0-9]+)/#i", $link, $matches);
if(!empty($matches))
{
$embed="<div align='center'><iframe src='http://www.vidxden.com/embed-".$matches[1]."-width-653-height-362.html' style='overflow:hidden ;border:0; width:653px; height:362px' scrolling='no' frameBorder='0'></iframe></div>";
}
return $embed.$movielink;
break;
case "isharehd.com" :
preg_match("#http://(?:www\.)?isharehd\.com/([a-z0-9]+)#i", $link, $matches);
if(!empty($matches))
{
$embed="<div align='center'><iframe src='http://isharehd.com/embed-".$matches[1].".html' frameborder='0' marginwidth='0' marginheight='0' scrolling='NO' width='727' height='320'></iframe></div>";
}
return $embed.$movielink;
break;
case "videobb.com" :
preg_match("#http://(?:www\.)?videobb\.com/video/([a-z0-9]+)#i", $link, $matches);
if(!empty($matches))
{
$embed="<object id='vbbplayer' width='750' height='555' classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000'><param name='movie' value='http://videobb.com/e/".$matches[1]."'></param><param name='allowFullScreen' value='true'></param><param name='allowscriptaccess' value='always'></param><embed src='http://videobb.com/e/".$matches[1]."' type='application/x-shockwave-flash' allowscriptaccess='always' allowfullscreen='true' width='750' height='555'></embed></object>";
}
return $embed."<div align='center'>There is a 72 minute viewing limit for VideoBB <a href='http://streamscene.me/page/videobb-time-limit-bypass' target='_blank'>CLICK HERE</a> to bypass<br/><a href='$link' rel='nofollow'>Movie Link</a></div>";
break;
default :
return $embed.$movielink;
break;
}
}
function get_sname($url)
{
preg_match('@^(?:http://)?([^/]+)@i', "".$url."", $matches);
$host = $matches[1];
$host = str_replace('www.', '', $host);
preg_match('/[^.]+\.[^.]+$/', $host, $matches);
$submitteds = $matches[0];
return $submitteds;
}