<?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>Christian Riesen &#187; wget</title>
	<atom:link href="http://christianriesen.com/tag/wget/feed/" rel="self" type="application/rss+xml" />
	<link>http://christianriesen.com</link>
	<description>Life and work in the information and communication age</description>
	<lastBuildDate>Thu, 29 Dec 2011 17:52:04 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>wget in php</title>
		<link>http://christianriesen.com/2009/10/wget-in-php/</link>
		<comments>http://christianriesen.com/2009/10/wget-in-php/#comments</comments>
		<pubDate>Sun, 25 Oct 2009 13:12:16 +0000</pubDate>
		<dc:creator>Christian Riesen</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[System Administration]]></category>
		<category><![CDATA[wget]]></category>

		<guid isPermaLink="false">http://christianriesen.com/?p=92</guid>
		<description><![CDATA[Ok, this is far from what wget is capable of, but most people do only need one function for wget. Enter url, get content. Especially during the setup phase this is often needed and sometimes wget is not available or libraries are missing. For those that have a working php installation but no working ...]]></description>
			<content:encoded><![CDATA[<p>Ok, this is far from what wget is capable of, but most people do only need one function for wget. Enter url, get content. Especially during the setup phase this is often needed and sometimes wget is not available or libraries are missing. For those that have a working php installation but no working wget, this little script does exactly that, download a file and save it locally. This little helper has done valuable services for me now a few times, so here it is for anyone to use.</p>
<pre class="brush: php; title: ; notranslate">&lt;?php
// wget substitute
if ($argc != 2) {
?&gt;
This works a bit like wget. Just run it with the url as argumnet
&lt;?php
    exit;
}

$url = $argv[1];
$filename = basename($url);

file_put_contents($filename,file_get_contents($url));

echo PHP_EOL. 'Written file ' . $filename . PHP_EOL;</pre>
<p>Usage is rather simple now:<br />
<code>php wget.php URL</code></p>
<p class="wp-flattr-button"></p>]]></content:encoded>
			<wfw:commentRss>http://christianriesen.com/2009/10/wget-in-php/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

