mend3 Posted December 10, 2014 Share Posted December 10, 2014 Hey guys, this is my first contribution for this forum, so I hope you like =) I've made a simple PHP script to run server commands through telnet. Is simple, fast and functional. It's only the code, don't have any interface because it was extracted from another system I've made. "What?" - A script tu run your server's commands via telnet. "How?" - You set according to the options of your server, access the page and be happy. "Why?" - You can give items, jail players, restart / shutdown the server, have real-time information about server performance and more. "Is there a new command?" - You can just run commands that already exists in your server. If you implement any new commands into your core, you'll be able to use them too. It does not create any new commands, just run the existing ones. "I do not know to work with java. What commands can I use? How to use?" - There is a file 'telnet.ini' within the file with all the basic commands available on any server. Just read, see how to use and what it does. "Can I share the script?" - Please! The only thing I ask is that you keep the original credits. It helps me to want to help you. You can use free, but please, keep the credits. Enjoy =) PS.: Instructions in readme.txt file. Some screens (browser and gameplay) Login -> help Login -> status Login -> restart Game -> status Game -> mem usage Game -> performance Game -> gmlist Game -> pm Game -> announce Game -> give item Game -> enchant Game -> shutdown Scan here Download here 1 Quote Link to comment Share on other sites More sharing options...
drake2wow Posted December 10, 2014 Share Posted December 10, 2014 Is it using database connection or networking? I've been trying a UDP PHP -> Gameserver communication, I always failed the PHP read part since there's no possible way to read udp packets individually for sessions with pure php Quote Link to comment Share on other sites More sharing options...
mend3 Posted December 10, 2014 Author Share Posted December 10, 2014 There are no database connection, the flow is: socket -> connect to host socket -> auth (user and pass) socket -> send command (server receive and do what must do) socket -> close Quote Link to comment Share on other sites More sharing options...
drake2wow Posted December 10, 2014 Share Posted December 10, 2014 There are no database connection, the flow is: socket -> connect to host socket -> auth (user and pass) socket -> send command (server receive and do what must do) socket -> close Yea, sending a UDP packet via PHP is easy, but reading from the gameserver is not, did you try it? Quote Link to comment Share on other sites More sharing options...
mend3 Posted December 10, 2014 Author Share Posted December 10, 2014 Yeah, I had some trouble with that. Some cases the response is too long or too slow (sometimes a damn loop that blocked me to handle the stream). So, all I've did is: send message: Server received it? Ok. So send me a unique response so I can log it to user. It's faster. Execution time (except when send shutdown command) is almost instantaneous. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.