Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

snatch-xmpp/snatch_php

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Snatch PHP

Copyright (c) 2017-2018 Manuel Rubio

Authors: "Manuel Rubio" (manuel@altenwald.com).

Build Status Codecov License: Apache 2.0

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.

Installation

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.

Getting Started

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

Troubleshooting

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!

Modules

ephp_lib_snatch
snatch_php