SA-MP Forums Archive
How to send a command from PHP user panel to my 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: How to send a command from PHP user panel to my server. (/showthread.php?tid=586334)



How to send a command from PHP user panel to my server. - jamal1992 - 21.08.2015

Hello guys, i want to send a command like CMD:ban [playerid] [time] [reason] from user panel PHP to my server. Evreyone know how i can do this ? tell me pls


Re: How to send a command from PHP user panel to my server. - Vince - 21.08.2015

Socket plugin. Or use RCON. I believe there's some RCON connector flying around somewhere, although that means you need to have remote RCON enabled, which can be a security vulnerability.


Re: How to send a command from PHP user panel to my server. - jamal1992 - 21.08.2015

How to use than socket plugin, i don`t understand what he do and i don`t want to send a rcon command i want to send my ban command from the gamemode with parameters from there.


Re: How to send a command from PHP user panel to my server. - Dayvison_ - 21.08.2015

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


Re: How to send a command from PHP user panel to my server. - jamal1992 - 21.08.2015

that is for rcon commands man, how to send a command to rcon with parameters ? how receivces the server ?


Re: How to send a command from PHP user panel to my server. - jamal1992 - 21.08.2015

I found a posibble solution using MYSQL and a timer on server. I create a table into database where i set some data which i check with a timer in my gamemode and punish player if is connected. What do you think, slows server ?


Re: How to send a command from PHP user panel to my server. - SFA7X - 21.08.2015

Your php script should be connected to the db.


Re: How to send a command from PHP user panel to my server. - jamal1992 - 21.08.2015

my php script use same database like gamemode so is connected ) is a user panel man.


Re: How to send a command from PHP user panel to my server. - jamal1992 - 22.08.2015

Anyone with any ideas ?


Re: How to send a command from PHP user panel to my server. - Calgon - 22.08.2015

Quote:
Originally Posted by jamal1992
Посмотреть сообщение
I found a posibble solution using MYSQL and a timer on server. I create a table into database where i set some data which i check with a timer in my gamemode and punish player if is connected. What do you think, slows server ?
You can do this, but it will slow your server down depending on how regularly you check the database with the timer. I'd personally say doing critical things like kicking a player would definitely best be done using sockets instead, but for none important things then using a MySQL table / timer and running that every minute or so would be fine.