mcLinksCounter 1.2


Changelog
1.0: First release.
1.1: Password protected admin panel. Detailed datas for each link. Upgrade from 1.0 to 1.1: same method as new installation, but don't drop your table mclinkscounter (it is the same one) in order to not loose your datas.
1.2:Bugfix when deleting datas on first day of a month. Added displaying of "TOP 10". Upgrade from 1.0 or 1.1: same method as previous line.
Installation
Fichier mclc.php:
Complete variables $host $login $pass $base with your data, $langfile with the language file name you want. Then choose a login and a password to $admin_login and $admin_pass.
File blank.php:
Language file you can use pour for translation. If you want to contribute, please send me your work by mail. Thanks in advance.
Upload the folder mcLinksCounter on your server. (you can change the name).
You absolutely have to securise access to this folder. Use the method you prefer (htaccess, members only section ...)
Create the tables mclinkscounter and mclinkscounter_detail. (DO NOT change their names).
Use the file table.sql
Connect your browser to mclinkscounter/stats.php. (or newname/stats.php).
You can now use the form to record your links.
In order to have a link like <a href="http://www.site.com" target="_blank">Visit this</a> you have to write:
  Name: Visit this
  Category: Sites (i.e)
  URL: http://www.site.com
  Target: select _blank
  Hits: 0 (or the number you want, if you don't want start from 0)
Then press Submit and so on.
Edit or Delete a link:
Not so hard, just click on modify or delete on its row, and follow instructions.
Detailed Datas for a link:
Click on a link'name and go to some datas about it. Here are the today's and yesterday's number of hits, and some details about visitors of the day.
Click on Delete old datas to ... delete old datas (older than one day) from the table, in order to not clutter up your database.
And now :
At the top of each page you wish have one or more links, write this little code:
<? include "...path/mcLinksCounter/mclc.php"; ?> where "...path/... is the exact path from your page to mclc.php. You can use mcLinksCounter on every page of your site, just remember to write this path at the top of each page.
In order to display: Write this code:
One link with hidden counter:
Have a look at my site, every days!
 
Have a look at <? mclc_nom($PHP_SELF, "my site"); >? every days!
One link with visible counter:
Download my script (372)
 
Download <? mclc_nom_clics($PHP_SELF, "my script"); >?
The all list in "Sites" category, with hidden counter,
order by name:

My best sites :
ABC Site
Beautiful Site
Just a Site
My Site
My best sites :<br><? mclc_catN($PHP_SELF, "Sites"); >?
The same list than above,
order by hits number:

My best sites :
Beautiful Site
Just a Site
ABC Site
My Site
My best sites :<br><? mclc_catC($PHP_SELF, "Sites"); >?
The all list in "Sites" category, with visible counter,
order by name:

My best sites :
ABC Site (23)
Beautiful Site (57)
Just a Site (48)
My Site (19)
My best sites :<br><? mclc_catN_clics($PHP_SELF, "Sites"); >?
The all list in "Sites" category, with visible counter,
order by hits number:

My best sites :
Beautiful Site (57)
Just a Site (48)
ABC Site (23)
My Site (19)
My best sites :<br><? mclc_catC_clics($PHP_SELF, "Sites"); >?
The top 3 (or 5, or 10, just ask) in "Sites" category, whith visible counter, order by hits number:

The 3 most visited sites :
Beau Site (57)
Joli Site (48)
Autre Site (23)
The 3 most visited sites :<br>
<? mclc_catCtop_clics($PHP_SELF, "Sites",3); >?

mcLinksCounter is a free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or any later version.

mcLinksCounter is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

copyright © 2002 - Marc Cagninacci - PhpForums