Save a file from web into Media Library in WordPress

http://theme.fm/2011/10/how-to-upload-media-via-url-programmatically-in-wordpress-2657/

You could use download_url to grab a file from a given URL, then use media_sideload_image to save it into Media Library and attach to a post (optional).

Leave a Reply

Your email address will not be published. Required fields are marked *