PHP: Capture Location of FLV from YouTube
Copy this code and paste it in your HTML
<?php
$url = trim($_REQUEST['url']); if (strpos($url, 'http://www.youtube.com/watch?v=') === 0) {
$pos1 = strpos($info, "&video_id=", $pos1); $pos2 = strpos($info, "&t=", $pos2);
$video_id = substr($info, $pos1 + 10, 11); $tag_t = substr($info, $pos2 + 3, 32);
$response = '';
$response .= '' . $video_id . '';
$response .= '' . $tag_t . '';
$response .= '';
header("Content-type: text/xml"); echo $response;
} else
{
die("Wrong URL / Parameters"); }
?>
Report this snippet
Comments
Subscribe to comments