View Full Version : resize a video's size and display it

03-01-2008, 10:56 PM
I am trying to resize a video's size to be smaller after users submit a video from a form.
and the problem i have are:
1) i use the preg_replace function to do that, but it doesn't change anything.
2) there is not video in the Test.php after i load the page.

Could anyone help, please.

the works i have done as following:

the following video is going to submit, and i want to resize the size to be smaller.
<object width="425" height="355"><param name="movie" value="http://www.youtube.com/v/VsS130ngqMU"></param><param name="wmode" value="transparent"></param><embed src="http://www.youtube.com/v/VsS130ngqMU" type="application/x-shockwave-flash" wmode="transparent" width="425" height="355"></embed></object>



$pattern="/width=\"([0-9]+)\" height=\"([0-9]+)\"/";
$replacement="width=\"100\" height=\"100\"";


$object= preg_replace($pattern, $replacement, $object);

echo $object;
echo $object;
<form action="Test.php" method="post">
<INPUT type="text" name="object" value="" maxlength="500">
<input type="submit" value="Submit">