peb_connect — Open a connection to an Erlang node
Open a connection to an Erlang node.
The Erlang node. e.g. "nodename@host.domain"
The cookie for communicate with this Erlang node.
Returns an Erlang node link identifier on success, or FALSE on failure.
Example #1 peb_connect() example
<?php
$link = peb_connect('node@host.domain', 'secret_cookie');
if (!$link) {
die('Could not connect: ' . peb_error());
}
echo 'Connected successfully';
peb_close($link);
?>
The above example will output:
Connected successfully
Note: The link to the server will be closed as soon as the execution of the script ends, unless it's closed earlier by explicitly calling peb_close().