GCount Version: 0.9.7 GCount is a graphical web counter and logging script. It requires at minimum, PHP 5.0, compiled with the bundled gd library ('--with-gd') and the sqlite library (included by default). Technically you can get away with PHP 4.x as long as you have the sqlite functions compiled in, but it hasn't been tested thoroughly. Simply extract the archive to a location readable by your PHP/GD enabled web server. Point your web browser to http://your.domain.com/path/gcount.php and you should see the GCount page. If you get an error about the database directory not being writable simply: chmod 777 /path/to/gcount/database SQLite requires that the directory be writable to add new records to a database. chmod 777 database/gcount-data.bin If you untar the files with the permission flag (tar -p) the appropriate permissions should already be set. Once you have successfully installed GCount you can use it on your webpage by copying and pasting the following code to your website. Changing the necessary elements of course. /////////////////////////////////////////////////////////////////////////// // /////////////////////////////////////////////////////////////////////////// This is my counter below:
/////////////////////////////////////////////////////////////////////////// //
/////////////////////////////////////////////////////////////////////////// GCount has several configurable parameters that can be passed via CGI. The most important is name. In the above example name is gctest for this counter. Each seperate counter will needs its own unique name. Changing the typeface variable will let you change the display font that GCount uses to display the counter. A value of -1 will cause GCount to use a random typeface each time the counter is requested. Lastly the digits parameter controls the number of digits to display padding with zeros any empty spots. GCount has a default session limit of 5 minutes. Thus a repeat hit from the same IP address will *NOT* be logged until that time limit has passed. You can change this value if you edit gcount.class.php and change the line that says ['session_limit'] to whatever value in seconds the session should be. $this->options['session_limit'] = 300; If you are having problems getting the counter to display I recommend that you debug your problem by going directly to the gcount.php instead of trying to view the counter in your webpage. If GCount gives an error you will see it as a broken image in you web browser, going directly to gcount.php may give you some clues as to what the problem is. Note: this PHP script requires that the GD libraries are installed. They are included with PHP 5.0, they just need to be enabled when you compile. If you are having web hits that are being reported incorrectly when viewing the report have that same web visitor view http://your.domain.com/path/agent.php and email me the output. Some web browswer do not comply with standard browser agent tags. By sending me the string I can update a future version of Gcount. This script has been tested with PHP 5.0.1, gd 2.x, and SQLite 2.8.14. If you have any questions or comments please contact me at: scott@perturb.org To see the script in action go to http://www.perturb.org/ and scroll to the bottom of the page. /////////////////////////////////////////////////////////////////////////// // /////////////////////////////////////////////////////////////////////////// name = (name) specifies all hits will logged under this name digits/di = (1-10) number of digits to show, will be zero padded count/co = (x) a specific number the counter should display, alternately you can specify -1 to output a random number. Hits will not be logged if you simply view the counter as a number. typeface/tf = (x) number of the typeface to use, you can use -1 to use a random typeface debug = (1) if specified gcount will print lots of debugging information instead of a counter All of these options are appended as follows: gcount.php?(option=value)&(option=value)&(option=value) ** mod_rewrite support ** If you have enabled mod_rewrite you can use URLs like the following: http://www.domain.com/name/gctest/di/5/tf/31/gcount.png http://www.domain.com/name/gctest/report.html http://www.domain.com/name/gctest/summary.html http://www.domain.com/name/gctest/admin.html /////////////////////////////////////////////////////////////////////////// // // // /////////////////////////////////////////////////////////////////////////// A counter with 6 digits, using typeface 32, with the name test123 A counter with using typeface 1, with the name johnsmith A link to a report on the usage of counter hotdog73 Report A link to the summary usage of counter 87ninjas Summary Link to all the typefaces available! Typefaces Link to login to the admin panel to manage your counters admins login here /////////////////////////////////////////////////////////////////////////// // /////////////////////////////////////////////////////////////////////////// Scott Baker Last Updated: 2024-04-11