{"id":20389027,"url":"https://github.com/erasys/dnode-php-sync-client","last_synced_at":"2026-04-01T23:01:58.333Z","repository":{"id":3586594,"uuid":"4649906","full_name":"erasys/dnode-php-sync-client","owner":"erasys","description":"Minimalistic dnode client for PHP","archived":false,"fork":false,"pushed_at":"2017-06-11T23:49:01.000Z","size":270,"stargazers_count":17,"open_issues_count":1,"forks_count":4,"subscribers_count":13,"default_branch":"master","last_synced_at":"2026-03-28T00:58:04.270Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"victorenator/als","license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/erasys.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2012-06-13T11:12:22.000Z","updated_at":"2022-12-26T10:51:26.000Z","dependencies_parsed_at":"2022-08-21T11:50:49.083Z","dependency_job_id":null,"html_url":"https://github.com/erasys/dnode-php-sync-client","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/erasys/dnode-php-sync-client","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/erasys%2Fdnode-php-sync-client","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/erasys%2Fdnode-php-sync-client/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/erasys%2Fdnode-php-sync-client/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/erasys%2Fdnode-php-sync-client/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/erasys","download_url":"https://codeload.github.com/erasys/dnode-php-sync-client/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/erasys%2Fdnode-php-sync-client/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31292784,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-01T21:15:39.731Z","status":"ssl_error","status_checked_at":"2026-04-01T21:15:34.046Z","response_time":53,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-15T03:14:42.595Z","updated_at":"2026-04-01T23:01:58.312Z","avatar_url":"https://github.com/erasys.png","language":"PHP","readme":"dnode-php-sync-client\n=====================\n\nMinimalistic [dnode](https://github.com/substack/dnode) client for PHP, supports only synchronous calling of methods on remote server.\n\n* It can call method on remote dnode server and it can receive response.\n* It does not support any other callbacks.\n* It does not support full [dnode-protocol](https://github.com/substack/dnode-protocol) - response\n   from remote server must not contain any callbacks or links section.\n\nLook at [dnode-php](https://github.com/bergie/dnode-php) if you are looking\nfor more complex support of dnode protocol.\n\nUsage\n-----\n\nLets first start simple node.js server exposing `echo` method over dnode:\n\n```javascript\nvar dnode = require('dnode');\nvar port = process.argv[2] || 8080;\ndnode({\n  echo: function (data, callback) {\n    callback(null, data);\n  }\n}).listen(port);\n```\n\nNow, we can call this echo method from PHP like this:\n\n```php\n\u003c?php\nrequire_once \"dnode-php-sync-client/DnodeSyncClient.php\";\n$dnode = new \\DnodeSyncClient\\Dnode();\n$connection = $dnode-\u003econnect('localhost', 8080);\n$response = $connection-\u003ecall('echo', array('Hello, world!'));\nvar_dump($response);\n```\n\nResult:\n\n```\narray(2) {\n  [0] =\u003e\n  NULL\n  [1] =\u003e\n  string(13) \"Hello, world!\"\n}\n```\n\nRequirements\n------------\n\n* php 5.3 - namespaces are used\n* phpunit - tests were written with phpunit 3.6\n\nRun tests\n---------\n\nTo run all tests, just run `phpunit .` from the main directory.\n\n`_test/DnodeTest.php` is integration test which needs dnode echo server running.\nSources for this test server are in `_test/node` directory. You need to first \ninstall dnode dependency by running `npm install .` from directory `_test/dnode`.\nOnce dnode is installed, `DnodeTest.php` will start the echo service on port\n8080 when necessary.\n\nThe usual\n---------\n\nWe are [hiring](http://www.erasys.de/public/front_content.php?idcat=9)!","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ferasys%2Fdnode-php-sync-client","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ferasys%2Fdnode-php-sync-client","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ferasys%2Fdnode-php-sync-client/lists"}