How to add an image from url to temp?
<p>I am using the SimpleImage.php class from: <a href="http://www.white-hat-web-design.co.uk/blog/resizing-images-with-php/" rel="nofollow">http://www.white-hat-web-design.co.uk/blog/resizing-images-with-php/</a> , to resize, compress and save the images.</p>

<p>Usually using it with an image from input:</p>

<pre><code>$tmp_dir = $_FILES['file']['tmp_name'];
$file_name = 'something.jpg'; 

include('SimpleImage.php');
$image = new SimpleImage();
$image-&gt;load($tmp_dir);

$image-&gt;resizeToWidth($width);
$image-&gt;save('imgd/l'.$file_name);
</code></pre>

<p><strong>But how can I deal just with the image url?</strong> (from another website)</p>

<pre><code>$img = file_get_contents($url);
</code></pre>

<p>The above <code>$img</code> variable keeps the actual image.
So how can I save it to temp to use it?
If this is the right way.</p>

<p>If it's possible not to have to change SimpleImage.php class.</p>
