note 75160 deleted from function.syslog by nlopess
| From: | nlopess@php.net | Date: | Sun, 20 May 2007 13:38:39 +0000 |
| Subject: | note 75160 deleted from function.syslog by nlopess | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-126718@lists.php.net to get a copy of this message | ||
Note Submitter: developer at sysco dot ch
----
It is also possible to send a syslog message to an other server instead of the local one (to
centralize messages or to trig something else on an other machine for example). This works also for
Windows based computers !
It is a simple PHP class and it works like this:
<?php
require_once('syslog.php');
$syslog = new Syslog();
$syslog->Send('192.168.0.1', 'My first PHP syslog message');
?>
You can download the free syslog.php file here: http://developer.sysco.ch/php/syslog.zip
(full source code and documentation)
Sockets support must be enabled.
In Linux and *nix environments, the extension is enabled at compile time using the --enable-sockets
configure option
In Windows, PHP Sockets can be activated by un-commenting extension=php_sockets.dll in php.ini