SA-MP Forums Archive
Realtime communication between samp server and website server - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Realtime communication between samp server and website server (/showthread.php?tid=657665)



Realtime communication between samp server and website server - Seifspeed - 13.08.2018

I want to know what are the possible ways to achieve realtime communication between samp server and web server. I am experimenting with samp sockets but I can't find a tutorial or documentation to understand it. I would like to hear your suggestions.
Thanks in advance!


Re: Realtime communication between samp server and website server - Seifspeed - 13.08.2018

Anyone?


Re: Realtime communication between samp server and website server - victory88 - 14.08.2018

Get a mysql database on your webserver then connect SAMP to the the same database. Now you can have SAMP read the webserver and have the website/server change the database vise versa. If that is what you meant. If you use PHP having an automatic check will be abit difficult, you should then use nodejs I think.

EDIT DIDN'T SEE REAL-TIME, my bad


Re: Realtime communication between samp server and website server - Logic_ - 14.08.2018

I'm not sure but maybe this is what you're looking for?

https://sampforum.blast.hk/showthread.php?tid=628477


Re: Realtime communication between samp server and website server - Seifspeed - 16.08.2018

Quote:
Originally Posted by Logic_
Посмотреть сообщение
I'm not sure but maybe this is what you're looking for?

https://sampforum.blast.hk/showthread.php?tid=628477
Thanks for pointing me to this path, maybe I could achieve this using redis as a message broker using Redis Publish Subscribe.


Re: Realtime communication between samp server and website server - Seifspeed - 16.08.2018

Quote:
Originally Posted by victory88
Посмотреть сообщение
Get a mysql database on your webserver then connect SAMP to the the same database. Now you can have SAMP read the webserver and have the website/server change the database vise versa. If that is what you meant. If you use PHP having an automatic check will be abit difficult, you should then use nodejs I think.

EDIT DIDN'T SEE REAL-TIME, my bad
I actually am on a Node backend, I just don't know how to connection Socket.io with the samp sockets plugin. Also, I am hesitant on using the samp sockets plugin because the last reply to the thread said it's unreliable.


Re: Realtime communication between samp server and website server - iKarim - 16.08.2018

You could use web sockets from the requests plugin: https://sampforum.blast.hk/showthread.php?tid=653362


Re: Realtime communication between samp server and website server - Seifspeed - 16.08.2018

Quote:
Originally Posted by iKarim
Посмотреть сообщение
You could use web sockets from the requests plugin: https://sampforum.blast.hk/showthread.php?tid=653362
Thanks I'll check it out!