How to take video embed codes and change all their widths/heights?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Can anytime give me some insights on how to write a PHP script that could accept any of the below strings below and edit the strings to change their width and height settings dynamically?

For instance, if I want all embedded videos to have a width of 320, and a height of 240, using PHP's string manipulation commands, what's the best way to "hone in" on width="425" and change it to width="320"? (In all cases in each string)



stringtoedit='<object width="425" height="355"><param name="movie" value="http://www.youtube.com/v/B1O2jcfOylU&rel=1";></param><param name="wmode" value="transparent"></param><embed src="http://www.youtube.com/v/B1O2jcfOylU&rel=1 " type="application/x-shockwave-flash" wmode="transparent" width="425" height="355"></embed></object>';

stringtoedit='<object width="464" height="388" classid="clsid:d27cdb6e- ae6d-11cf-96b8-444553540000"><param name="movie" value="http://www2.funnyordie.com/public/flash/fodplayer.swf " /><param name="flashvars" value="key=5468" /><param name="allowfullscreen" value="true" /><embed width="464" height="388" flashvars="key=5468" allowfullscreen="true" quality="high" src="http://www2.funnyordie.com/public/flash/fodplayer.swf " type="application/x-shockwave-flash"></embed></object><noscript><a href="http://www.funnyordie.com/videos/5468";>Cars</a> on <a href="http://www.funnyordie.com ">FunnyOrDie.com</a></noscript>';

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux