xbl1 Posted March 1, 2008 Share Posted March 1, 2008 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/watch?v=VsS130ngqMU"></param><param'>http://www.youtube.com/watch?v=VsS130ngqMU"></param><param name="wmode" value="transparent"></param><embed src="http://www.youtube.com/watch?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> Link to comment Share on other sites More sharing options...
Matpatnik Posted March 2, 2008 Share Posted March 2, 2008 This might help youhttp://www.php.net/manual/de/function.getimagesize.php#47785 Link to comment Share on other sites More sharing options...
xbl1 Posted March 2, 2008 Author Share Posted March 2, 2008 This might help youhttp://www.php.net/manual/de/function.getimagesize.php#47785 Thanks a lot Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.