Is it possible to run XMPP based on PHP and Javascript multiplayer online games in FaceBook?

Let me first introduce my story. To develop a multi-player network game on facebook, flash used to be king, but it consumes a lot of resources for the client, and I feel that it is not worth the card game. So I came up with the idea that the interface will use Javascript (of course, with jQuery) and backend with PHP. But for real-time communication, this is not possible only with PHP and Javascript. It makes no sense to record every movement of players in MySQL and display it back to other browsers. So I came up with an idea with XMPP Services. XMPP services can even transfer the browser to the browser and display content using Strophe and Javascript even without PHP.

Finally, I have all the necessary tools, but I have a few questions that I cannot answer myself.

1) How does the XMPP server work between PHP and Javascript? I need to get / publish user records from MySQL and calculate the movements, and then redirect the results to the intended user. There will also be an authentication system, so PHP will take care of me as I am not mistaken.

2) This question is the title of this post. Is it possible to run XMPP based on PHP and Javascript multiplayer online games in FaceBook?

Thanks in advance for all your time and advice!

+1
source share
1 answer

PHP, Ajax PHP XMPP. XMPP PHP. Facebook, script - , Facebook , , API Facebook.

+1

Source: https://habr.com/ru/post/1692829/


All Articles