You are here: Re: Log File - Counting "Hits" « PHP Programming Language « IT news, forums, messages
Re: Log File - Counting "Hits"

Posted by Ben Holness on 10/03/89 11:51

> I know I could increase the memory settings in PHP - but is there a
> smarter way of counting entries in the log file without trying to load
> the entire thing into memory first?

You could read the file in line by line and count as you go using fopen()
and fread() or fgets() .. See the PHP pages for how to use them.

Alternatively you could make a system call with "grep 'GET /feed7.xml' | wc -l"

Ben

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация