I've got a script which collects a picture, link plus some text content from various sources. It loops through and produces numerous posts.
I would like take each publish combine it with Wordpress having a Title, a picture, along with a link.
Can anybody suggest a good way to do this?
In the Wordpress function reference:
// Create post object $my_post = array(); $my_post['post_title'] = 'My post'; $my_post['post_content'] = 'This is my post.'; $my_post['post_status'] = 'publish'; $my_post['post_author'] = 1; $my_post['post_category'] = array(8,39); // Insert the post into the database wp_insert_post( $my_post );
And also the function to attach the image:
wordpress_place_attachment( $attachment, $filename, $parent_publish_id )
Wordpress supports several APIs over XML-RPC.
Additionally, it supports posts via email, which can be simpler inside your situation.