Re: Download tracker/counter

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Robert Wolfe wrote:
[snip]

1)      Allow the downloads of said files.

readfile() is your friend here, although you will need to search around for the right HTTP headers to send as well.


2)      Count the number of time a file has been downloaded.

You could either look into creating a serialized array and writing/reading from that file - although you may have concurrency issues with this, or you could look into writing the counts into a database table (SQLlite, mySQL - you have a number of options here. There are *lots* of net tutorials for this.


3)      Record the IP addresses of the machines that download the files.

http://uk3.php.net/manual/en/reserved.variables.php#reserved.variables.server


REMOTE_ADDR is the one you need.

HTH,

Mikey

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux