mynamesleo Posted December 26, 2006 Author Share Posted December 26, 2006 how about opening up a new/hidden broswer within php then just grabbing the url of it? can this be done in php or is it to messy? Quote Link to comment https://forums.phpfreaks.com/topic/31826-get-redirected-url/page/2/#findComment-147931 Share on other sites More sharing options...
Shu Posted December 26, 2006 Share Posted December 26, 2006 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.0Shu. Quote Link to comment https://forums.phpfreaks.com/topic/31826-get-redirected-url/page/2/#findComment-148030 Share on other sites More sharing options...
mynamesleo Posted December 26, 2006 Author Share Posted December 26, 2006 [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.0Shu.[/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://youtubeAlso the way im doing it is to be able to downloaded deleted videos Quote Link to comment https://forums.phpfreaks.com/topic/31826-get-redirected-url/page/2/#findComment-148056 Share on other sites More sharing options...
Shu Posted December 26, 2006 Share Posted December 26, 2006 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 Link to comment https://forums.phpfreaks.com/topic/31826-get-redirected-url/page/2/#findComment-148067 Share on other sites More sharing options...
mynamesleo Posted December 26, 2006 Author Share Posted December 26, 2006 [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_c9jywDownload that deleted video: http://ash-v126.ash.youtube.com/get_video?video_id=v1XgE_c9jywmod edit: grossly inappropriate comment removed. Do not use language like that here. The next time, will get you banned. Quote Link to comment https://forums.phpfreaks.com/topic/31826-get-redirected-url/page/2/#findComment-148072 Share on other sites More sharing options...
Shu Posted December 26, 2006 Share Posted December 26, 2006 Now who's asking the question? Being rude won't help to anything.fyi there's a site called youtubex.com so u can gladly save the time. Quote Link to comment https://forums.phpfreaks.com/topic/31826-get-redirected-url/page/2/#findComment-148081 Share on other sites More sharing options...
Shu Posted December 26, 2006 Share Posted December 26, 2006 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 scriptASSUMING 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. Quote Link to comment https://forums.phpfreaks.com/topic/31826-get-redirected-url/page/2/#findComment-148088 Share on other sites More sharing options...
mynamesleo Posted December 27, 2006 Author Share Posted December 27, 2006 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 Quote Link to comment https://forums.phpfreaks.com/topic/31826-get-redirected-url/page/2/#findComment-148229 Share on other sites More sharing options...
Shu Posted December 27, 2006 Share Posted December 27, 2006 [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-4Qit directs tohttp://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. Quote Link to comment https://forums.phpfreaks.com/topic/31826-get-redirected-url/page/2/#findComment-148239 Share on other sites More sharing options...
mynamesleo Posted December 27, 2006 Author Share Posted December 27, 2006 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-4Qit directs tohttp://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 Quote Link to comment https://forums.phpfreaks.com/topic/31826-get-redirected-url/page/2/#findComment-148249 Share on other sites More sharing options...
Shu Posted December 27, 2006 Share Posted December 27, 2006 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? Quote Link to comment https://forums.phpfreaks.com/topic/31826-get-redirected-url/page/2/#findComment-148290 Share on other sites More sharing options...
mynamesleo Posted December 27, 2006 Author Share Posted December 27, 2006 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. Quote Link to comment https://forums.phpfreaks.com/topic/31826-get-redirected-url/page/2/#findComment-148297 Share on other sites More sharing options...
mynamesleo Posted December 27, 2006 Author Share Posted December 27, 2006 is there a way to get the re-directed url using header? im guessing no ?? Quote Link to comment https://forums.phpfreaks.com/topic/31826-get-redirected-url/page/2/#findComment-148396 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.