Re: [PHP] PHP telnet server



Luke Slater wrote:
Hi everyone,

I'm trying to rewrite an old MUD in PHP; the reasons for this are that
the original is written in C and most files in the codebase run over
2000 lines with at least 20 of them, which makes it very hard to
change anything.

Plus, the web interface is also written in C, and needless to say
that's just nasty!

So I was looking at sockets in PHP, and thinking about the semantics
of it all.

I was looking at this article:

http://devzone.zend.com/article/1086-Writing-Socket-Servers-in-PHP

And thought 'wow this looks like it might be pretty easy actually!'

But then I reached the first hurdle point:

'
/* Accept incoming requests and handle them as child processes */
$client = socket_accept($sock);
'

Surely the point of a MUD is that the requests are shared?

I also looked up telnet servers in PHP on google quite extensively,
and there seems to be no real information out there? I would imagine
that I'm looking for the wrong thing, however.

In short I'm looking for the basic idea on how a MUD server would be
implemented in PHP.

Thanks in advance for anything,

Luke Slater

How about AJAX and sessions instead of having TCP sockets?
http://xajaxproject.org/

Thank you,
Micah Gersten
onShore Networks
Internal Developer
http://www.onshore.com




.



Relevant Pages

  • Re: [PHP] PHP telnet server
    ... I'm trying to rewrite an old MUD in PHP; the reasons for this are that the ... Surely the point of a MUD is that the requests are shared? ... I also looked up telnet servers in PHP on google quite extensively, ... I kept my MUD in C though and created my own scripting engine for it... ...
    (php.general)
  • PHP telnet server
    ... I'm trying to rewrite an old MUD in PHP; the reasons for this are that the original is written in C and most files in the codebase run over 2000 lines with at least 20 of them, which makes it very hard to change anything. ... I also looked up telnet servers in PHP on google quite extensively, and there seems to be no real information out there? ...
    (php.general)
  • Re: [PHP] PHP telnet server
    ... I often thought PHP would be a nice language for a MUD, if one could get the performance out of it... ... Customize your PHP --- trim out extensions you don't need, ...
    (php.general)
  • Re: [PHP] PHP telnet server
    ... I often thought PHP would be a nice language for a MUD, if one could get the performance out of it... ... But maybe that's just the stupid way to write a MUD. ...
    (php.general)
  • Re: [PHP] Re: PUT vs. POST (was: php File upload)
    ... Luke Slater ... the local file system in a way that allows for the partial loading of ... written in PHP to access anything on the client. ...
    (php.general)