PHPackages                             comodojo/metaweblog - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. comodojo/metaweblog

AbandonedArchivedLibrary[API Development](/categories/api)

comodojo/metaweblog
===================

Legacy metaweblog-compliant rpc interface

1.0.4(10y ago)270MITPHPPHP &gt;=5.3.0CI failing

Since Jan 13Pushed 7y ago3 watchersCompare

[ Source](https://github.com/comodojo/metaweblog)[ Packagist](https://packagist.org/packages/comodojo/metaweblog)[ Docs](https://comodojo.org)[ RSS](/packages/comodojo-metaweblog/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (5)Dependencies (5)Versions (6)Used By (0)

comodojo/metaweblog
===================

[](#comodojometaweblog)

[![Build Status](https://camo.githubusercontent.com/f74d6113a1c12f7cbd7a3cccbfd0a774000c16a5a304568fbb7e10d4b7368b59/68747470733a2f2f6170692e7472617669732d63692e6f72672f636f6d6f646f6a6f2f6d6574617765626c6f672e706e67)](http://travis-ci.org/comodojo/metaweblog) [![Latest Stable Version](https://camo.githubusercontent.com/e4a65e24bcd47d5315ef09210a0be332406354554ea488afe34ec4e5e4f59f24/68747470733a2f2f706f7365722e707567782e6f72672f636f6d6f646f6a6f2f6d6574617765626c6f672f762f737461626c65)](https://packagist.org/packages/comodojo/metaweblog) [![Total Downloads](https://camo.githubusercontent.com/f818e3185b8e097f3e738af187513a42ac736643e0ab559a0b4b0155c8ec393e/68747470733a2f2f706f7365722e707567782e6f72672f636f6d6f646f6a6f2f6d6574617765626c6f672f646f776e6c6f616473)](https://packagist.org/packages/comodojo/metaweblog) [![Latest Unstable Version](https://camo.githubusercontent.com/6ec9f5900ecaf9af1017d37f8a1d183a086f8adcdfc138634d0a11813104d752/68747470733a2f2f706f7365722e707567782e6f72672f636f6d6f646f6a6f2f6d6574617765626c6f672f762f756e737461626c65)](https://packagist.org/packages/comodojo/metaweblog) [![License](https://camo.githubusercontent.com/6ac79ec90a8bbd433d8a0346b652bfafeb5fe934f56df842e09976c141ba499c/68747470733a2f2f706f7365722e707567782e6f72672f636f6d6f646f6a6f2f6d6574617765626c6f672f6c6963656e7365)](https://packagist.org/packages/comodojo/metaweblog) [![Scrutinizer Code Quality](https://camo.githubusercontent.com/17c31a554beec82be1bbd219895f72501a612f93a8ed3218be4042ba16eb53ec/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f636f6d6f646f6a6f2f6d6574617765626c6f672f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/comodojo/metaweblog/?branch=master) [![Code Coverage](https://camo.githubusercontent.com/daf3ce825fa9400d2b07a82c61e55e8b03c9a44dc688f295348f41ed1a293c17/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f636f6d6f646f6a6f2f6d6574617765626c6f672f6261646765732f636f7665726167652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/comodojo/metaweblog/?branch=master)

A [metaweblog](http://xmlrpc.scripting.com/metaWeblogApi.html) rpc client.

***This is the development branch, please do not use it in production***

This lib is intended to be used as basic client for many blog platforms (such as wordpress) or to generate testing cases for rpc server.

Installation
------------

[](#installation)

Install [composer](https://getcomposer.org/), then:

`composer require comodojo/metaweblog`

Usage example
-------------

[](#usage-example)

Getting recent posts from a blog:

```
try {

    // Create a new metaweblog instance providing address, username and password
    $mwlog = new \Comodojo\MetaWeblog\MetaWeblog( "www.example.org", "john", "doe" );

    // Get last 10 posts
    $posts = $mwlog->getRecentPosts(10);

} catch (\Exception $e) {

	/* something did not work :( */

}
```

Supported methods
-----------------

[](#supported-methods)

This library supports the whole metaweblog API:

- `getPost($id)`: retrieve a post from weblog
- `getRecentPosts(/*optional, default 10*/ $howmany)`: get `$howmany` posts from blog
- `newPost($struct, /*optional, default true*/ $publish)`: create new post
- `editPost($postId, $struct, /*optional, default true*/ $publish)`: edit post referenced by `postId`
- `deletePost($postId, /*optional, default false*/ $appkey, /*optional, default false*/ $publish)`: delete a post referenced by `postId`
- `getCategories()`: retrieve a list of categories from weblog
- `newMediaObject($name, $mimetype, $content, /*optional, default false*/ $overwrite)`: upload a new media to weblog using `metaWeblog.newMediaObject` call
- `getTemplate($template_type, /*optional, default false*/ $appkey)`: get template
- `setTemplate($template, $template_type, /*optional, default false*/ $appkey)`: set template
- `getUsersBlogs(/*optional, default false*/ $appkey)`: returns information about all the blogs a given user is a member of

Refer to [comodojo/metaweblog API](http://api.comodojo.org/libs/Comodojo/MetaWeblog/MetaWeblog.html) for more detailed informations about methods.

RPC client and transport options
--------------------------------

[](#rpc-client-and-transport-options)

The `getRpcClient()` method allows access to rpc client options (and also transport options).

For example, to get recent post from a blog listening on port 8080:

```
try {

    // Create a new metaweblog instance providing address, username and password
    $mwlog = new \Comodojo\MetaWeblog\MetaWeblog( "www.example.org", "john", "doe" );

    $mwlog->getRpcClient()->getTransport()->setPort(8080);

    // Get last 10 posts
    $posts = $mwlog->getRecentPosts(10);

} catch (\Exception $e) {

	/* something did not work :( */

}
```

Other setters/getters
---------------------

[](#other-settersgetters)

- Get/set blog ID

    ```
        // Get current blog ID
        $id = $mwlog->getId()

        // Set current blog ID
        $mwlog->setId(2);
    ```
- Get/set encoding

    ```
        // Get current encoding
        $enc = $mwlog->getEncoding()

        // Set current encoding
        $mwlog->setEncoding('utf-8');
    ```

Documentation
-------------

[](#documentation)

- [API](https://api.comodojo.org/libs/metaweblog)

Contributing
------------

[](#contributing)

Contributions are welcome and will be fully credited. Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

License
-------

[](#license)

`comodojo/metaweblog` is released under the MIT License (MIT). Please see [License File](LICENSE) for more information.

###  Health Score

29

—

LowBetter than 59% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity62

Established project with proven stability

 Bus Factor1

Top contributor holds 84.6% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~69 days

Total

5

Last Release

3863d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/4cc933c2d1b92f7fd32abb459387bff69fc8a87158b1474171ccf26139904706?d=identicon)[comodojo](/maintainers/comodojo)

---

Top Contributors

[![marcogiovinazzi](https://avatars.githubusercontent.com/u/12754673?v=4)](https://github.com/marcogiovinazzi "marcogiovinazzi (11 commits)")[![mcastiello](https://avatars.githubusercontent.com/u/12670283?v=4)](https://github.com/mcastiello "mcastiello (1 commits)")[![scrutinizer-auto-fixer](https://avatars.githubusercontent.com/u/6253494?v=4)](https://github.com/scrutinizer-auto-fixer "scrutinizer-auto-fixer (1 commits)")

---

Tags

blogcomodojoxmlrpcmetaweblog

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/comodojo-metaweblog/health.svg)

```
[![Health](https://phpackages.com/badges/comodojo-metaweblog/health.svg)](https://phpackages.com/packages/comodojo-metaweblog)
```

###  Alternatives

[phpxmlrpc/phpxmlrpc

A php library for building xmlrpc clients and servers

2414.9M45](/packages/phpxmlrpc-phpxmlrpc)[lstrojny/fxmlrpc

Fast and tiny XML/RPC client with bridges for various HTTP clients

1425.4M30](/packages/lstrojny-fxmlrpc)[hieu-le/wordpress-xmlrpc-client

A PHP client for Wordpress websites that closely implement the XML-RPC WordPress API with full test suite built in

118158.5k2](/packages/hieu-le-wordpress-xmlrpc-client)[laminas/laminas-xmlrpc

Fully-featured XML-RPC server and client implementations

252.0M18](/packages/laminas-laminas-xmlrpc)[tbondois/odoo-ripcord

Ripoo : a PHP8 XML-RPC client handler for Odoo External API

16124.3k1](/packages/tbondois-odoo-ripcord)[monitorbacklinks/yii2-wordpress

Yii2 component for integration with Wordpress CMS via XML-RPC API

3326.9k](/packages/monitorbacklinks-yii2-wordpress)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
