You can use socket functions (fsockopen() and related) on any free hosting account. However, the access is limited to prevent abuse.
A small set of default ports are available for sockets. This means functions like SMTP, FTP and requests to external websites work fine. However, more specialized ports, like game server ports, are not available. Additional ports cannot be opened on request.
@twineee.rf.gd No, chat scripts are still not allowed. I’m also not quite sure how you came to that conclusion. Note that this articles is just about socket functions, not Websockets, which is a very different technology.
you could probably make a live chat without sockets
just add a send message box input where the user sends a message and a box were the messages show up and the message gets sent into a MySQL database and then you can use php echo to fetch those messages from the MySQL database
That clarifies it a bit, but I still don’t see how it relates to website hosting.
If I were to make a game with PHP, I would just use HTTP calls to send data to other servers. And if it were to run in a browser, I think I’d use WebRTC to setup live peer-to-peer data connections directly between people, which I don’t think needs anything on the hosting side to work.
And if you’re talking about having a desktop or mobile game connect to your website for some features (highscores, social functions, etc.), then you won’t be able to do that anyway. Non-browser access is blocked on our hosting. And to be clear: this article only relates to OUTBOUND sockets. You cannot setup your own server that listens for connections on a custom port. That’s just not possible with web hosting.