So if you are like many of the others out there struggling to automatically post to wordpress, I figured I’d give a little help today. We’ve gone into a lot more detail inside the codebank, however, this should be enough to get anyone going.
(warning: Wordpress does like to garble code and I’m to lazy to install a plugin to display it. Watch out for quotes specifically)
// you have to include a path to a valid class-ixr.php file. It’s included in every worpdress install.
include_once(‘/wp-includes/class-IXR.php’);
// if you aren’t working with multi site a blog id of zero is fine.
define(‘BLOG_ID’, 0);
// blog username and password
define(‘RPC_USERNAME’, ‘yourusername’);
define(‘RPC_PASSWORD’, ‘yourpassword’);
// make sure the target blog has xml-rpc posting enabled under settings -> writting
$client = new IXR_Client(‘http://targetblog.com/xmlrpc.php’);
// O.k. we’ve got our client.
// what is our title, and the content of the post we want to send over.
That’s it. Just add in some error checking and go to town.
Codebank Latest Releases
Codebank Recently released: Location Generator Magic Keyword Plugin Magic Rss Linker 4 new tutorialsCategories
- 30 Day Website Network
- Black Hat Experiments
- Changing Affiliate World
- CodeBank
- Contests
- Digest
- Facebook Programming
- Featured Articles
- Features
- Internet Marketing Tips
- Network Building
- Network Progress Report
- Newbie Corner
- Online Tools
- Overview
- Rambling
- Rss Marketing
- Tutorials
- Uncategorized
- What Are We Going To Do Today?
Rss Notifications



