README.md
1cjdns.inc.php
2=============
3A simple PHP API for the cjdns admin interface.
4
5Usage
6-------------
7```php
8<?php
9// Include the two files
10require "Bencode.php";
11require "Cjdns.php";
12
13// Make a new Cjdns object. The only required argument is the password, but it also accepts the IP and the port
14$cjdns = new Cjdns("password", "127.0.0.1", 11234);
15
16// Print a list of available functions and their arguments
17print_r($cjdns->functions);
18
19// Call one of them:
20$ping = $cjdns->call("RouterModule_pingNode",array("path"=>"fc72:6c3b:8c74:68a7:d8c3:b4e0:6cbd:9588"));
21
22// Display the result:
23print_r($ping);
24?>
25```
26
27Bugs
28-------------
29Please report any bugs you find to derp. IRC is fine, as is github.
30