Go
Not registered? Sign up!

Youtube blocked http://youtube.com/get_video

Google Translate
70 posts | return to the General Chat forum | get the rss feed for this thread

Apr. 04, 2009joey

I get the youtube link for hd movies white a php script and gives me this url:
http://youtube.com/get_video?video_id=t7w5Jj4Xmt8&t=vjVQa1PpcFPy4lrvGrDifDcP24sT1vHKZ27RT6ip8Aw=&fmt=22

but i dont works anymore youtube hase blocked the get_video page so you wil now get a 403 page forbidden warn.

Apr. 04, 2009flip

any ideas on this?

Apr. 04, 2009lefTy

I think you will need to update the IP address in the redirect link, but I'm not sure if that will fix it. I'm working on it this weekend.

Apr. 04, 2009jason

the token its giving you is invalid

dunno what they did, pretty clever , they must be limitng the token to the ip that got the token is my guess

because if you go to a youtube video and view source then find the &t= token and manually make the url as done before it works fine.. because the token was given to that ip , wheras when you use php its your servers ip getting the token and a diff ip trying to get the video

Apr. 04, 2009joey

so there is no way to make a script that get the token id now

Apr. 04, 2009jason

you can get the token just fine, the problem is the token is only valid for the ip that gets the token not for everyone else.

i just tested this theory by saving the movie on the server instead of forwarding the header and it works just fine, so the token is perfecly valid , its just only useable for the ip that grabbed it.

Apr. 04, 2009joey

I have solved the problem.

by using the get_headers() function,
it gives a arry in the arry is the real linkto the video.

Print that url and you can download it or play it in the jw_player.

You can test this link:
http://funbun.nl/aaa/yt_test.php?id=zpIu27tfjuM

here my php code:
<?php

if(empty($_GET['id']))
{
echo "No id found!";
}
else
{

function url_exists($url)
{
if(file_get_contents($url, FALSE, NULL, 0, 0) === false) return false;
return true;
}

$id = $_GET['id'];
$page = @file_get_contents('http://www.youtube.com/get_video_info?&video_id='.$id);
preg_match('/token=(.*?)&thumbnail_url=/', $page, $token);
$token = urldecode($token[1]);

$get = $title->video_details;
$url_array = array ("http://youtube.com/get_video?video_id=".$id."&t=".$token,
"http://youtube.com/get_video?video_id=".$id."&t=".$token."&fmt=18");

if(url_exists($url_array[1]) === true)
{
$file = get_headers($url_array[1]);
}
elseif(url_exists($url_array[0]) === true)
{
$file = get_headers($url_array[0]);
}

$url = trim($file[19],"Location: ");

echo '<a href="'.$url.'">Download video</a>';
}
?>

Apr. 06, 2009steve

thank you joey,

is possible to use your code to get flv format instead of mp4? i already tried to change fmt=18 to fmt=6 but without luck, any idea how this can be done.
also how can use mp4 with JW player.

thanks again for your help.

Apr. 06, 2009Asim Nawaz

Cant Use The Script Following error occurs what's the problem??

Download video Error in my_thread_global_end(): 2 threads didn't exit

and in download video link it shows <a href="Connection: close">

what can i do now??

Apr. 06, 2009d4weed

Hi all,

To Asim, same thing happened here, it turns out in the response I'm getting, the url is in position 18 not 19 so

$url = trim($file[19],"Location: ");

should be

$url = trim($file[18],"Location: ");

in my case

anyhow, this url gives you an mp4 which I don't see how to use from flash (what I need is a flv)

also, this solution doesn't seem very secure to me (a slight change in the response and it will fail) for example, http://funbun.nl/aaa/yt_test.php gives the location on position 19, so it could be a server thing.

could it be solved somehow with api & client keys? any ideas?

Apr. 06, 2009d4weed

update:

see

http://www.longtailvideo.com/support/forum/Setup-Problems/13704/YouTube-streaming-stopped-working-

but something tells me this is gonna stop working as soon as google finds out about it

Apr. 06, 2009Asim Nawaz

its Working Fine Now Thank You Every One.

Apr. 06, 2009joey

No &fmt = FLV (verry low)
&fmt=5 = FLV (verry low)
&fmt=6 = FLV (works not always)
&fmt=13 = 3GP (mobile phone)
&fmt=18 = MP4 (normal)
&fmt=22 = MP4 (hd)

