It appears that you're running an Ad-Blocker. This site is monetized by Advertising and by User Donations; we ask that if you find this site helpful that you whitelist us in your Ad-Blocker, or make a Donation to help aid in operating costs.

What up bitches, I never ask for help, but on this I am truly stumped..... I'm trying to make a public web stats section on my webpage. To display:

Today's Hits: Today's Unique Hits:Total Unique Hits:

I can't seem to it it to work how I want it to. The only condition is that no mysql database. I do not have mysql installed and setup and I really do not want to do it cause... Well I'm lazy. But if anyone has any ideas. Please Help would be greatly appreciated

"The secret to creativity is knowing how to hide your sources."-Albert Einstein

lol OMG are you using PHP 5.X? if so you have SQL lite. If not use a flat file system like UBB works off of. It isn't as fast as a modern db, but I seriously doubt you will generate the traffic to truely make a difference.

Like I say Ubb uses a flat file system, PHP is highly able to do this as well.

There are actually some advantages of using a flat file system also. Check it out

Those should get you well on your way to creating a flat file system to count hits and such.

The way I see it...

1st file: total_hits.inc(besure to make inc file viewable only by php and might as well place them below the viewable directory)

file lay-out

Code:

$hits //$hits is replaced by a running tally of hits
$last_hit // timestamp of last logged hit
$last_ip //ip address of last hit

second file(one will be created every month)file name: Month_year.inc $date_timestamp $hits_count $ip_address[1 thru whatever] //this is an array of every IP from that day $browser_per_ip //what browser each ip is using $tally_unique_ip's//next day but same month is added below seperated by 2 carriage returns $date_timestamp $hits_count $ip_address[1 thru whatever] //this is an array of every IP from that day $browser_per_ip //what browser each ip is using $tally_unique_ip's

Well the thing is I don't want a whole page dedicated to stats, its just a little portion of the main page. So all I need is something that counts hits, unique hits and total unique hits, and generates a normal looking number. To be displayed on the index page.

"The secret to creativity is knowing how to hide your sources."-Albert Einstein

you should not have to use 777 for it to work. 666 should be a viable secure chmod. you can use any file extension you want for the tex/flat files. inc is common. I have used .fun for functions, .pwd for MySQL login info, etc etc etc

You have to modify your .htaccess file however to may these files treated as PHP files. Once you do that you should beable to store sensative data in them.

Well I changed them to .inc, and moved them out of the main directory to a hidden on, I'm now changing the chmod to 666 to see if it works. TY for all the help sintax, it was not as hard as I had first thought

"The secret to creativity is knowing how to hide your sources."-Albert Einstein