This class MediaUploadByURL is use to upload image from external image source url,
File need to include:
Following file contain the class, you can include in your theme or plugin or application to use of class.
classes/class-media-upload-by-url.php
Example file:
Following file is contain example code of usages of class.
functions/functions-media-upload-by-url.php
Code sample:
$args = array(
'file_src_url' => 'https://i.imgur.com/CkhKEkY.jpg', // Optional
'file_title' => 'Hello Title', // Optional
'timeout' => 5, // Second
);
$MediaUploadByURL = new MediaUploadByURL();
$fileId = $MediaUploadByURL->upload_file($args);
Screenshot:

