How to upload image from url or computer with php?
<p>I have a form (code below) that allows a user to upload an image but I would also like them to be able to insert a URL and the image will be fetched and uploaded. What could I add this form to do this? Thanks</p>

<pre><code>&lt;?php } if ($settings['usp_images'] == 'show') { ?&gt;
            &lt;?php if($settings['max-images'] !== 0) { ?&gt;
            &lt;li class="usp_images"&gt;
                &lt;label for="user-submitted-image" class="usp_label"&gt;&lt;?php _e('Upload an Image'); ?&gt;&lt;/label&gt;
                &lt;div id="usp_upload-message"&gt;&lt;?php echo $settings['upload-message']; ?&gt;&lt;/div&gt;
                &lt;div&gt;
                    &lt;?php 
                    if($settings['min-images'] &lt; 1) {
                        $numberImages = 1;
                    } else {
                        $numberImages = $settings['min-images'];
                    }
                    for($i = 0; $i &lt; $numberImages; $i++) { ?&gt;
                    &lt;input class="usp_input usp_clone" type="file" size="25" id="user-submitted-image" name="user-submitted-image[]" /&gt;
                    &lt;?php } ?&gt;
</code></pre>
