Jump to content

Urgent help needed for grabbing Megavideo code


gibigbig

Recommended Posts

The bulk code i have looks like this:

function setembedcode(cwidth,cheight)
{
  
  document.getElementById('embedcode').value = '<object width="' + cwidth + '" height="' + cheight + '"><param name="movie" value="http://www.megavideo.com/v/ZDWFCCMEf5a91463ba9f5539ffffde18eaa9acbf"></param><param name="allowFullScreen" value="true"></param><embed src="http://www.megavideo.com/v/ZDWFCCMEf5a91463ba9f5539ffffde18eaa9acbf" type="application/x-shockwave-flash" allowfullscreen="true" width="' + cwidth + '" height="' + cheight + '"></embed></object>';
  
}

 

and I need a regular expression to match ONLY the

http://www.megavideo.com/v/ZDWFCCMEf5a91463ba9f5539ffffde18eaa9acbf

 

Can anyone help me?

 

My current code is :

$embed = file_get_contents($stream_link);
preg_match_all( '/http\:\/\/www\.megavideo\.com\/v\/(.*)\"\>/i', $embed, $matches, PREG_SET_ORDER);  
foreach($matches as $txt){
	echo $txt[0].'<br />';
}  

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.