Re: "tail" solution for PHP5 wanted

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, June 11, 2007 11:37 am, Michelle Konzack wrote:
> * Do not Cc: me, because I am on THIS list, if I write here.        *

Actually, not everybody who posts here is subscribed... :-v

But I did remember to not Cc: you this time.

> I am working again on my PHP Admin interace an need a "tail"
> solution in PHP5 to show "fetchmail" and "procmail" in realtime.
>
> Does anyone have done this already and if yes, how?
>
> My ADSL router can do this but it use a crapy JavaScript which can
> show only logs UNDER 100 lines since it refresh the whole page
> once a second but I need at least the last 500 lines of logfiles.

<html>
  <head>
    <meta http-equiv="refresh" content="1" />
  </head>
  <body bgcolor="#ffffff"><pre>
<?php
  exec("/usr/bin/tail -n 500 /var/log/fetchmail", $output, $error);
  if ($error){
    echo "OS Error: $error\n";
    error_log("tail fetchmail yielded OS Error: $error");
    error_log(implode("", $output));
  }
  echo implode("", $output);
?>
  </pre></body>
</html>


>
> Greetings
>     Michelle Konzack
>     Systemadministrator
>     Tamay Dogan Network
>     Debian GNU/Linux Consultant
>
>
> --
> Linux-User #280138 with the Linux Counter, http://counter.li.org/
> ##################### Debian GNU/Linux Consultant
> #####################
> Michelle Konzack   Apt. 917                  ICQ #328449886
>                    50, rue de Soultz         MSN LinuxMichi
> 0033/6/61925193    67100 Strasbourg/France   IRC #Debian (irc.icq.com)
>


-- 
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some indie artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux