View Single Post
ישן 04-11-08, 12:23   # 4
dabi
חבר וותיק
 
מיני פרופיל
תאריך הצטרפות: Dec 2007
הודעות: 1,767

dabi לא מחובר  

אחי עשיתי ככה

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
  Reply With Quote