php request youtube video is not working [closed]
- by m3tsys
what is wrong to this code?
header('Content-type: application/x-shockwave-flash');
$video_id = $_REQUEST['id'];
$content = readfile("http://www.youtube.com/watch?v=$video_id");
echo $content;
or
header('Content-type: application/x-shockwave-flash');
$video_id = $_REQUEST['id'];
$content = readfile("http://localhost/embed/player.swf?file=http://www.youtube.com/watch?v=$video_id");
echo $content;
Why this code is not working? How should look the code?