9

Ugh. Challenges. I need to create a 3D two player online game with the new HTML5 WebSockets, and I'm using a free 000webhost server which I barely have control over. Does anyone know how to connect two client connections together in PHP?

Comments
  • 2
    Perhaps, c9.io
  • 1
    The issue with php is that its not supposed to keep running. If you're confident in JavaScript, then make the backend in node.js, it's really easy
  • 0
    I have done it once about 2 years ago, I used someone elses code I'll check if I can find the source when I get to work.

    @nicholai is right tho, php is not really meant for such a thing
  • 1
    @nicholai but you can't run nodejs on a simple server right? I'm guessing he doesn't have ssh access or something like that
    Sorry if I'm wrong
  • 2
    @ikwilkoffie don't apologise! Asking questions about things you don't know is something a lot of devs lack!
    Anyways, it used to be like that, but now you can host entire solutions without an actual box using different solutions, one of them is now: https://zeit.co/now - free for FOSS, or, if you're a student you can use Heroku or DigitalOcean for free using the GitHub student developer pack
  • 1
    @nicholai Oh that looks pretty sweet!
    Yeah i have a student pack but I keep forgetting to look at the options in there. Ironically when I finally do have time to look at it I'll probably won't be a student anymore :')
  • 1
    @calmyourtitties I think i used this one but it's been a while.
    https://github.com/sanwebe/...

    But maybe you could look at the options @nicholai provided, that'l probably be the best way to go
  • 0
    @ikwilkoffie thank you! I'll check it out, and if i have to, I'll look into node.js or go, which means I'll have to find a new web host :/
Add Comment