birbal 168 Posted February 9, 2012 Report Share Posted February 9, 2012 is there any way to implement thread in php? i came across pcntl but it is telling it is not for windows. how to do it with windows? Quote Link to post Share on other sites
justsomeguy 1,135 Posted February 9, 2012 Report Share Posted February 9, 2012 I wouldn't recommend PHP for producing multithreaded programs, there are much more suitable languages for that. C++ would be my choice. Quote Link to post Share on other sites
birbal 168 Posted February 10, 2012 Author Report Share Posted February 10, 2012 I am trying to developing a websocket server which can listen from browser. if i use any other language rather than php how both will incorporate? how should i approach? Quote Link to post Share on other sites
justsomeguy 1,135 Posted February 10, 2012 Report Share Posted February 10, 2012 I'm not really sure what your requirements are, but you definitely wouldn't want to write a web server using PHP. Multithreading is actually disabled in PHP when it is running as an Apache module with a server, it is only available from the command line. I don't know what you're trying to do, but you can have multiple programs use the same database or things like that to exchange information. Quote Link to post Share on other sites
boen_robot 107 Posted February 11, 2012 Report Share Posted February 11, 2012 If you must have your socket server running on Windows, the best thing to do is not use PHP, but use a language more appropriate for (portable?) desktop applications... like C# or JAVA.If you insist on using PHP, you'll have to settle with using a UNIX server - there's nothing for Windows yet. Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.