How do I implement an artificial player on the server of a multiplayer game

I would like to have a team of players attacking one virtual opponent who would be played by the server himself. Can I write the AI of that virtual player in C++ then call it from whatever PHP or anything on the server? How do I start?

Found a good starting point here:

Server AWS Linux, C++ inside UNREAL for both server and clients.