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 Comment