you could also use a database. when someone clicks on a link, update +1 in the database. I think you can do it like this:
create a table called link_clicks
fields:
link_url varchar(255) primary key
clicks int
______
for the example: run query
INSERT INTO link_clicks VALUES('http://www.google.com',0);
____________
Code:
<html>
<head>
<script>
function click(url)
{
location.href="link.php?link=".url;
}
</script>
</head>
<body>
<a href="http://www.google.com/" onclick="click(this.getAttribute('href'))">google</a>
</body>
</html>
for link.php
Code:
<?
/*connection data(your own) store connection in $cxn*/
$sql="UPDATE link_click SET clicks+=1 WHERE link_url='$_GET[link]'";
$sql2=mysql_query($sql);
header('Location:'.$_GET[link]);
?>
should work
Bookmarks