Open a socket for a web interface

How would I go about opening a port on a GMOD server for a web interface to send information to?

Using web interface, Sally bans Bob.
The web interface sends packets congaing string to gmod server
Gmod server receives
Gmod Server bans.

Edit Since portalgod thinks what i said was dumb you can get help from him.

That’s what RCON is for, just use some library to communicate with the server.