I have a C++ Server which I give out to users who wish to host (it's a game server).
When a C++ Server goes online, it posts to a PHP script on my Host Gator account. This PHP script then tries to connect to the C++ Server and wait for a response. If it gets a response, then that C++ Server is put into the Master Server List via MySQL. I connect to the C++ Server from PHP using socket_connect().
Unfortunately, I got a Connection Refused (111) error on PHP. That's weird I thought, the C++ Server port IS open (tested using www.canyouseeme.org, it's open).
I then did a bit of research and contacted Host Gator Technical Support. They said some outgoing ports are blocked. The thing is, I'm allowing people who host the C++ Game Servers to open ANY port they want.
Host Gator will not allow all outgoing ports to be blocked.
So what do I do now? How do I check if a server can be connected to through PHP on Host Gator? I think I might be screwed. Is the only viable solution to tell my users that they have to use a specific port? What if they want to host multiple servers??
Aucun commentaire:
Enregistrer un commentaire