How to save iis logs across servers. With the extensible php Tutorial feature, the game user log information can be stored remotely. here I call him tlog (to establish a tcpip connection with the file server, of course, udp is the best ), currently, three extensible php Tutorial features are defined to remotely store game user log information. here I call him tlog (establish a TCP/IP connection with the file server, of course, it is best to use udp). Currently, three functions are defined.
Tlog_init, tlog_record, tlog_close
Tlog_init (ip, port) is used to connect the ip address of the file server. The port is the address and port of the file server respectively.
Tlog_record (message, file) The user sends the log content to be recorded and the files saved in the log
Tlog_close is used to close the socket link generated by log sending.
$ Result = tlog_init ("maid", 9734 );
If ($ result ){
Tlog_record ("hello". time (), '1. log ');
Tlog_record ("hello world". time (), '2. log ');
Tlog_close ();
}
?>
We mainly modify config. m4, tlog. c, php_tlog.h to implement our functions.
Open config. m4,
Delete php_arg_enable (tlog, whether to enable tlog support, and comment dnl
Delete [-- enable-tlog enable tlog support]) line to start comment dnl
Open php_tlog.h and add
Php_function (tlog_init );
Php_function (tlog_record );
Php_function (tlog_close );
For more information about t_log.c, see the package.
After the preceding steps, go to the tlog directory for execution.
./Your php installation directory/bin/phpize my directory is/usr/local/webserver/php5.3.3, then this command./usr/local/webserver/php5.3.3/bin/phpize
./Configure -- with-php-config =/usr/local/webserver/php5.3.3/bin/php-config
Make
Sudo make install)
Added the tlog. so extension by modifying php. ini.
View phpinfo ();
Protocol (establish a TCP/IP connection with the file server, of course udp is preferred). Currently, three definitions are defined...