From owner-freebsd-hackers Sun Dec 8 21:45:32 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8C2DE37B401; Sun, 8 Dec 2002 21:45:31 -0800 (PST) Received: from dan.emsphone.com (dan.emsphone.com [199.67.51.101]) by mx1.FreeBSD.org (Postfix) with ESMTP id EDADD43EC5; Sun, 8 Dec 2002 21:45:30 -0800 (PST) (envelope-from dan@dan.emsphone.com) Received: (from dan@localhost) by dan.emsphone.com (8.12.6/8.12.6) id gB95jM9m097981; Sun, 8 Dec 2002 23:45:22 -0600 (CST) (envelope-from dan) Date: Sun, 8 Dec 2002 23:45:22 -0600 From: Dan Nelson To: nbari@unixmexico.com Cc: freebsd-isp@FreeBSD.ORG, hackers@FreeBSD.ORG Subject: Re: tail -f on webpage Message-ID: <20021209054521.GB20704@dan.emsphone.com> References: <26647.148.243.211.1.1039409754.squirrel@mail.unixmexico.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <26647.148.243.211.1.1039409754.squirrel@mail.unixmexico.com> X-OS: FreeBSD 5.0-RC X-message-flag: Outlook Error User-Agent: Mutt/1.5.1i Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG In the last episode (Dec 08), nbari@unixmexico.com said: > Hi all > > How can i make a tail -f and show the results in a web page with > out having to reload the page every N seconds > > i am using PHP in a script like: > > $error_log = '/var/log/apache/log'; > passthru ("tail -f $error_log"); > ?> The following 3-line CGI works fine: #! /bin/sh printf "Content-type: text/plain\r\n\r\n" tail -f /var/log/messages If you want a PHP solution, try a php mailinglist. -- Dan Nelson dnelson@allantgroup.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message