To upload image in wordpress from External link

admin

Administrator
Staff member
I have image coming from external link

Code:
http://deomain.com/images.php?id=<id>

Now I want to upload image using above url into wordpress.

Please suggest code.

Thanks in advance.