Added support to save an image from url

 - a file path could contain dots, using explode instead of prey_match and it’s faster to use explode.
- added support to save an image from url.
- added another check for the image extension using exif_imagetype

i have been working on this on my personal project, and thought it should be patched, tell me in case u need me to do any changes.