[DGD] Still wondering...

Par Winzell zell at skotos.net
Sun Aug 4 01:15:23 CEST 2002


> How would you suggest querying from php?
> 
> The way I have things setup at the moment is
> I've created a statusd.c which every 5 minutes
> outputs the result of the status() command to
> /log/status.log
> 
> My php website then simply opens
> ~/mud/mudlibs/gpmud/log/status.log and reads
> the contents which it then outputs as part of the
> website.
> 
> Is there a more appropriate way rather than
> having to use text files and a timer to output
> to the file?

This is by far the easiest method, and providing the files aren't large, 
you probably don't have to meddle with lock files and such to protect 
against half-updated files.

If the data is more dynamic -- say you want to authenticate a user out 
of a set of 50,000 registered users -- you probably need something more 
interactive; this can also be done with files (query files and response 
files of some sort) but at this point it might be nicer to sit down and 
write a simple TCP protocol that DGD serves on some port.

PHP makes a connection to DGD, sends a small query, and DGD responds.

Zell

_________________________________________________________________
List config page:  http://list.imaginary.com/mailman/listinfo/dgd



More information about the DGD mailing list