Downloading an image with php and at the same time resizing it
<p>I want to download this image:
<code>http://imgs.xkcd.com/clickdrag/1n2w.png</code></p>

<p>But the image is too large for me so i want to resize it to lets say 100 times smaller than it is now. Also i want the image to have its original name (in this case 1n2w.png).</p>

<pre><code>For downloading i was thinking of using somet
$content = file_get_contents('http://imgs.xkcd.com/clickdrag/1n2w.png');
file_put_contents('/images', $content);
</code></pre>

<p>But it didnt work. Maybe i need to use curl for this?
As for the resizing part i dont know what to use, so if possible i would like too see some suggestions on this.</p>
