dn Posted December 9, 2008 Share Posted December 9, 2008 Hi, I'm a total newbie at php but I'm trying to find a script that does something similar to this: To use: link to PlayVideo.php?playfile=yourvideofilehere.wmv PlayVideo.php <object id='mediaPlayer' width="600" height="534" classid='CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95' codebase='http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701' standby='Loading Microsoft Windows Media Player components...' type='application/x-oleobject'> <param name='fileName' value="<?php echo $_GET['playfile']; ?>" /> <param name='animationatStart' value='true' /> <param name='transparentatStart' value='true' /> <param name='autoStart' value="true" /> <param name='showControls' value="true" /> <param name='loop' value="false" /> </object> instead of "yourvideofilehere.wmv", I'd like to insert an embed code of a video Something like this: PlayVideo.php?playfile=<embed src="http://www.veoh.com/veohplayer.swf?permalinkId=v16843594xRYratyY&id=anonymous&player=videodetailsembedded&videoAutoPlay=0" allowFullScreen="true" width="410" height="341" bgcolor="#FFFFFF" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer"></embed> So basically, I just need the script to take the code after "playfile=" and insert it in the body of the popup where the video would be embedded. Any help is appreciated. Thanks! Link to comment https://forums.phpfreaks.com/topic/136159-popup-link-to-embedded-video/ Share on other sites More sharing options...
redarrow Posted December 9, 2008 Share Posted December 9, 2008 JavaScript question. it client side not server side. Link to comment https://forums.phpfreaks.com/topic/136159-popup-link-to-embedded-video/#findComment-710189 Share on other sites More sharing options...
dn Posted December 9, 2008 Author Share Posted December 9, 2008 Thanks for the reply. Is it possible to do this in php? Link to comment https://forums.phpfreaks.com/topic/136159-popup-link-to-embedded-video/#findComment-710280 Share on other sites More sharing options...
blueman378 Posted December 9, 2008 Share Posted December 9, 2008 ah thats what his reply jsut said its client side not server side, php is serverside only (with ajax as an exception) but i dont think that will help you here. Link to comment https://forums.phpfreaks.com/topic/136159-popup-link-to-embedded-video/#findComment-710307 Share on other sites More sharing options...
redarrow Posted December 9, 2008 Share Posted December 9, 2008 working example http://simpleforum.ath.cx/pop.php Copy and past and name as told.... a little hack for ya. donation page please cheers call this pop.php <script language="javascript" type="text/javascript"> <!-- function popitup(url) { newwindow=window.open(url,'name','height=344,width=425'); if (window.focus) {newwindow.focus()} return false; } // --> </script> <?php $a=array( "michel jackson 1"=>"http://www.youtube.com/v/vd15YVb2M6M&hl=en&fs=1", "michel jackson 2"=>"http://www.youtube.com/v/0w0mAcwJ3NE&hl=en&fs=1", "pink 1"=>"http://www.youtube.com/v/X-tbJOFcQw8&hl=en&fs=1", "pink 2"=>"http://www.youtube.com/v/L7JCcHOnMyw&hl=en&fs=1" ); foreach($a as $key=>$val){ ?> <a href="pop2.php?mov=<?php echo $val;?>" onclick="return popitup('pop2.php?mov=<?php echo $val; ?>')"><?php echo $key; ?></a> <br><br> <?php }?> pop2.php <object width="425" height="344"><param name="movie" value="<?php echo $_GET['mov']; ?>"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="<?php echo $_GET['mov']; ?>" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"></embed></object> Link to comment https://forums.phpfreaks.com/topic/136159-popup-link-to-embedded-video/#findComment-710326 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.