|
|
|
| Title : |
Countdown - A PHP/MySQL hit counter script for any URL. Can be used to count downloads, as a general hit counter or even part of an ad banner system. |
| Categories : |
PHP |
 Simon Booth |
| Date : |
Oct 03rd 2000 |
| Grade : |
4 of 5 (graded 6 times) |
| Viewed : |
7390 |
| File : |
countdown.phtml
|
| Images : |
No Images for this code example. |
|
| Search : |
More code by Simon Booth |
|
| Action : |
Grade This Code Example
|
|
| Tools : |
My Examples List |
|
|
|
|
|
|
This PHP script provides a generalised hit counter for pages or downloaded files.
It is based on a MySQL database (some assembly required - you get to write the front end to populate
it - instructions at the top of the script). The database records the file to count accesses for,
the hits and some other stuff.
We've all seen those odd urls, you know the ones, stuff like...
http://www.somesite.com/somepath/download.phtml?file=725304
That's what this thing does. There are three ways of specifying the file to access:
1) URL to redirect to
2) Numeric record number
3) MD5 of some junk string followed by a padded record number
These options allow 'hiding' the location of the file being accessed to various levels.
It was actually a quickie for some bloke in one of the forums - Yup, the forums *do* work :)... |
|
| Query2Report : Generating Html, Pdf and Csv Reports from SQL Query Categories : PHP, PHP, HTML, PDF, Excel | | | Sessions and -enable-trans-sid Categories : PHP, PHP Configuration, PHP Options and Info, Sessions | | | Tropicalm Genetree Family (MySQL based family tree) Categories : PHP, Interfaces, Databases, MySQL, Complete Programs | | | PHP Cookies - Simple cookie write/read methods that allow basic encryption Categories : PHP, Cookies, Security, Encryption | | | A class for sending email; it has support for To:, Cc:, Bcc: and Reply-To:
headers. It requires that you have sendmail installed. Categories : Email, PHP Classes, PHP | | | Image Cache Categories : Graphics, PHP Classes, PHP | | | PageRank Display Categories : Search Engines, HTML and PHP, PHP | | | Simple Email address validation Categories : Email, PHP, Strings | | | Checks Date-Input from HTML-Forms and converts to YYYY-MM-DD Format for MySQL Date-Fields Categories : MySQL, Date Time, PHP, Databases | | | Gets the browser and OS from the $_SERVER['http_user_agent'] variable in PHP Categories : PHP, HTTP, Regexps | | | How to force the user to download a file instead of opening it up in an
controlled environment within the browser (i.e. MS Word/Adobe Acrobat) Categories : Browsers, PHP, HTTP | | | Ora_Bind -- bind a PHP variable to an Oracle parameter Categories : PHP, PHP Functions, Oracle | | | Three Cool Classes and One Trick Categories : PHP, PHP Classes, Graphics, Email | | | Print out array key => value in colored HTML Categories : PHP, Arrays, HTML and PHP | | | If you want to create select buttons featuring current date this example will show you how... Categories : Date Time, HTML and PHP, PHP | |
| |
| |
|