Hello Nabil,
I would suggest looking into CS documentation folder and review the documents covering JSON and the one covering servers. It will answer a lot of your questions. Also check the client folder for exemples on how to implement the client in PHP.
As a side note, I am currently working on a RESTful proxy to interact with CS. It essentially creates an API for your bot. I wanted to hold on to announcing it until it was more robust, but I guess it does not really matters: https://github.com/kuzyn/lahar
However, I have realized today that CS has changed tremendously in the last few version, which is very exciting. I haven’t had time to reassess my project objectives with the new features yet. But my goals are: easy to deploy on PaaS providers (Heroku, Openshift, Docker…), unit tests/CI, as little overhead as possible for queries, no PHP. In its current state, it should be enough to get you started if you have some basics in JS & PaaS.
Of course, I welcome all questions, comments, pull requests and plan on continuing development until it is robust enough for production. nodejs wizards and Express guru, all help appreciated.