Hey there Does anyone know how I could receive a POST request in a plugin, form a website? e.g on a form on a website (www.example.com/form.php) sending a POST to the server 127.0.0.1:19123 Thanks
You would have to open a socket in a separate thread maybe on port 8080 and then wait for post requests, I'm not exactly sure how you would parse them (probably not too tricky).
There must be a way to open it on the same port the server is running on though because RCON and query both run oh that same port And by the way I'm going to be modding the src files so if I needed to make the class somewhere else to do this then that would be fine to So my problem, is that I'm clueless on how to do this XD
RCON runs on the TCP interface. Query runs on the UDP interface with the server though. By default ports are locked to the script once bound, there is a way to prevent this but I don't think it would have the desired effect.
why dont u just locate the form.php directory and just linked it in the plugin. idk if this is possible but "/var/www/website/form.php"
I understand what you are trying to say but that won't work since the website with the form.php is not going to be hosted on the same server that the mcpe server is running on
Opps sorry a bit of mixed communication, I know how to do that, I thought you meant there was a way to receive cURL POST within the server
You use the following to setup the socket (assuming you can block): socket_create(), socket_bind(), socket_listen() Then to get a connection: socket_accept(), socket_read()