$content_struct = array();
$content_struct['post_title'] = $name;
$content_struct['post_status'] = 'publish';
$content_struct['custom_fields'] = array();
$content_struct['custom_fields'][] = array( 'key' => '_somemeta1', 'value' => 'lorem' );
$content_struct['custom_fields'][] = array( 'key' => '_url', 'value' => 'http://example.com' );
$params = array( 1, $username, $password, $content_struct );
$q = new IXR_Client('http://example.com/xmlrpc.php');
$do = $q->query('wp.newPost', $params );