How to save iis logs across servers _ PHP Tutorial

Source: Internet
Author: User
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...

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.