אחי עשיתי ככה
PHP קוד:
<?php
// URL of video
$url = 'http://www.youtube.com/watch?v=DbEuG1sw30Y333';
// Get page
$page = file_get_contents($url);
// Check if can embed
$embed_disallowed = preg_match('/Embedding disabled by request/', $page);
if ($embed_disallowed)
{
echo "<h1>Cannot embed this you tube video.</h1>";
die();
}
?>
וזה שגיאה
Warning: file_get_contents(
http://www.youtube.com/watch?v=DbEuG1sw30Y333) [function.file-get-contents]: failed to open stream: HTTP request failed! HTTP/1.1 400 Bad Request