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 />';
}  

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.