YouTube Videolarini download aparati ...

KerneL32

Müptela Üye
İYİNET Üyesi
Katılım
8 Mar 2005
Mesajlar
1,247
Beğeniler
0
#1
Kod:
<% 

YouTubeID	= "LIaUqO6d6Hs"

Private Function YouTube(URL) 
	Const adTypeText = 2 
	Const adReadAll = -1 
	Set objYouTubeHTTP = Server.CreateObject("MSXML2.ServerXMLHTTP" ) 
	Set objYouTube = Server.CreateObject("ADODB.Stream" ) 
	objYouTubeHTTP.Open "GET" , URL, false 
	objYouTubeHTTP.sEnd 
	objYouTube.Open 
	objYouTube.Type = adTypeText 
	objYouTube.WriteText(objYouTubeHTTP.ResponseBody) 
	objYouTube.Position = 0 
	objYouTube.CharSet = "windows-1254" 
	YouTube = objYouTube.ReadText(adReadAll) 
	objYouTube.Close 
	Set objYouTube = Nothing 
	Set objYouTubeHTTP = Nothing 
End Function 

YouTubeURL	= "http://www.youtube.com/watch?v="& YouTubeID &""

YouTubeDown 	= YouTube(YouTubeURL)
YouTubeS	= "/player2.swf?video_id="
YouTubeF	= """, ""movie_player"""
YouTubeG 	= Instr(YouTubeDown,YouTubeS)
YouTubeZ 	= Instr(YouTubeDown,YouTubeF)
YouTubeDown 	= Mid(YouTubeDown,YouTubeG,YouTubeZ-YouTubeG)
YouTubeDown	= Replace(YouTubeDown, YouTubeS,"")
YouTubeDown	= Replace(YouTubeDown, YouTubeF,"")
YouTubeDown	= "http://www.youtube.com/get_video?video_id="& YouTubeDown

%>
<a href="<%=YouTubeDown%>">Videoyu indirin</a>
Bazi arkadaslar istedigi icin yazdim denedim kontrol ettim.
Saygilar.
 

Bu konuyu okuyanlar (Üyeler: 1, Misafirler: 0)

Üst