Thursday, May 2, 2024
 Popular · Latest · Hot · Upcoming
4
rated 0 times [  4] [ 0]  / answers: 1 / hits: 3208  / 1 Year ago, wed, january 11, 2023, 2:38:04

Is there a way that I can access Apache Log files from my PHP page.
Normally the apache will not allow access to outer folders. Is there any alternative way to access log files? If I get those logs I can parse them and find out bandwidth usages



Edit:



I actually want to implement a bandwidth tracking system which can track how much data, a user is downloaded form my site. or uploaded to my site. I searched in stackoverflow and found an answer which suggests parsing log file. I need to automate this so that website itself will parse the log and show the details.any idea?


More From » apache2

 Answers
4

I would agree with the other answer and recommend against serving log files via php for apache. Just as a tiny aside, if you are used to php, it can also be run as a scripting language without needing apache. So you can copy your logs and run your php script over them as well.



Since you mentioned bandwidth usage, I would suggest trying out awstats and webalizer for such usage.


[#36932] Wednesday, January 11, 2023, 1 Year  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
ttarum

Total Points: 417
Total Questions: 101
Total Answers: 115

Location: Maldives
Member since Wed, Nov 4, 2020
4 Years ago
ttarum questions
Sat, Aug 20, 22, 12:42, 2 Years ago
Wed, Sep 28, 22, 18:07, 2 Years ago
Mon, Feb 7, 22, 20:23, 2 Years ago
;