Look at the URL of the link in question: http://www.phpbuilder.com/board/attachment.php?s=&postid=10279029
You need to write a script similar to attachment.php. This script takes a parameter, here an ID. That ID is unique, and corresponds to a file. When you click the link, attachment.php logs in the database that you requested #10279029 and then serves up the file (it could do a header Location: or use fpassthru to send you the file depending on the desired level of security [you can hide the physical location of the file or store the file below the root web directory if you use fpassthru, thereby requiring users to use your script to get the file every time, but it is a little more complicated]).
If you just need something simple, you can do this:
<a href="http://www.mydotcom.com/attachment.php?file=filename.ext">Download filename.ext!</a>
In attachment.php:
$file = $_GET['file'];
$query = "update mytable set hits=hits+1 where file='$file'";
$result = mysql_query($query);
if(!$result) {
$query = "insert into mytable(file,hits) values ('$file',1)"; //this is the first hit
$result = mysql_query($query);
}
header("Location: $file");
This should help you get started. The downside here is that the user gets to see the actual path to the file once the header is sent, therby allowing them to circumvent your php script in the future. Check the manual on using fpassthru.