//parse the id from the url
$url = $_POST['id'];
$vidparser = parse_url($url);
parse_str($vidparser[query], $query);
$vidid = ($query['v']);
//get the video id in to the embed code
$content = "<object width=\"290\" height=\"235\"><param name=\"movie\" value=\"http://www.youtube.com/v/".$vidid."&hl=en&fs=1&rel=0\"></param><param name=\"allowFullScreen\" value=\"true\"></param><embed src=\"http://www.youtube.com/v/".$vidid."&hl=en&fs=1&rel=0\" type=\"application/x-shockwave-flash\" allowfullscreen=\"true\" width=\"290\" height=\"235\"></embed></object>";