This is just a simple script i made so there can be some errors in it.

Because the location position in the array some times change, you can make a function that search in the array and returns the location key from the array.

Till so far it works fine for me wink

Apr. 06, 2009steve

Thanks to whoever fixed this

http://corbilla.com/proxyyt2.php?id=B0OGpRq0Lic.flv

Now it is working fine ...

Apr. 06, 2009bpelhos

Yes, corbilla.com works for me, but only with the 4.3 player version. With 4.4 it does not start playing.

Apr. 07, 2009Lucki

You can use also:

http://radiolight.6te.net/ytfix.php?v=(youridhere)&fmt=(fmthere)

Apr. 07, 2009steve

@Lucki

I have tried to use the link below with jw player

http://radiolight.6te.net/ytfix.php?v=B0OGpRq0Lic&fmt=5

but it does not work as it is, even though the link itself works fine to get the flv file but because there is no extension of flv, jw does not recognize it.

thank you.

Apr. 07, 2009joey

Ad the flashvar type=video else te jw player dont know the file type and will not play!

Apr. 08, 2009LATNeo

hello.i wanted to know how we can do with dailymotion.
thank you for your Results.

Apr. 11, 2009joey

Here is my dailymotion php script i have made.

You can test this link:
http://funbun.nl/aaa/daily/daily.php?url=http://www.dailymotion.com/related/x8nfem/video/x20o8d_kanelita-wedding_sport

Here my php code:
<?php
if(empty($_GET['url']))
{
echo "No url found!";
}
else
{

function array_ereg_search($val, $array)
{
$i = 0;
$return = array();

foreach($array as $v)
{
if(eregi($val, $v)) $return[] = $i;
$i++;
}

return $return;
}

function get_link($vidlink)
{
$headers = get_headers("http://www.dailymotion.com".$vidlink);
$array_search = array_ereg_search("location: http://", $headers);
$trim_headers = trim($headers[$array_search[0]],"Location: ");
$url = '<a href="'.$trim_headers.'">'.$trim_headers.'</a><br />';
return $url;
}

$get = $_GET['url'];
$get_contents = @file_get_contents($get);
$stripslashes = stripslashes($get_contents);
preg_match('/"video", "(.*?)"/', $stripslashes, $video);
$urldecode = urldecode($video[1]);
$preg_split = preg_split('/@@(.*?)\|\|/', $urldecode);
$preg_replace = preg_replace('/@@(.*?)$/', '', $preg_split);
foreach ($preg_replace as $vidurl)
{
echo get_link($vidurl);
}
}
?>

Apr. 12, 2009Lucki

good work joey.
It works to me

Apr. 16, 2009Jewel

Hi:

I think folowing will help. its grabbing the flv

if(empty($_GET['id']))
{
echo "No id found!";
}
else
{

function url_exists($url)
{
if(file_get_contents($url, FALSE, NULL, 0, 0) === false) return false;
return true;
}

$id = $_GET['id'];
$page = @file_get_contents('http://www.youtube.com/get_video_info?&video_id='.$id);
preg_match('/token=(.*?)&thumbnail_url=/', $page, $token);
$token = urldecode($token[1]);

$get = $title->video_details;
$url_array = array ("http://youtube.com/get_video?video_id=".$id."&t=".$token,
"http://youtube.com/get_video?video_id=".$id."&t=".$token."&fmt=5");

if(url_exists($url_array[1]) === true)
{
$file = get_headers($url_array[1]);
}
elseif(url_exists($url_array[0]) === true)
{
$file = get_headers($url_array[0]);
}


$arr=implode('',$file);


$arr2=preg_match_all('/Location: .{2,600}/',$arr,$match);

$arr3=preg_match_all('/Location: .{2,600}Transfer-Encoding:/',$match[0][1],$m2);



$url = trim($m2[0][0],"Transfer-Encoding:");
$url = trim($url,"Location: ");
//$url = trim($file[19],"Location: ");

echo '<a href="'.$url.'">Download video</a>';
}

Apr. 16, 2009joey

To get only flv with my script set fmt=18 to fmt=34,
because fmt 34 is the same as fmt 18 only then in flv
thats all wink

I have a array with tow links one widout a fmt, because
the link widout fmt is in flv and is always available.

P.S. fmt=5 and 6 works not always

<?php

