Please check my new updated post – Facebook Style embed videos from url – http://w3lessons.info/2013/05/25/facebook-style-youtube-video-vimeo-video-soundcloud-audio-url-expander-with-jquery-php/

In our daily life web developers are facing problem like how to embed videos from url.

Here I am going to share How to fetch videos from major sites like youtube, vimeo, dailymotion, yahoom google , mega videos, metacafe and many more

I have used autoembed php class to get videos

Now a days major websites like facebook also doing the same thing. U can also implement this code in your project (codeigniter, php projects)

here is the code

<pre><?php
$url = trim($_REQUEST&#91;'url'&#93;);
$url = check_url($url);

function check_url($value)
{
	$value = trim($value);
	if (get_magic_quotes_gpc()) 
	{
		$value = stripslashes($value);
	}
	$value = strtr($value, array_flip(get_html_translation_table(HTML_ENTITIES)));
	$value = strip_tags($value);
	$value = htmlspecialchars($value);
	return $value;
}

include "AutoEmbed.class.php";

$AE = new AutoEmbed();

// load the embed source from a remote url
if (!$AE->parseUrl($url)) {
    // No embeddable video found (or supported)
	echo "Please check the video link";
} else {

$AE->setParam('wmode','transparent');
$AE->setParam('autoplay','false');
?>
<div>
<?php
echo $AE->getEmbedCode();
?>
</div>
<?php
}
?>
</pre>

View Demo Download

If you enjoyed this article, Get email updates (It’s Free)
http://w3lessons.info/wp-content/uploads/2012/01/video-embed-from-url1.pnghttp://w3lessons.info/wp-content/uploads/2012/01/video-embed-from-url1-150x150.pngKarthikeyan KfacebookFreebiesjqueryPHPwordpressembed videos,youtube embed
Please check my new updated post - Facebook Style embed videos from url - http://w3lessons.info/2013/05/25/facebook-style-youtube-video-vimeo-video-soundcloud-audio-url-expander-with-jquery-php/In our daily life web developers are facing problem like how to embed videos from url.Here I am going to share How to fetch videos from major sites like youtube, vimeo, dailymotion, yahoom google , mega...