<?php
function youtubeUrlToHTML($url$width 425$height 344) {
    if(!
eregi("^http://([^\.]{0,2}\.)?youtube.com/watch\?.*v=([^&]+)&?.*$",$url,$regs)) return false;
    
$key $regs[2];
    
    return 
'<object width="'.$width.'" height="'.$height.'"><param name="movie" value="http://www.youtube.com/v/'.$key.'&hl=es&fs=1"></param><param name="allowFullScreen" value="true"></param><embed src="http://www.youtube.com/v/'.$key.'&hl=es&fs=1" type="application/x-shockwave-flash" allowfullscreen="true" width="'.$width.'" height="'.$height.'"></embed></object>';
}
echo 
youtubeUrlToHTML($_POST['url']);
?>

<form action="" method="post">
<p>Introduce una URL de un video de Youtube:</p>
<input type="text" name="url">
<input type="submit" value="Enviar!">
</form>