if(empty($_GET['id']))
{
echo "No id found!";
}
else
{

function url_exists($url)
{
if(file_get_contents($url, FALSE, NULL, 0, 0) === false) return false;
return true;
}

$id = $_GET['id'];
$page = @file_get_contents('http://www.youtube.com/get_video_info?&video_id='.$id);
preg_match('/token=(.*?)&thumbnail_url=/', $page, $token);
$token = urldecode($token[1]);

$get = $title->video_details;
$url_array = array ("http://youtube.com/get_video?video_id=".$id."&t=".$token,
"http://youtube.com/get_video?video_id=".$id."&t=".$token."&fmt=34");

if(url_exists($url_array[1]) === true)
{
$file = get_headers($url_array[1]);
}
elseif(url_exists($url_array[0]) === true)
{
$file = get_headers($url_array[0]);
}

$url = trim($file[19],"Location: ");

echo '<a href="'.$url.'">Download video</a>';
}
?>

Apr. 19, 2009Muhammad Ibrar

hi joey

i am not able to get the video as it only returns me 14 array elements. kindly can you check it at <a href="http://www.paktubevideos.com/download-youtube-videos.html">Download Youtube Videos</a>. it simply gives me the url of my page no youtube get video url :( please help

Apr. 19, 2009Muhammad Ibrar

oh joey

You are great developer wink wink wink ........... in my case URL was on array element 16....

What will happen if youtube blocked fsockopen for curl functions???

Apr. 20, 2009wil

@joey

Your script from dailymotion play hd videos too??

Apr. 21, 2009jim

Hi@all
is somebody able to download this video?

http://www.youtube.com/watch?v=2yuMJ3v-h4E


I got only a 403 forbidden

Apr. 21, 2009igor

http://www.dulski.pri.ee/deadparker/index.php

<?php
if (isset($_GET['url']))
{
$url = $_GET['url'];
$v = $url;
$v = preg_split ("/\?v=/", $v);
$v = $v[1];
$watch2 = gethostbyname("www.youtube.com");
$url = "http://" . $watch2 . "/watch?v=" . $v;
$session = curl_init();
curl_setopt ($session, CURLOPT_URL, $url);
curl_setopt($session, CURLOPT_HEADER, true);
curl_setopt($session, CURLOPT_FOLLOWLOCATION, true);
curl_setopt($ch, CURLOPT_TIMEOUT, 25);
curl_setopt($session, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($session);
if (preg_match_all("/&t=[^&]*/", $response, $matches))
{
$t = $matches[0][0];
$t = preg_split("/=/", $t);
$t = $t[1];
$youtubeVideoPath = "http://" . $watch2 . "/get_video.php?video_id=" . $v . "&t=". $t . "&fmt=18";
echo "$youtubeVideoPath";
else
{
echo "null";
}
curl_close($session);
}
else
{
echo 'stop';
}
?>

Apr. 22, 2009joey

@jim

Youtube suports now long videos unfortunately this videos can not be downloaded.

Youtube streams the long video to the player whit rtmp.

@all

The array element id is not always the same, so you can better use my array search.

function array_ereg_search($val, $array)
{
$i = 0;
$return = array();

foreach($array as $v)
{
if(eregi($val, $v)) $return[] = $i;
$i++;
}


$headers = get_headers("http://youtube.com/get_video?video_id=".$id."&t=".$token);
$array_search = array_ereg_search("location: http://v", $headers);
$array_search[0] this gives the array element id.

Apr. 25, 2009igor 100% Sorry!

100%
http://www.dulski.pri.ee/deadparker/index.php?id=musika







<?php
if (isset($_GET['url']))
{
$url = $_GET['url'];
$v = $url;
$v = preg_split ("/\?v=/", $v);
$v = $v[1];
$watch2 = gethostbyname("www.youtube.com");
$url = "http://" . $watch2 . "/watch?v=" . $v;
$session = curl_init();
curl_setopt ($session, CURLOPT_URL, $url);
curl_setopt($session, CURLOPT_HEADER, true);
curl_setopt($session, CURLOPT_FOLLOWLOCATION, true);
curl_setopt($ch, CURLOPT_TIMEOUT, 25);
curl_setopt($session, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($session);
if (preg_match_all("/&t=[^&]*/", $response, $matches))
{
$t = $matches[0][0];
$t = preg_split("/=/", $t);
$t = $t[1];
$youtubeVideoPath = "http://" . $watch2 . "/get_video.php?video_id=" . $v . "&t=". $t . "&fmt=18";
$headers = get_headers($youtubeVideoPath,1);
// header ("Location: $youtubeVideoPath");
if(!is_array($headers['Location'])) {
$url = $headers['Location'];
}else {
foreach($headers['Location'] as $h){
if(strpos($h,"googlevideo.com")!=false){
$url = $h;
break;
}
}
}
header("Location: $url");
// print "URI: $url<br/>---" ;



}
else
{
echo "null";
}
curl_close($session);
}
else
{
echo 'stop';
}


?>

Apr. 26, 2009Visitor

Hi, Visit http://cclworld.co.cc to download videos in MP4, FLV, 3GP and High Quality 3GP format. This site is using YouTube API 2.0 and download service is still working…

Apr. 28, 2009eniraka

Anyone knows how to do the same in java?? I can't find anything like the get_headers in java. I can get the header using an URLConnection but there is not field Location... so I can't find the real URL..

Apr. 28, 2009joey

@ Visitor,

Works not for me.

@ Eniraka,

Is this maybe what you need?
http://www.exampledepot.com/egs/java.net/GetHeaders.html

May. 01, 2009raghav

how to change video name after download ?

i want video.flv to mymane.flv this is posible ?

May. 01, 2009Neelix

How can i edit this line so it would be mp4 instaed of .flv download?

echo '<div align="center"><a href="http://www.youtube.com/get_video?video_id='.$var_id.'&l='.$matches[4].'&t='.$var_t.'">Download Here</a></div>';

May. 01, 2009BromptonWeb

I got this line in youtube.php file can i edit to get other format then .flv ?

$url = "http://www.youtube.com/get_video?video_id=".$var_id."&t=".$var_t;

Thank's for your help

May. 03, 2009joey

To get an other format then flv edit the fmt

No &fmt = FLV (verry low)
&fmt=5 = FLV (verry low)
&fmt=6 = FLV (works not always)
&fmt=13 = 3GP (mobile phone)
&fmt=18 = MP4 (normal)
&fmt=22 = MP4 (hd)

May. 04, 2009BromptonWeb

I add this where in the line of code?

&fmt=18

Thank's

May. 05, 2009joey

Replace the $url_array for the whan below to get &fmt=18 if you use my code

$url_array = array ("http://youtube.com/get_video?video_id=".$id."&t=".$token,
"http://youtube.com/get_video?video_id=".$id."&t=".$token."&fmt=18");

May. 06, 2009David James

I am using JW 4.4 and SWFobject 1.6

I would like to try using the proxy thru php page calls to be able to retrieve fmt=18 and fmt=22 versions of the YouTube videos.

I guess I need the latest version of your php file, and i am trying to figure out how to use that in conjunction with the player. I have been previously just handing the player the URIs from the Youtube EMBED maker bit on their site.

This is my current code for the object/embed on the page (with lots of extra flashvars removed for clarity):

<div name="mediaspace" id="mediaspace"></div>
<script type="text/javascript">
var so = new SWFObject('/jw/player.swf','mpl','640','385','9');
so.addParam('allowscriptaccess','always');
so.addParam("wmode","transparent");
so.addParam('allowfullscreen','true');
so.addParam('flashvars','&ltas.mediaid=1234&title=somename&description=somedesc&plugins=ltas&channel=11886&type=youtube&file=<WHATGOESHERE?>');
so.write('mediaspace');
</script>

So, do I put a reference to the php page in the <WHATGOESHERE?> and pass the reference to it?

Like:
&file=/joeypage.php?url=http://www.youtube.com/watch?v=LPmbGzQaOCs

OR do i need to just manually go to the php page with a browser and pass it the Youtube URL and then do a View Source on the <a href=""> tag on the php page, and then load THAT url into my <WHATGOESHERE?> location?

May. 06, 2009maks

@joey:

I get now this error: "x-content-type-options: nosniff" as downloadlink...

Any idea?

Is it's also possible for include the normal link in a flashplayer?

thanks

May. 06, 2009Muhammad Ibrar

hello joey

Again your this script also blocked by youtube. Check my website for downloading URL above posted`

May. 07, 2009AlNadabi

Hi there,

Any updated working code ?

I think we have to think in legal way , because what every solution we found today, tomorrow will be useless.


Regards,
AlNadabi

May. 08, 2009drmike

Ainadabi, the above works fine for us.

Last fix went about 8 months. I wonder how long this one will last.

Thanks everybody for the help.

May. 10, 2009brasofilo

Joey!!!!
you are the man!

May. 19, 2009Stressed Out

I just noticed my video gallery quit working. Youtube must have made the changes in the past couple of months. Here's my php "get video" code, can anyone tell me what needs changed?

<?php

include('HTTPRequest.php');


$videoID = $_GET['videoID'];
$videoType = $_GET['videoType'];


function getYouTubeFLVPath($videoID){

//$url= 'http://www.youtube.com/watch?v='.$videoID;
//$data = implode("", file($url));
$url = 'http://www.youtube.com/watch?v='.$videoID;
$r = new HTTPRequest($url);
$data = $r->DownloadToString();


if ( preg_match_all("/&t=[^&]*/", $data, $matches) ){
$t = $matches[0][0];
$t = preg_split("/=/", $t);
$t = $t[1];


//$v = $url;
$parts = preg_split ("/\?v=/", $url);

$v = $parts[1];

//$v = $videoID; // $v[1];

return "http://www.youtube.com/get_video.php?video_id={$v}&t={$t}&.flv";
}


}


function getGoogleVideoFLVPath($videoID){

/**
normally, you would view the video in a browser at a url like : http://video.google.com/videohosted?docid=XXXXXXXX,
but that is actually a frameset, and you need to grab the source of the 'videohosted' frame and parse that.
*/

$r = new HTTPRequest('http://video.google.com/videohosted?docid='.$videoID);
$source = $r->DownloadToString();
$startPos = strpos($source, 'videoUrl\u003d');
//echo "start = $startPos <br> \n";

$nextAmpersand = strpos($source, '&', $startPos);
//echo "nextAmpersand = $nextAmpersand<br> \n";

$length = $nextAmpersand - $startPos;

$encodedURL = substr($source, $startPos+ 14, $length-14); //add 14 to account for 'videoUrl\u003d'

//echo "encodedURL = $encodedURL<br> \n";

$decodedURL = urldecode($encodedURL);
//echo "decodedURL = $decodedURL<br> \n";
return $decodedURL.'&.flv';
}





switch ($videoType){

case 'google':
echo '&path='.urlencode ( getGoogleVideoFLVPath($videoID) );
break;

case 'youtube':
echo '&path='. urlencode ( getYouTubeFLVPath($videoID) );
break;



}


?>

Jun. 06, 2009Visitor

CCL World has finally been moved to to http://cclworld.uni.cc

Jun. 10, 2009getvideo

try this one to download youtube video.
http://getvideo.comxa.com

Jun. 14, 2009drmike

Looks like it went about a month as it;s already not working. :(

Jun. 14, 2009drmike

Got it to work again. Per the example above by Joey, the preg_match line, the /token needs to be changed to a /&token. There's now a ftoken in there and the script is picking up on that.

Still can't get the hd to work but at least the rest is working fine.

Thanks.

Jun. 22, 2009Lex

Hi!. Every one.I need a help from.I am not Best php coder.
I need to attached you tube videos without logo.
here's the code I have use for build the player

Player.html
<div id="container"><a href="http://www.macromedia.com/go/getflashplayer">Get the Flash Player</a> to see this player.</div>

<script type="text/javascript" src="swfobject.js"></script>
<script type="text/javascript">
var so = new SWFObject('player.swf','single','420','265','0');
so.addVariable('fullscreen','true');
so.addParam("allowfullscreen","true");
so.addParam("wmode","opaque");
so.addVariable('width','420');
so.addVariable('height','265');
so.addVariable('displayclick','play');
so.addVariable('plugins', 'd-sharing');

so.addVariable('dsharing.sharetoolbar', false);
so.addVariable('dsharing.thumb', 'thumbs/video1.jpg');
so.addVariable('dsharing.dskin', 'DSharingSample.swf'); //link to the XML containing related clips
so.addVariable('dsharing.mailaction', 'http://www.delfi.ee'); // Address to submit the ShareForm data (eg. http://www.yoursite.com/sendmail.php). Variables posted are: email, name, friend
so.addVariable('dsharing.embedvalue','Test');

so.addVariable('dsharing.label_link','Add to homepage');
so.addVariable('dsharing.label_name','Your name');
so.addVariable('dsharing.label_email',"Your e-mail");
so.addVariable('dsharing.label_friend',"Friend's e-mail");
so.addVariable('dsharing.label_replay','Replay video');
so.addVariable('dsharing.label_send','Send');
so.addVariable('dsharing.label_delete','Delete');

so.addVariable("file", "mrss.xml&backcolor=003300&frontcolor=FFFFFF&screencolor=000000&skin=snel.swf");

so.addVariable("controlbar","bottom");
so.addVariable('image','preview.jpg')
so.write('container');
</script>
<!--<script type="text/javascript">

</script>
-->



This is the mrss.xml

<?xml version="1.0" encoding="UTF-8"?>
<playlist version="1" xmlns="http://xspf.org/ns/0/">
<trackList>
<track>
<location>rl.php?v=KruCukcswFw</location>
<title>alien test</title>
</track>
</trackList>
</playlist>

Jun. 22, 2009Lex

http://www.longtailvideo.com/support/forum/Setup-Problems/10481/remove-youtube-logo-from-the-flash-player

post by kLink Nov. 22, 2008
According to this Link I use This php script
rl.php
<?php

// call with: http://www.ldncapitaltv.com/rl.php?v=FELu606lidw
// URL: http://www.youtube.com/get_video.php?video_id=yqaUHyEhGoM&t=OEgsToPDskIMjxG0ah9ahTFR33K45muB

$videoid = (isset($_GET['v'])) ? strval($_GET['v']) : 'K2_U1kbIcJQ';

$initial_uri = 'http://www.youtube.com/api2_rest?method=youtube.videos.get_video_token&video_id=' . $videoid;

$t = trim(strip_tags(@file_get_contents($initial_uri)));

$final_uri = "http://www.youtube.com/get_video.php?video_id=" . $videoid . "&t=" . $t . "&fmt=18";

// print 'Final URI:' . $final_uri; exit;

header("Location: $final_uri");
exit;

?>

But it doesn't work for me.

I want to 10 -15

Videos to this xml


I want play thos videos through xml


can any one gave me the xml & php codes for this

Jun. 22, 2009Lex

@ joy or any one view the code?

Jun. 22, 2009Lex

Can any one view the Php & xml codes for Playing videos Display without logo.
Please! give some examples...
@joy can your code use for make play list(I mean you tube Play list using .xml file)

Can you view the code here....

Thanks! in Advance

Jun. 23, 2009Visitor

This unique script [CCL World YouTube] is not for sale. You can get YouTube search and download for free from here : http://m1net.online.fr/ . Check out CCL World YouTube : http://cclworld.uni.cc for new Embed system. Now it has guaranteed uptime of 99.9%.

Jun. 23, 2009Visitor

Hi Lex,

You can do it. But for it you have to grab video directly from YouTube server and have to pass that in your personal flash player. You can view the example of it from CCL World YouTube : http://cclworld.uni.cc . They are showing videos without any YouTube Logo. They can place a watermark of them like YouTube but they do not like interruption when running a video.

Please don't ask for the script.

Thanks!

Jun. 23, 2009SUHAIL

Can anyone plz tell where to put this php code as a file in our website's control panel. I m totally new to php scripting. plz mail me at suhail141@ymail.com i really need this script.

Jun. 27, 2009JAson

Anyone needing a highly customized HD playlist solution, i can make one to suit your needs for $20.

Here is some code for those who know php
It will simply check the fmt 22 , then check the headers to see if it gets a ok 200 responce so it knows its a valid video, else it will use the normal fmt 18 video.

Very simple and suprisingly faster that i thought it was going to be,

CODE

<?php

/*|=================================================
|*| YOUTUBE GRABBER UTIL by Centreonet Solutions
|*| Support :: greenscripts@gmail.com
|*| Donate from paypal to same address.
|*|=================================================
|*/


function googleCache($key,$token,$fmt){
$ytURL = "http://www.youtube.com/get_video.php?video_id=" . $key . "&t=" . $token. "&fmt=" . $fmt;
$headers = get_headers($ytURL,1);
$status = explode(" ",$headers['1']);
if($status[1] == "200"){
if(!is_array($headers['Location'])) {
$videoURL = $headers['Location'];
}else{
foreach($headers['Location'] as $header){
if(strpos($header,"googlevideo.com") != false){
$videoURL = $header;
break;
}
}
}
return $videoURL;
}else{
return "";
}
}

function youtubeData($url){
$key = explode("v=",$url);
$key = $key[1];
$content = file_get_contents("http://youtube.com/get_video_info?video_id=".$key);
parse_str($content);
if($token != ""){
$videoHD = googleCache($key,$token,22);
if($videoHD != ""){
$videoFile = $videoHD;
}else{
$videoFile = googleCache($key,$token,18);
}
}
return $videoFile;
}


$par = parse_url($_GET['url']);
$var = explode(".",$par['host']);
$domain = $var[1];

if($domain == 'youtube'){
$hotlink = youtubeData($_GET['url']);
echo $hotlink;
}
exit();
?>



Simple to use, take the full youtube url , ex. http://www.youtube.com/watch?v=9W1dhqc-JBs

And it will check for hd first, if found, that is what it will use.

I have tons of good youtube tools for those who need my service, i work real cheap, contact me at dacookiemonn2be@yahoo.com

Here is an example of a normal link generating a hd video for my custom player.

http://cs410.opticblur.net/player.php?id=&w=&url=http://www.youtube.com/watch?v=9W1dhqc-JBs

Not sure if this helps you in jw player, i dont know how they take the yt stuff and pass to api, but if it dont mind the google url it might nypass the api and hotlink for you


Oh ya, this will generate a fresh token each time page is loaded, so those with problem with token should not have with this,

Jun. 30, 2009maria gabriela

hulax q tal tengo 15 años de edad y bueno m encanta la seccion de alex xq habla mucho de chicos y quisiera que m ayudaras xq la ex d mi novio anda tras de el y nc q hacer AYUDENME PLEASE

Jul. 03, 2009syafiq

anyone knows how to download yahoo video and i film. i has tried many time to get video from yahoo and ifilm .

Jul. 03, 2009someone

who's knows how to make downloads from ku6 and 56.

Jul. 26, 2009John

Hi, Joey please help me. Your script for download daily motion video doesn't work, can you help me? thank's

Jul. 30, 2009MisterV

HELLO ALL! NOTICE


FOR EVERYONE THAT POST SCRIPT : THINK TO POST A CLEAN SCRIPT AT THE END SO MEMBER COULD USE IT DIRECTLY WITHOUT TESTING EACH OVER.

CHEERS!

Aug. 06, 2009nadia

compas de gato nada hade ras quento voiu pras eu voiu eu cmoo pras de foiou umas de foiu name.

oie badia umas de foiu casa 91744803

Aug. 08, 2009chris

i need help.
Youtube blocked my video grabber on my clipshare site.
i will pay 30$ to fix this problem.
chrizstylezz@gmail.com

Aug. 20, 2009Nickname

OK I note that when you click HD on a video-the address stays the same;

as for .flv>.mpg4

what a waste its like-going back to 56k dialup

I dunno-maybe there are players that can only play .flv

but i am having problems
http://www.youtube.com/watch?v=om-QPaETiic
as example
if I go to view and click viewsource, I get the html page
but theyve gone to great lengths to disguise the <img src url..........> that really works; so now what?

Sep. 09, 2009tigertum7

praveen

Hi i am not able to get and see the you tube videos
it saying upgreade the Flash player but doing so it not working what to do for this

Sep. 11, 2009Mikhail

Same here.

All of a sudden Youtube in FLV Player just stopped working.

Oct. 18, 2009Javier

Hi,

Why dont try using firebug for firefox. There you can see all get calls. Then just open the one with higher weight in another tab . finally firefox will ask you whether to save the flv, mp4 file or not.

Oct. 30, 2009Marc

This is all very interesting... Has anyone found a workaround for PRIVATE videos yet?

Add a reaction

You can also return to the category or try this search for related threads.


 

Search the Forums

Go

Support

Support Here are some helpful links to learn more about the JW Player™:

Monetize Your Video

Monetize Your Video Earn money with ads from LongTail's AdSolution. Watch our demos and sign up now!

Why Buy a License?

Why Buy a License? If you don’t buy a commercial license, you cannot use a JW Player™ on (i) a site that has ads; (ii) a corporate site; or a (iii) CMS. Our licenses are very inexpensive, so what are you waiting for? Buy a license today.