<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>simra &#187; video_id</title>
	<atom:link href="http://www.simra.ch/tag/video_id/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.simra.ch</link>
	<description>development &#38; design</description>
	<lastBuildDate>Fri, 26 Mar 2010 15:57:34 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Youtube Video Downloader in Python</title>
		<link>http://www.simra.ch/2009/12/youtube-video-downloader-in-python/</link>
		<comments>http://www.simra.ch/2009/12/youtube-video-downloader-in-python/#comments</comments>
		<pubDate>Sat, 05 Dec 2009 14:01:52 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Downloads]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[get_video]]></category>
		<category><![CDATA[video_id]]></category>
		<category><![CDATA[youtube]]></category>

		<guid isPermaLink="false">http://www.simra.ch/?p=919</guid>
		<description><![CDATA[The following Application is written in Python and can be used to download flv files from youtube. You only need to copy the youtube url of the video you want and select a destination where to save the file. After that the program starts downloading.


Download Python Youtube Downloader (Note it&#8217;s only compiled for MacOSX.
Or check [...]]]></description>
			<content:encoded><![CDATA[<p>The following Application is written in Python and can be used to download flv files from youtube. You only need to copy the youtube url of the video you want and select a destination where to save the file. After that the program starts downloading.</p>
<p><span id="more-919"></span></p>
<p><a href="http://www.simra.ch/uploads/downloads/python/ytd/screenshot2.png"><img src="http://www.simra.ch/uploads/downloads/python/ytd/screenshot2_small.png" alt="Python Youtube Downloader" title="ython Youtube Downloader" width="410" height="148" class="alignnone size-full" /></a></p>
<p>Download <a href="http://www.simra.ch/uploads/downloads/python/ytd/ytd.zip">Python Youtube Downloader</a> (Note it&#8217;s only compiled for MacOSX.</p>
<p>Or check out my <a href="http://www.simra.ch/2009/12/youtube-video-downloader-in-php/">Youtube Video Downloader in Php</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.simra.ch/2009/12/youtube-video-downloader-in-python/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Youtube Video Downloader in PHP</title>
		<link>http://www.simra.ch/2009/12/youtube-video-downloader-in-php/</link>
		<comments>http://www.simra.ch/2009/12/youtube-video-downloader-in-php/#comments</comments>
		<pubDate>Fri, 04 Dec 2009 12:35:34 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Code Snippets]]></category>
		<category><![CDATA[Php]]></category>
		<category><![CDATA[get_video]]></category>
		<category><![CDATA[video_id]]></category>
		<category><![CDATA[youtube]]></category>

		<guid isPermaLink="false">http://www.simra.ch/?p=885</guid>
		<description><![CDATA[The following Php-Script is able to download videos from youtube in three different formats (MP4 for hight, FLV for medium and 3GP for low quality). In addition the script provides a preview of the current video.

View Demo

Here&#8217;s the source:
&#60;?php
if&#40;isset&#40;$_GET&#91;'u'&#93;&#41;&#41;&#123;
&#160; &#160; $v = urldecode&#40;$_GET&#91;'u'&#93;&#41;;
&#160; &#160; if&#40;$_GET&#91;'fmt'&#93; == 17&#41;&#123; // 3gp
&#160; &#160; &#160; &#160; header&#40;&#34;Content-Type: video/3gp&#34;&#41;; &#160;
&#160; [...]]]></description>
			<content:encoded><![CDATA[<p>The following Php-Script is able to download videos from youtube in three different formats (MP4 for hight, FLV for medium and 3GP for low quality). In addition the script provides a preview of the current video.</p>
<p><a href="http://onyou.ch/services/?service=youtube_downloader.php" target="_blank"><br />
View Demo</a></p>
<p><span id="more-885"></span><br />
Here&#8217;s the source:</p>
<div class="codecolorer-container php default" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;height:300px;"><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000000; font-weight: bold;">&lt;?php</span><br />
<span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><a href="http://www.php.net/isset"><span style="color: #990000;">isset</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$_GET</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'u'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #000088;">$v</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/urldecode"><span style="color: #990000;">urldecode</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$_GET</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'u'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$_GET</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'fmt'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">==</span> <span style="color: #cc66cc;">17</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span> <span style="color: #666666; font-style: italic;">// 3gp</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <a href="http://www.php.net/header"><span style="color: #990000;">header</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Content-Type: video/3gp&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> &nbsp;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <a href="http://www.php.net/header"><span style="color: #990000;">header</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Content-Disposition: attachment; filename=<span style="color: #000099; font-weight: bold;">\&quot;</span>video.3gp<span style="color: #000099; font-weight: bold;">\&quot;</span>&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000088;">$v</span><span style="color: #339933;">.=</span><span style="color: #0000ff;">&quot;&amp;amp;fmt=17&quot;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
&nbsp; &nbsp; <span style="color: #b1b100;">elseif</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$_GET</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'fmt'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">==</span> <span style="color: #cc66cc;">18</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span> <span style="color: #666666; font-style: italic;">// mp4</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <a href="http://www.php.net/header"><span style="color: #990000;">header</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Content-Type: video/mp4&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> &nbsp;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <a href="http://www.php.net/header"><span style="color: #990000;">header</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Content-Disposition: attachment; filename=<span style="color: #000099; font-weight: bold;">\&quot;</span>video.mp4<span style="color: #000099; font-weight: bold;">\&quot;</span>&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> &nbsp;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000088;">$v</span><span style="color: #339933;">.=</span><span style="color: #0000ff;">&quot;&amp;amp;fmt=18&quot;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
&nbsp; &nbsp; <span style="color: #b1b100;">else</span><span style="color: #009900;">&#123;</span> <span style="color: #666666; font-style: italic;">// flv</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <a href="http://www.php.net/header"><span style="color: #990000;">header</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Content-Type: video/x-flv&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> &nbsp;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <a href="http://www.php.net/header"><span style="color: #990000;">header</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Content-Disposition: attachment; filename=<span style="color: #000099; font-weight: bold;">\&quot;</span>video.flv<span style="color: #000099; font-weight: bold;">\&quot;</span>&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> &nbsp;<br />
&nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
&nbsp; &nbsp; <a href="http://www.php.net/readfile"><span style="color: #990000;">readfile</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$v</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <a href="http://www.php.net/flush"><span style="color: #990000;">flush</span></a><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <a href="http://www.php.net/exit"><span style="color: #990000;">exit</span></a><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #009900;">&#125;</span><span style="color: #b1b100;">else</span><span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #000088;">$yu</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'http://www.youtube.com/watch?v=qGyfaoUAWtM'</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><a href="http://www.php.net/isset"><span style="color: #990000;">isset</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$_GET</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">&quot;yu&quot;</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #000088;">$yu</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$_GET</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">&quot;yu&quot;</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp;<br />
&nbsp; &nbsp; <span style="color: #000088;">$c</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/file_get_contents"><span style="color: #990000;">file_get_contents</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$yu</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp;<br />
&nbsp; &nbsp; <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><a href="http://www.php.net/preg_match"><span style="color: #990000;">preg_match</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'/&quot;video_id&quot;: &quot;(.*?)&quot;/'</span><span style="color: #339933;">,</span> <span style="color: #000088;">$c</span><span style="color: #339933;">,</span> <span style="color: #000088;">$m</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">&amp;&amp;</span> <a href="http://www.php.net/preg_match"><span style="color: #990000;">preg_match</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'/&quot;t&quot;: &quot;(.*?)&quot;/'</span><span style="color: #339933;">,</span> <span style="color: #000088;">$c</span><span style="color: #339933;">,</span> <span style="color: #000088;">$m1</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span> &nbsp; &nbsp;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000088;">$id</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$m</span><span style="color: #009900;">&#91;</span>1<span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000088;">$t</span> &nbsp;<span style="color: #339933;">=</span> <span style="color: #000088;">$m1</span><span style="color: #009900;">&#91;</span>1<span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000088;">$u</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;http://www.youtube.com/get_video?video_id=&quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$id</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;&amp;t=&quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$t</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
<span style="color: #000000; font-weight: bold;">?&gt;</span><br />
<br />
&lt;h1&gt;Youtube Url:&lt;/h1&gt;<br />
&lt;form method=&quot;get&quot; id=&quot;form&quot; onSubmit=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$_SERVER</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'PHP_SELF'</span><span style="color: #009900;">&#93;</span><span style="color: #000000; font-weight: bold;">?&gt;</span>&quot;&gt;<br />
&lt;input type=&quot;text&quot; name=&quot;yu&quot; id=&quot;yu&quot; size=&quot;80&quot; value=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$yu</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&quot;/&gt; &lt;input type=&quot;submit&quot; name=&quot;b&quot; id=&quot;b&quot; value=&quot;Load&quot; /&gt;<br />
&lt;/form&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp;<br />
<br />
&lt;h1&gt;Prewiew:&lt;/h1&gt;<br />
&lt;img src=&quot;http://img.youtube.com/vi/<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$id</span><span style="color: #000000; font-weight: bold;">?&gt;</span>/1.jpg&quot; alt=&quot;Preview 1&quot; /&gt;<br />
&lt;img src=&quot;http://img.youtube.com/vi/<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$id</span><span style="color: #000000; font-weight: bold;">?&gt;</span>/2.jpg&quot; alt=&quot;Preview 2&quot; /&gt;<br />
&lt;img src=&quot;http://img.youtube.com/vi/<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$id</span><span style="color: #000000; font-weight: bold;">?&gt;</span>/3.jpg&quot; alt=&quot;Preview 3&quot; /&gt;<br />
<br />
&lt;h1&gt;Downloads:&lt;/h1&gt;<br />
&lt;a href=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$_SERVER</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'PHP_SELF'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'?u='</span><span style="color: #339933;">.</span><a href="http://www.php.net/urlencode"><span style="color: #990000;">urlencode</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$u</span><span style="color: #009900;">&#41;</span><span style="color: #000000; font-weight: bold;">?&gt;</span>&quot;&gt;Download FLV&lt;/a&gt;&lt;br /&gt;<br />
&lt;a href=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$_SERVER</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'PHP_SELF'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'?fmt=18&amp;u='</span><span style="color: #339933;">.</span><a href="http://www.php.net/urlencode"><span style="color: #990000;">urlencode</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$u</span><span style="color: #009900;">&#41;</span><span style="color: #000000; font-weight: bold;">?&gt;</span>&quot;&gt;Download MP4&lt;/a&gt;&lt;br /&gt;<br />
&lt;a href=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$_SERVER</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'PHP_SELF'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'?fmt=17&amp;u='</span><span style="color: #339933;">.</span><a href="http://www.php.net/urlencode"><span style="color: #990000;">urlencode</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$u</span><span style="color: #009900;">&#41;</span><span style="color: #000000; font-weight: bold;">?&gt;</span>&quot;&gt;Download 3GP&lt;/a&gt;<br />
<br />
<span style="color: #000000; font-weight: bold;">&lt;?php</span><br />
<span style="color: #009900;">&#125;</span><br />
<span style="color: #000000; font-weight: bold;">?&gt;</span></div></div>
<p>Please check out my <a href="http://www.simra.ch/2009/12/youtube-video-downloader-in-python/">Youtube Video Downloader in Python</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.simra.ch/2009/12/youtube-video-downloader-in-php/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
	</channel>
</rss>

