Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.php > #15162
| From | Thomas 'PointedEars' Lahn <PointedEars@web.de> |
|---|---|
| Newsgroups | comp.lang.php |
| Subject | Re: in a log.txt : how convert IP.IP.IP.IP to IP.IP.*.* (hope of french CNIL) ? |
| Date | 2015-03-31 22:28 +0200 |
| Organization | PointedEars Software (PES) |
| Message-ID | <3564629.l9P8CqJurF@PointedEars.de> (permalink) |
| References | <5516e98a$0$2988$426a34cc@news.free.fr> <9RCRw.180861$jx4.20363@fx27.iad> <13863983.OW5F8XF2sQ@PointedEars.de> <551a603a$0$3318$426a74cc@news.free.fr> |
bird wrote: >> 28/03/2015 22:47, Thomas 'PointedEars' Lahn wrote : >> Lew Pitcher wrote: >> //..... >> The log file created by this code will be unreadable and hardly parseable >> because it will have only one long line: the trailing newline of each >> entry is missing – fwrite() does not write it by default. >>//.... > > There is a > "); > just under > fwrite($fp, "$time $ip[0].$ip[1] $page $browser"); If so … > it seems to be a correct "newline" regarding results : > > 2015-03-29 03:35 ip.ip.ip.ip / Mozilla/5.0 (iPhone... etc > 2015-03-29 03:35 ip.ip.ip.ip /index.php?page=Accueil Mozilla/5.0 ... etc … this would not be possible because a standalone “")” is a syntax error. Are you sure those lines are not from a previous run? > but now I have > Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, > expecting T_STRING or T_VARIABLE or T_NUM_STRING in > /..../lionwiki/index.php on line 50 > > line 50:$self = basename($_SERVER['SCRIPT_NAME']); Assuming that “line 50:” is not in the original code, there is no syntax error on this line. The reason for the problem must be before that line. > .htaccess as "php 1" Impossible to say what you did wrong if you do not post the offending code *verbatim* (indentation preserved, no prefixes or suffixes added) trimmed down to the relevant lines. Please post using your real name. -- PointedEars Zend Certified PHP Engineer Twitter: @PointedEars2 Please do not cc me. / Bitte keine Kopien per E-Mail.
Back to comp.lang.php | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
dans un log.txt : reduire IP à deux octets selon recomm CNIL bird <new.bird@free.fr> - 2015-03-28 18:48 +0100
Re: dans un log.txt : reduire IP à deux octets selon recomm CNIL Lew Pitcher <lew.pitcher@digitalfreehold.ca> - 2015-03-28 14:58 -0400
Re: dans un log.txt : reduire IP à deux octets selon recomm CNIL Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2015-03-28 22:47 +0100
in a log.txt : how convert IP.IP.IP.IP to IP.IP.*.* (hope of french CNIL) ? bird <new.bird@free.fr> - 2015-03-31 10:52 +0200
Re: in a log.txt : how convert IP.IP.IP.IP to IP.IP.*.* (hope of french CNIL) ? Jerry Stuckle <jstucklex@attglobal.net> - 2015-03-31 09:16 -0400
Re: in a log.txt : how convert IP.IP.IP.IP to IP.IP.*.* (hope of french CNIL) ? Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2015-03-31 22:28 +0200
Re: dans un log.txt : reduire IP à deux octets selon recomm CNIL Thomas Mlynarczyk <thomas@mlynarczyk-webdesign.de> - 2015-03-28 20:15 +0100
Re: dans un log.txt : reduire IP à deux octets selon recomm CNIL Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2015-03-28 22:50 +0100
csiph-web