I’m writing a plugin for a client and I need to:
1) fetch a remote media (could be a jpeg or a swf flash) from another server
2) store it in the uploads WP folders
3)add it to the Media Gallery so the user than can use it in his own post and pages.
I would like to use standard WP functions or at least classes already included in the WP distribution.
for 3) already found the functions in the codex.
For 1) I’m thinking using the Snoopy class to fetch the file from the remote server.
Question: where can I see an example of Snoopy’s use within the WP core?
For 2) I would like that the plugin obey to the WP option and setting when it save the fetched file: the upload path and month-year folder structure.
Question: where can I found the function that deal with the “save media” task and how can I take advantage of it?
- The topic ‘Fetch a remote media-file and store it the way WP does’ is closed to new replies.