Copyright (c) 2017-2018 Manuel Rubio
Authors: "Manuel Rubio" (manuel@altenwald.com
).
Snatch PHP is an extension for snatch to provide to the system of a way use PHP to handle the incoming information from the claws.
The system requires OTP 19+ and we prefer to use rebar3 instead of older versions. To install claws_rest only needs:
{deps, [
{snatch_php, {git, "https://github.com/snatch-xmpp/snatch-php", "0.2.0"}}
]}
Or if you are using erlang.mk instead, you can use:
DEPS += snatch_php
dep_snatch = git https://github.com/snatch-xmpp/snatch_php.git 0.2.0
You'll need a C/C++ compiler installed in your system for fast_xml and stringprep.
For further information check this doc.
First of all, you need to have clear the concepts behind XMPP. What's a XMPP Server? What's a XMPP Component? How works XMPP? You don't need to be an expert but you have to have an acknowledge about those concepts before start.
What we are going to create this time is a bot client. This means we're not going to use it as XMPP Component. We are going to create the client to perform the auth against a XMPP Server and then wait for incoming requests from other clients.
The most tricky part will be the roster concept to add to others when the real users wanted to add to us in their rosters.
You can follow the whole text here
Feel free to create an issue in github to point a bug, flaw or improvement and even send a pull request with a specific change. Read the LICENSE if you have doubts about what you can do with the code.
Enjoy!
ephp_lib_snatch |
snatch_php |