Jump to content

Get redirected url


mynamesleo

Recommended Posts

Firstly, sorry to disappoint you. But you make it sound like you are the first person to find out how to download a video from youtube.

Secondly, i can do it by injecting a javascript code.

[code]javascript:var r=false;void(g());function g(){if(window.location.host!=%22www.youtube.com%22&&window.location.host!=%22www.youtube.com%22){alert(%22Go to YouTube and select a video first.%22);return false;}try{r=new XMLHttpRequest();} catch(a){try{r=new ActiveXObject(%22Msxml2.XMLHTTP%22);}catch(b){try{r=new ActiveXObject(%22Microsoft.XMLHTTP%22);}catch(f){r=false;}}}if(!r)alert(%22oops! try again later ..%22);w=window.location;r.open(%22GET%22,w,true);r.onreadystatechange=u;r.send(null);}function u(){if(r.readyState==4){if(r.status==200){var t=r.responseText;var l=t.indexOf('SWFObject(%22/player2.swf?')+23;var z=t.indexOf('%22',l);if(z==-1){alert(%22String not found.%22);return false;}var h=t.substring(l,z);window.location=%22http://www.youtube.com/get_video%22+h;}}}[/code]

i put this code into a bookmark and whenever i want to download a video i just click the bookmark. no privacy issues, fast and simple.

:tested in firefox 2.0

Shu.
Link to comment
Share on other sites

[quote author=Shu link=topic=119886.msg491825#msg491825 date=1167162374]
Firstly, sorry to disappoint you. But you make it sound like you are the first person to find out how to download a video from youtube.

Secondly, i can do it by injecting a javascript code.

[code]javascript:var r=false;void(g());function g(){if(window.location.host!=%22www.youtube.com%22&&window.location.host!=%22www.youtube.com%22){alert(%22Go to YouTube and select a video first.%22);return false;}try{r=new XMLHttpRequest();} catch(a){try{r=new ActiveXObject(%22Msxml2.XMLHTTP%22);}catch(b){try{r=new ActiveXObject(%22Microsoft.XMLHTTP%22);}catch(f){r=false;}}}if(!r)alert(%22oops! try again later ..%22);w=window.location;r.open(%22GET%22,w,true);r.onreadystatechange=u;r.send(null);}function u(){if(r.readyState==4){if(r.status==200){var t=r.responseText;var l=t.indexOf('SWFObject(%22/player2.swf?')+23;var z=t.indexOf('%22',l);if(z==-1){alert(%22String not found.%22);return false;}var h=t.substring(l,z);window.location=%22http://www.youtube.com/get_video%22+h;}}}[/code]

i put this code into a bookmark and whenever i want to download a video i just click the bookmark. no privacy issues, fast and simple.

:tested in firefox 2.0

Shu.
[/quote]

First of all, what part of me saying "alot of people have wrote youtube downloaders" gives you the impression i am making out im the first person to do this???

Anywho, I dont know JS but looking at that its just the same way everybodys doing it. First of all id change the check from www.youtube to just youtube. as some people like me have it bookmarked as http://youtube

Also the way im doing it is to be able to downloaded deleted videos

Link to comment
Share on other sites

you do know, typing 'http://youtube' in the address bar won't take u to youtube.

and then please don't be that naive. youtube as one of the top site, will of course make the .flv file of the deleted video unable to download as well.

Link to comment
Share on other sites

[quote author=Shu link=topic=119886.msg491863#msg491863 date=1167171333]
you do know, typing 'http://youtube' in the address bar won't take u to youtube.

and then please don't be that naive. youtube as one of the top site, will of course make the .flv file of the deleted video unable to download as well.

[/quote]

My god are you that simple? ok let me finish the EXAMPLE:
"Anywho, I dont know JS but looking at that its just the same way everybodys doing it. First of all id change the CHECK (the check to make sure they are at youtube!!) from WWW.YOUTUBE.COM to just YOUTUBE.COM as some people like me have it bookmarked as HTTP://YOUTUBE.COM"


Naive?????

Deleted video: http://www.youtube.com/watch?v=v1XgE_c9jyw
Download that deleted video: http://ash-v126.ash.youtube.com/get_video?video_id=v1XgE_c9jyw

mod edit: grossly inappropriate comment removed. Do not use language like that here.  The next time, will get you banned.
Link to comment
Share on other sites

to download a deleted video u would have to view it before, or u wont even have the video id.

and may i ask u how did u get this link: http://ash-v126.ash.youtube.com/get_video?video_id=v1XgE_c9jyw ?

ASSUMING this link can be retreived by hacking the database, u can just download the video instantly without even writting a script

ASSUMING u save the source code of the first link u provided (before the video is deleted). then what's the point?

so the questions that u asked did not make sense.

Provide a summary of what the script is going to do, then people will know, instead of saying rude words.
Link to comment
Share on other sites

Shu I only used rude words at you because simply you was acting a fool , and i'll bet everyone else can that also. You started with me trying to make me feel stupid by saying "your acting like you are the only one who can do this" , even though I wasnt, i clearly said "I NO LOTS OF PEOPLE HAVE DONE THIS"

Anyway, my question is about PHP not youtube videos, i told everyone why im doing it and it seems to just added more confusion which is why i didnt do that in the first place.

As for your questions, you told me deleted videos cant be download and i just showed you that they can... how can you have more questions? just leave it at that.

Anywho, if you cant answer the question "how to get the URL from a link that redirects in php" then please stop posting in this thread. Thanks
Link to comment
Share on other sites

[quote author=mynamesleo link=topic=119886.msg491450#msg491450 date=1167084276]
[quote author=Shu link=topic=119886.msg491448#msg491448 date=1167083778]
so u want to write a script that redirect user to another url?

or u want to access a website and read their headers?
[/quote]


All I want, is to be able to get the url that this link directs too:

http://youtube.com/v/I6DBeK7y-4Q

it directs to

http://youtube.com/p.swf?video_id=I6DBeK7y-4Q&eurl=&iurl=http%3A//sjc-static14.sjc.youtube.com/vi/I6DBeK7y-4Q/2.jpg&t=OEgsToPDskIDNtK1GcrDtb2oPUlepC__



Thats exactly what I need to be able to do. Obviosly the link will change etc, but it always redirects in the same mannor.



[/quote]

[quote]Ok the reason is for a php program I am writing, well updating... to download youtube videos.[/quote]

[quote]Anyway, my question is about PHP not youtube videos, i told everyone why im doing it and it seems to just added more confusion which is why i didnt do that in the first place.[/quote]

READ. you said u need to 'get the url that this link directs too' and now u say it has nothing to do with youtube.

are u a idiot? sorry but i have to say this, u can't even ask a question properly.

Lastly, u stated that i can't answer the question, well did u even ask the question properly?, i told u something about http headers. now what's the problem? u didn't ask further questions as well.

Shu.
Link to comment
Share on other sites

My god man how old are you???? The first question I asked was this:

[code]All I want, is to be able to get the url that this link directs too:

http://youtube.com/v/I6DBeK7y-4Q

it directs to

http://youtube.com/p.swf?video_id=I6DBeK7y-4Q&eurl=&iurl=http%3A//sjc-static14.sjc.youtube.com/vi/I6DBeK7y-4Q/2.jpg&t=OEgsToPDskIDNtK1GcrDtb2oPUlepC__
[/code]

How is that not asking a question properly??? how in the hell can that be asked differerntly? all that happens is the link re-directs, i simply wanted to know how to get the link that it redirects too; which happens to be an FLV file/player.

I said it has nothing to do with youtube to try and make it simpler for you to understand (my god, how does this need simplifying!?!?) - the question I am asking has nothing to do with youtube, its to do with a re-directing url. The program I am writing does have to do with youtube, but im not here to talk about that im here to talk about the re-direction!!!!!!!!!!

Yes I did state you cant answer the question which is FINE, but because you dont know the answer to my question you try and start an argument instead. Theres a name for people like you, i'm not sure what it is but its very clear whats happening...

You dont know the answer, which subconsciously angers you.. maybe this is due to an inferior complex of not knowing enough or something. So you have come up with a defense mechanism for when you dont know the answer, you trigger an argument and work from there... trying hard to make the person asking the question feel like they are infact the one who doesnt know enough, and of course you know more. Am I chatting crap? well look what happened here:

Out of the blue you post this:

[quote]"Firstly, sorry to disappoint you. [b]But you make it sound like you are the first person[/b] to find out how to download a video from youtube.

Secondly, [u][b]i can do it[/b][/u] by injecting a javascript code." [/quote]

Can you see that? cries out "im better than you!!!!" even though i had presently said
[quote]
alot of people have wrote youtube downloaders[/quote]



Your not alone though buddy, theres guys like you on all forums. just remebered what they are called: delusional dreamers
Link to comment
Share on other sites

u said i start the arguement? well it was u who said the 'shut the fuck up'.

[quote]I said it has nothing to do with youtube to try and make it simpler for you to understand (my god, how does this need simplifying!?!?) - the question I am asking has nothing to do with youtube, its to do with a re-directing url. The program I am writing does have to do with youtube, but im not here to talk about that im here to talk about the re-direction!!!!!!!!!![/quote]

Fine. Then state it out clearly. u don't have to use those exclamation mark. that just proves its childish

[quote]Yes I did state you cant answer the question which is FINE, but because you dont know the answer to my question you try and start an argument instead. Theres a name for people like you, i'm not sure what it is but its very clear whats happening...[/quote]

u state i can't answer the question? well i posted the http headers i received. did u ask for further help? no u didn't

[quote]You dont know the answer, which subconsciously angers you.. maybe this is due to an inferior complex of not knowing enough or something. So you have come up with a defense mechanism for when you dont know the answer, you trigger an argument and work from there... trying hard to make the person asking the question feel like they are infact the one who doesnt know enough, and of course you know more. Am I chatting crap? well look what happened here:[/quote]

now who's the one in anger and typing boxing those exclamation marks?

[quote]Can you see that? cries out "im better than you!!!!" even though i had presently said [/quote]

well i didn't cry. i'm just stating out what's possible to do.

[quote]Your not alone though buddy, theres guys like you on all forums. just remebered what they are called: delusional dreamers[/quote]

sure. u even start a agruement with ted_chou12. are u referring to yourself?
Link to comment
Share on other sites

I said shut the F*** up after you started the argument, remember.

I didn't argue with ted I said thanks but basicly that doesnt help. And as he kept posting it I just got a little irritated. I just thought i was asking a very simple question, but it seems to have just confused everyone.. which sucks.


Shu, i think you actually had the answer to the question also, in the header part.
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.