Jump to content


Access log

  • Please log in to reply
1 reply to this topic

#1 TechXP

  • New Members
  • Pip
  • Newbie
  • 3 posts

Posted 23 September 2006 - 02:42 PM

Can I make an own access log wit PHP? (because of trouble at the hosting provider no access log available sometimes)

I thought about two ways:

1) There is one file who is handling the website: index.php. If I put a code on the top of that file. That code writes the data to a file called access.log. After that I can use awstats or something to analyse the log. Can this be done? Will the performance of the site go down? Anyone?

2) I use already a database on the website. It will made different queries. I can put one query in that that would insert access log data into it. After that I can make a cronjob with a script who will read the databsase and write an access log. Then I can run awstats to analyse it. Is this good for the performance of the website?

Can anyone give me advice?


#2 Daniel0

  • Staff Alumni
  • Advanced Member
  • 11,956 posts

Posted 23 September 2006 - 02:45 PM

I would go with option number 1.

Sure you could make an access log that awstats can parse, just make it in the same format as Apache's access.log.

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users