Esempio n. 1
0
    $getflv->openHTML();
    $getflv->getVideo();
    if ($title_reg) {
        $getflv->getTitle();
    }
    if ($thumbnail_reg || $thumbnail_direct) {
        $getflv->getThumbnail();
    }
    if ($content_reg) {
        $getflv->getContent();
    }
    //	echo $getflv->fetch_url;
    //	echo $getflv->match[0];
    //	echo $getflv->html;
    $result = $getflv->getResult();
}
switch ($site) {
    /******************************************
    *** YouTube
    ******************************************/
    case "youtube":
        fetchFlv("http://youtube.com/watch?v=", "/video_id=\\S+&.+&t=.+&hl/i", $id, 0, true, "http://www.youtube.com/get_video?", "/<title>YouTube - (.*)<\\/title>/i", 1, true, "http://img.youtube.com/vi/", "/default.jpg", false, false, false, false);
        if (!$result[url]) {
            $result[url] = "false";
        }
        echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>";
        echo "\n<result>";
        echo "\n<url>" . htmlspecialchars($result[url]) . "</url>";
        echo "\n</result>";
        break;
}
Esempio n. 2
0
     echo "\n<result>";
     echo "\n<url>" . htmlspecialchars($result[url]) . "</url>";
     echo "\n<url_wmv>false</url_wmv>";
     echo "\n<title>" . htmlspecialchars($result[title]) . "</title>";
     echo "\n<thumbnail>" . htmlspecialchars($result[thumbnail]) . "</thumbnail>";
     echo "\n<content>false</content>";
     echo "\n</result>";
     break;
     /******************************************
     *** MetaCafe
     ******************************************/
 /******************************************
 *** MetaCafe
 ******************************************/
 case "metacafe":
     fetchFlv("http://www.metacafe.com/watch/", "/flashvars\", \"itemID=.*&mediaURL=(.*)&postRollContentURL=/i", $id, 1, false, false, "/title\" content=\"Metacafe - (.*)\" \\/>/i", 1, false, false, false, "/image_src\" href=\"(.*)\" \\/>/i", 1, false, false);
     if (!$result[url]) {
         $result[url] = "false";
     }
     if (!$result[title]) {
         $result[title] = "false";
     }
     if (!$result[thumbnail]) {
         $result[thumbnail] = "false";
     }
     echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>";
     echo "\n<result>";
     echo "\n<url>" . htmlspecialchars($result[url]) . "</url>";
     echo "\n<url_wmv>false</url_wmv>";
     echo "\n<title>" . htmlspecialchars($result[title]) . "</title>";
     echo "\n<thumbnail>" . htmlspecialchars($result[thumbnail]) . "</thumbnail>";