...

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



kamkam
03-01-2008, 10:56 PM
Hello;
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>


<html>
<body>


<?php
if($_POST['object']){
$object=addslashes($_POST['object']);
$object=htmlspecialchars($object);

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

$pattern=htmlspecialchars($pattern);
$replacement=htmlspecialchars($replacement);

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

echo $object;
$object=htmlspecialchars_decode($object);
echo $object;
}
else{
?>
<form action="Test.php" method="post">
<INPUT type="text" name="object" value="" maxlength="500">
<input type="submit" value="Submit">
</form>

<?php
}
?>

</body>
</html>



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum