Youtube / Vimeo embed resizer

On July 24, 2011, in Concentrate, Imagine, Launch, Observe, PHP, Tricks, Web Application, by Sandeep Verma

Hits: 226  Resizes a Youtube / Vimeo embed code from a Template variable with the variables given in the snippet call… 1- Create a new Snippet and call it  videoresizer 2- Copy – paste the content of videoresizer.snippet.txt on your new snippet 3- Enjoy! Example: [[videoresizer? &id='[*id*]‘ &width=’300′ &height=’350′ &my_tv=’video’]] videoresizer.snippet.txt <?php //////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // Snippet [...]

Resize YouTube Video

On December 8, 2009, in LAMP, by Sandeep Verma

Hits: 109  Here is the code how to resize youtube video embed code, even this code will work to non-youtube embed videos….. <?php $embed = ‘<object width=”425″ height=”344″><param name=”movie” value=”http://www.youtube.com/v/jWDmG3JnNLE&hl=en_US&fs=1&”></param><param name=”allowFullScreen” value=”true”></param><param name=”allowscriptaccess” value=”always”></param><embed src=”http://www.youtube.com/v/jWDmG3JnNLE&hl=en_US&fs=1&” type=”application/x-shockwave-flash” allowscriptaccess=”always” allowfullscreen=”true” width=”425″ height=”344″></embed></object>’; //$alt = preg_match_all(‘/(width|height)=(“[^"]*”)/i’, $embed, $matches); $embed = preg_replace(‘/(width)=(“[^"]*”)/i’, ‘width=”200″‘, $embed); $embed = preg_replace(‘/(height)=(“[^"]*”)/i’, ‘height=”200″‘, $embed); echo [...]

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!

Visit our friends!

A few highly recommended friends...