From owner-freebsd-hackers Sun Dec 8 21:27:18 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 6119C37B401; Sun, 8 Dec 2002 21:27:17 -0800 (PST) Received: from midway.uchicago.edu (midway.uchicago.edu [128.135.12.12]) by mx1.FreeBSD.org (Postfix) with ESMTP id B424943EBE; Sun, 8 Dec 2002 21:27:16 -0800 (PST) (envelope-from dsyphers@uchicago.edu) Received: from Yggdrasil (adsl-68-20-22-119.dsl.chcgil.ameritech.net [68.20.22.119]) by midway.uchicago.edu (8.12.5/8.12.5) with ESMTP id gB95R5MU010035; Sun, 8 Dec 2002 23:27:05 -0600 (CST) Content-Type: text/plain; charset="iso-8859-1" From: David Syphers Reply-To: dsyphers@uchicago.edu To: Subject: Re: tail -f on webpage Date: Sun, 8 Dec 2002 23:27:05 -0600 User-Agent: KMail/1.4.3 References: <26647.148.243.211.1.1039409754.squirrel@mail.unixmexico.com> In-Reply-To: <26647.148.243.211.1.1039409754.squirrel@mail.unixmexico.com> Cc: , MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Message-Id: <200212082327.05038.dsyphers@uchicago.edu> 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 On Sunday 08 December 2002 10:55 pm, nbari@unixmexico.com wrote: > 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"); > ?> > > but i have to relaod the page to view new results. First of all, this is off-topic for any FreeBSD list. They're cc'd only to let them know someone has told you this. I would suggest trying a PHP list, but... ... you can't do this with PHP. You're viewing a (pure HTML) page generated by PHP, and for anything to change on it, the page needs to be regenerated, e.g. reloaded. -David -- On the whole I am against mass murder. I rarely commit it myself, and often find myself quite out of sympathy with those who make a habit of it. -Bernard Levin Astronomy and Astrophysics Center The University of Chicago To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message