Extending CodeIgniter's upload class for images
Instead of writing custom validations I want to use the features that CodeIgniter's upload class offers.
I want开发者_JS百科 to download a remote image (only .jpg, .png, .gif) and save to a directory and save the details of the image to the database.
CI's upload class offers all the validation functions like size, mime types, etc and also offers all the variables that I can use and save to the database.
I want to extend the upload class to make it download an image (URL to image as parameter) and process it with the upload class.
See: Saving image from PHP URL
vartec's answer shows how to download a remote image in PHP.
精彩评论