PHPackages                             erasys/dnode-php-sync-client - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. erasys/dnode-php-sync-client

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

erasys/dnode-php-sync-client
============================

Minimalistic dnode client for PHP

1.0.2(11y ago)177714[1 PRs](https://github.com/erasys/dnode-php-sync-client/pulls)proprietaryPHPPHP &gt;=5.3.0

Since Oct 16Pushed 9y ago13 watchersCompare

[ Source](https://github.com/erasys/dnode-php-sync-client)[ Packagist](https://packagist.org/packages/erasys/dnode-php-sync-client)[ Docs](https://github.com/erasys/dnode-php-sync-client)[ RSS](/packages/erasys-dnode-php-sync-client/feed)WikiDiscussions master Synced 3w ago

READMEChangelog (3)DependenciesVersions (3)Used By (0)

dnode-php-sync-client
=====================

[](#dnode-php-sync-client)

Minimalistic [dnode](https://github.com/substack/dnode) client for PHP, supports only synchronous calling of methods on remote server.

- It can call method on remote dnode server and it can receive response.
- It does not support any other callbacks.
- It does not support full [dnode-protocol](https://github.com/substack/dnode-protocol) - response from remote server must not contain any callbacks or links section.

Look at [dnode-php](https://github.com/bergie/dnode-php) if you are looking for more complex support of dnode protocol.

Usage
-----

[](#usage)

Lets first start simple node.js server exposing `echo` method over dnode:

```
var dnode = require('dnode');
var port = process.argv[2] || 8080;
dnode({
  echo: function (data, callback) {
    callback(null, data);
  }
}).listen(port);
```

Now, we can call this echo method from PHP like this:

```
