07.11.2014, 10:37
Well, it depends on the type of outside system you're planning on using. If you're planning on making a Control Panel using PHP then I'd suggest a socket plugin. Take a look at this thread:
https://sampforum.blast.hk/showthread.php?tid=333934
More information on how to use the socket plugin in PHP:
https://sampforum.blast.hk/showthread.php?tid=333934
More information on how to use the socket plugin in PHP:
Quote:
About the previous discussion... ports 0 - 1024, in most cases, require some sort of administrative rights on the system.
And BlueG, thanks a lot for this great plugin. I got the PHP-gameserver communications script that we spoke about earlier to work perfectly. For anyone interested, here's something small I combined for use right now. The PHP code listens for connections incoming on port 7778. pawn Код:
And a little PHP I've combined from various examples on the Internet. I haven't really gotten to finetuning it, nor have I mastered the background of socket operations. But this works fine for me. PHP код:
I'm much of an experimenter so don't hit me if the code is buggy or something can be improved. I hope it gets the point of its abilities across. So far I've been using HTTP for sending all sorts of player data to the server. Updated 15/04: Using PHP_NORMAL_READ in PHP's socket_read and ending plugins socket_send with a \n to correct issues that I missed when writing code for this forum :< Updated 12/05: The PHP script now uses getprotobyname('tcp'), otherwise some Linux installations might get trouble. |