Re: Newbie challenge to brainiacs

From: Date: Tue, 14 May 2002 12:51:05 +0000
Subject: Re: Newbie challenge to brainiacs
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-97525@lists.php.net to get a copy of this message
On Tuesday 14 May 2002 19:42, Josh Edwards wrote: > Here is a sample of my weblog that reads into an array from a file ie > > $filename = ("combined_log"); > $fcontents = file($filename); > > 203.29.154.13 - - [08/May/2002:21:21:07 +1000] "GET /A1.php HTTP/1.1" 200 > 417 "- > " "Mozilla/4.0 (compatible; MSIE 5.5; Windows 98)" To help you get started this regex will match your input lines: /^(.+)\s(.+)\s(.+)\s\[(.+)\]\s"(.+)"\s(\d+)\s(.+)\s"(.+)"\s"(.+)"/ breaking them into its components: ip identd user time request result size referrer -- Jason Wong -> Gremlins Associates -> www.gremlins.com.hk Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Development * /* Gomme's Laws: (1) A backscratcher will always find new itches. (2) Time accelerates. (3) The weather at home improves as soon as you go away. */

« previous php.general (#97525) next »