You can track the number of times the link has been accessed.
...
printf ("<a href=\"%s?id=%s&download=yes\">Download my program!!</a>", $url, $id);
...
You can have the page link to itself or another page. Than all you have to do is set up an update function.
...
if($download) {
$result = mysql_query("SELECT count FROM db WHERE id=$id");
$count = sql_fetch_row($result, $db);
$count = $count + 1;
$sql = "db SET count='$count' WHERE id=$id";
}
...
This should count the number of times the link is clicked.
Luckybob