• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

counter on files?

ludlo

OSNN Addict
#1
hello

im running sambar server on a computer at home, and i need to check how many times a file has been downloaded, or start checking that.

how can i code this?

thanks
 
#2
[Edit]Oh dear, i read Apache, not Samba. :D Well in Samba, I have nooo idea, not even sure it's possible. Especially since you don't really "download" through Samba.


** Old crap**

You could du it by using a small tracker and link to that instead of the file.

Like file.zip becomes dltracker.php?file=file.zip

The dltracker.php just increments the counter (in a file or database or whatever, your choice) and redirects to file.zip. This would however not work with direct links.

Another choice would be to parse through the Apache access logs to find the number of hits. This could get a bit messy though. ;)
 

ludlo

OSNN Addict
#5
well, dont know what samba is but im using SAMBAR web server :) but apache seems better, will download it and learn it. is it difficult to use apache?
 
#6
ludlo said:
well, dont know what samba is but im using SAMBAR web server :) but apache seems better, will download it and learn it. is it difficult to use apache?
Oooohhh sambaR, *doh*, my mistake. :D Never heard of it.

Apache is definately good, it's the most widely used on the net (I think). It's not very hard to use, but I don't know how easy sambar is so. ;)


Samba btw is software you can use to share files between a Linux computer and a Windows computer for instance.
 

ludlo

OSNN Addict
#7
ahaa =) okej then i know what samba is :p

in sambar, you put your html files under sabar/docs/ and the you start it. not too much of setting up :p
 

Members online

No members online now.

Latest posts

Latest profile posts

Hello, is there anybody in there? Just nod if you can hear me ...
Xie
What a long strange trip it's been. =)

Forum statistics

Threads
61,961
Messages
673,239
Members
89,014
Latest member
sanoravies